-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Welcome Guides to use external image URLs #32026
Update Welcome Guides to use external image URLs #32026
Conversation
Size Change: -822 kB (-44%) 🎉 Total Size: 1.03 MB
ℹ️ View Unchanged
|
#32026 (comment) is what I wanted to see! 🙂 @youknowriad: Any concerns with this approach? I'm happy with it but I think the |
I don't understand why we have to add the images to core? Couldn't we serve the images from this plugin instead? Rather than using data url, is it possible to serve the images via endpoints specifically for them? |
There's a welcome guide in the template editor now as well that's worth testing - #31330 |
Oh wow, this is definitely promising. What I don't like is the magic URLs, it's a package so there's no guarantee the image exist like that with that relative URL. I wonder if we should do the same thing like previews/patterns. This is upload the images to wp.org (I believe this requires a meta ticket) and just use the external URLs here. |
Yes but eventually
We have this problem with relative URLs in a few other places, too. I was hesitant to use |
Meta ticket: https://meta.trac.wordpress.org/ticket/5741 |
Cool, https://github.com/WordPress/gutenberg/blob/trunk/packages/edit-post/src/components/welcome-guide/images.js is 712 kB on the disk and it has to be downloaded, parsed and executed even when someone disabled the welcome guide 😱 It looks like there is also a notice from Babel:
|
Now that that ticket is closed, is the only thing left to do to update the |
We also need to add Template Editor/Template Mode graphics to the |
It looks like all assets are on |
16a4937
to
acfac3b
Compare
I've updated everything to use the |
packages/customize-widgets/src/components/welcome-guide/index.js
Outdated
Show resolved
Hide resolved
Not related to this PR, but now that we drop support for IE, I think we can stop using the Furthermore, the |
acfac3b
to
18c75fa
Compare
This is a really good idea! Done in 18c75fa.
Agree this would be nice. Let's do it later though. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is looking better and cleaner! Let's iterate other optimizations later.
packages/customize-widgets/src/components/welcome-guide/style.scss
Outdated
Show resolved
Hide resolved
This includes the following fixes: - Generate babel polyfill dynamically WordPress/gutenberg#31279 - Improve the List View component WordPress/gutenberg#31290 WordPress/gutenberg#32063 - Template mode: - Fix embed dimensions WordPress/gutenberg#32057 - Update the welcome guide WordPress/gutenberg#32055 WordPress/gutenberg#32026 - Don’t display the notice at the same time as the welcome guide WordPress/gutenberg#32076 - Remove MetaBoxes WordPress/gutenberg#32315 - Update the title area WordPress/gutenberg#32037 - Widgets Screen: - Fix unsaved changes WordPress/gutenberg#31757 - Fix toolbar alignment WordPress/gutenberg#31991 - Fix block toolbar position after scroll WordPress/gutenberg#32212 - Fix the visible widget area header WordPress/gutenberg#32262 - Fix legacy widgets preview WordPress/gutenberg#32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar WordPress/gutenberg#32140 - Fix styling issues WordPress/gutenberg#32072 - Fix escape key events WordPress/gutenberg#32175 - Add preferences menu group label WordPress/gutenberg#32259 - Fix creating and replacing legacy widgets WordPress/gutenberg#32005 - Fix the welcome guide’s image WordPress/gutenberg#32264 WordPress/gutenberg#32302 - Fix Cover to Image transform duotone error WordPress/gutenberg#32006 - Remove filter_var usage from blocks WordPress/gutenberg#32046 - Fix image width for aligned Post Featured Image block WordPress/gutenberg#32070 - Prevent excessive Image block re-rendering WordPress/gutenberg#32102 - Remove gutenberg domain from core blocks WordPress/gutenberg#32152 - Use the block editor context class for the the different settings filters WordPress/gutenberg#32159 - Fix Latest Posts block grid view WordPress/gutenberg#32160 - Fix preset classes generation per block WordPress/gutenberg#32190 - Fix logic to enable custom colors and gradients WordPress/gutenberg#32200 - Update the Site Logo logic to use a dedicated site option WordPress/gutenberg#32229 - Limit the Latest Posts block’s featured image width WordPress/gutenberg#32245 - Remove opacity animation in the canvas. WordPress/gutenberg#32266 - Make the focus style valid CSS WordPress/gutenberg#32305 - Fix theme.json styles for the core/list block WordPress/gutenberg#32343 - Fix PHP notice when calling render_block WordPress/gutenberg#32135 Props nosolosw, noisysocks. See #52991. git-svn-id: https://develop.svn.wordpress.org/trunk@51051 602fd350-edb4-49c9-b593-d223f7449a82
This includes the following fixes: - Generate babel polyfill dynamically WordPress/gutenberg#31279 - Improve the List View component WordPress/gutenberg#31290 WordPress/gutenberg#32063 - Template mode: - Fix embed dimensions WordPress/gutenberg#32057 - Update the welcome guide WordPress/gutenberg#32055 WordPress/gutenberg#32026 - Don’t display the notice at the same time as the welcome guide WordPress/gutenberg#32076 - Remove MetaBoxes WordPress/gutenberg#32315 - Update the title area WordPress/gutenberg#32037 - Widgets Screen: - Fix unsaved changes WordPress/gutenberg#31757 - Fix toolbar alignment WordPress/gutenberg#31991 - Fix block toolbar position after scroll WordPress/gutenberg#32212 - Fix the visible widget area header WordPress/gutenberg#32262 - Fix legacy widgets preview WordPress/gutenberg#32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar WordPress/gutenberg#32140 - Fix styling issues WordPress/gutenberg#32072 - Fix escape key events WordPress/gutenberg#32175 - Add preferences menu group label WordPress/gutenberg#32259 - Fix creating and replacing legacy widgets WordPress/gutenberg#32005 - Fix the welcome guide’s image WordPress/gutenberg#32264 WordPress/gutenberg#32302 - Fix Cover to Image transform duotone error WordPress/gutenberg#32006 - Remove filter_var usage from blocks WordPress/gutenberg#32046 - Fix image width for aligned Post Featured Image block WordPress/gutenberg#32070 - Prevent excessive Image block re-rendering WordPress/gutenberg#32102 - Remove gutenberg domain from core blocks WordPress/gutenberg#32152 - Use the block editor context class for the the different settings filters WordPress/gutenberg#32159 - Fix Latest Posts block grid view WordPress/gutenberg#32160 - Fix preset classes generation per block WordPress/gutenberg#32190 - Fix logic to enable custom colors and gradients WordPress/gutenberg#32200 - Update the Site Logo logic to use a dedicated site option WordPress/gutenberg#32229 - Limit the Latest Posts block’s featured image width WordPress/gutenberg#32245 - Remove opacity animation in the canvas. WordPress/gutenberg#32266 - Make the focus style valid CSS WordPress/gutenberg#32305 - Fix theme.json styles for the core/list block WordPress/gutenberg#32343 - Fix PHP notice when calling render_block WordPress/gutenberg#32135 Props nosolosw, noisysocks. See #52991. git-svn-id: https://develop.svn.wordpress.org/trunk@51051 602fd350-edb4-49c9-b593-d223f7449a82
This includes the following fixes: - Generate babel polyfill dynamically WordPress/gutenberg#31279 - Improve the List View component WordPress/gutenberg#31290 WordPress/gutenberg#32063 - Template mode: - Fix embed dimensions WordPress/gutenberg#32057 - Update the welcome guide WordPress/gutenberg#32055 WordPress/gutenberg#32026 - Don’t display the notice at the same time as the welcome guide WordPress/gutenberg#32076 - Remove MetaBoxes WordPress/gutenberg#32315 - Update the title area WordPress/gutenberg#32037 - Widgets Screen: - Fix unsaved changes WordPress/gutenberg#31757 - Fix toolbar alignment WordPress/gutenberg#31991 - Fix block toolbar position after scroll WordPress/gutenberg#32212 - Fix the visible widget area header WordPress/gutenberg#32262 - Fix legacy widgets preview WordPress/gutenberg#32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar WordPress/gutenberg#32140 - Fix styling issues WordPress/gutenberg#32072 - Fix escape key events WordPress/gutenberg#32175 - Add preferences menu group label WordPress/gutenberg#32259 - Fix creating and replacing legacy widgets WordPress/gutenberg#32005 - Fix the welcome guide’s image WordPress/gutenberg#32264 WordPress/gutenberg#32302 - Fix Cover to Image transform duotone error WordPress/gutenberg#32006 - Remove filter_var usage from blocks WordPress/gutenberg#32046 - Fix image width for aligned Post Featured Image block WordPress/gutenberg#32070 - Prevent excessive Image block re-rendering WordPress/gutenberg#32102 - Remove gutenberg domain from core blocks WordPress/gutenberg#32152 - Use the block editor context class for the the different settings filters WordPress/gutenberg#32159 - Fix Latest Posts block grid view WordPress/gutenberg#32160 - Fix preset classes generation per block WordPress/gutenberg#32190 - Fix logic to enable custom colors and gradients WordPress/gutenberg#32200 - Update the Site Logo logic to use a dedicated site option WordPress/gutenberg#32229 - Limit the Latest Posts block’s featured image width WordPress/gutenberg#32245 - Remove opacity animation in the canvas. WordPress/gutenberg#32266 - Make the focus style valid CSS WordPress/gutenberg#32305 - Fix theme.json styles for the core/list block WordPress/gutenberg#32343 - Fix PHP notice when calling render_block WordPress/gutenberg#32135 Props nosolosw, noisysocks. See #52991. Built from https://develop.svn.wordpress.org/trunk@51051 git-svn-id: http://core.svn.wordpress.org/trunk@50660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This includes the following fixes: - Generate babel polyfill dynamically WordPress/gutenberg#31279 - Improve the List View component WordPress/gutenberg#31290 WordPress/gutenberg#32063 - Template mode: - Fix embed dimensions WordPress/gutenberg#32057 - Update the welcome guide WordPress/gutenberg#32055 WordPress/gutenberg#32026 - Don’t display the notice at the same time as the welcome guide WordPress/gutenberg#32076 - Remove MetaBoxes WordPress/gutenberg#32315 - Update the title area WordPress/gutenberg#32037 - Widgets Screen: - Fix unsaved changes WordPress/gutenberg#31757 - Fix toolbar alignment WordPress/gutenberg#31991 - Fix block toolbar position after scroll WordPress/gutenberg#32212 - Fix the visible widget area header WordPress/gutenberg#32262 - Fix legacy widgets preview WordPress/gutenberg#32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar WordPress/gutenberg#32140 - Fix styling issues WordPress/gutenberg#32072 - Fix escape key events WordPress/gutenberg#32175 - Add preferences menu group label WordPress/gutenberg#32259 - Fix creating and replacing legacy widgets WordPress/gutenberg#32005 - Fix the welcome guide’s image WordPress/gutenberg#32264 WordPress/gutenberg#32302 - Fix Cover to Image transform duotone error WordPress/gutenberg#32006 - Remove filter_var usage from blocks WordPress/gutenberg#32046 - Fix image width for aligned Post Featured Image block WordPress/gutenberg#32070 - Prevent excessive Image block re-rendering WordPress/gutenberg#32102 - Remove gutenberg domain from core blocks WordPress/gutenberg#32152 - Use the block editor context class for the the different settings filters WordPress/gutenberg#32159 - Fix Latest Posts block grid view WordPress/gutenberg#32160 - Fix preset classes generation per block WordPress/gutenberg#32190 - Fix logic to enable custom colors and gradients WordPress/gutenberg#32200 - Update the Site Logo logic to use a dedicated site option WordPress/gutenberg#32229 - Limit the Latest Posts block’s featured image width WordPress/gutenberg#32245 - Remove opacity animation in the canvas. WordPress/gutenberg#32266 - Make the focus style valid CSS WordPress/gutenberg#32305 - Fix theme.json styles for the core/list block WordPress/gutenberg#32343 - Fix PHP notice when calling render_block WordPress/gutenberg#32135 Props nosolosw, noisysocks. See #52991. Built from https://develop.svn.wordpress.org/trunk@51051 git-svn-id: https://core.svn.wordpress.org/trunk@50660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This includes the following fixes: - Generate babel polyfill dynamically WordPress/gutenberg#31279 - Improve the List View component WordPress/gutenberg#31290 WordPress/gutenberg#32063 - Template mode: - Fix embed dimensions WordPress/gutenberg#32057 - Update the welcome guide WordPress/gutenberg#32055 WordPress/gutenberg#32026 - Don’t display the notice at the same time as the welcome guide WordPress/gutenberg#32076 - Remove MetaBoxes WordPress/gutenberg#32315 - Update the title area WordPress/gutenberg#32037 - Widgets Screen: - Fix unsaved changes WordPress/gutenberg#31757 - Fix toolbar alignment WordPress/gutenberg#31991 - Fix block toolbar position after scroll WordPress/gutenberg#32212 - Fix the visible widget area header WordPress/gutenberg#32262 - Fix legacy widgets preview WordPress/gutenberg#32260 - - Block Widgets in the customizer: - Fix customizer title overlapping block toolbar WordPress/gutenberg#32140 - Fix styling issues WordPress/gutenberg#32072 - Fix escape key events WordPress/gutenberg#32175 - Add preferences menu group label WordPress/gutenberg#32259 - Fix creating and replacing legacy widgets WordPress/gutenberg#32005 - Fix the welcome guide’s image WordPress/gutenberg#32264 WordPress/gutenberg#32302 - Fix Cover to Image transform duotone error WordPress/gutenberg#32006 - Remove filter_var usage from blocks WordPress/gutenberg#32046 - Fix image width for aligned Post Featured Image block WordPress/gutenberg#32070 - Prevent excessive Image block re-rendering WordPress/gutenberg#32102 - Remove gutenberg domain from core blocks WordPress/gutenberg#32152 - Use the block editor context class for the the different settings filters WordPress/gutenberg#32159 - Fix Latest Posts block grid view WordPress/gutenberg#32160 - Fix preset classes generation per block WordPress/gutenberg#32190 - Fix logic to enable custom colors and gradients WordPress/gutenberg#32200 - Update the Site Logo logic to use a dedicated site option WordPress/gutenberg#32229 - Limit the Latest Posts block’s featured image width WordPress/gutenberg#32245 - Remove opacity animation in the canvas. WordPress/gutenberg#32266 - Make the focus style valid CSS WordPress/gutenberg#32305 - Fix theme.json styles for the core/list block WordPress/gutenberg#32343 - Fix PHP notice when calling render_block WordPress/gutenberg#32135 Props nosolosw, noisysocks. See #52991. Built from https://develop.svn.wordpress.org/trunk@51051 git-svn-id: http://core.svn.wordpress.org/trunk@50660 1a063a9b-81f0-0310-95a4-ce76da25c4cd
Description
Updates the welcome guides in
edit-post
,edit-widgets
andcustomize-widgets
so that they use images that are served fromwp-admin/images/block-editor/*
instead ofdata:
URLs that are included in the JavaScript bundle. This should significantly reduce the bundle sizes ofedit-post
,edit-widgets
andcustomize-widgets.
WordPress/wordpress-develop#1269 is the Core PR which adds the images to
wp-admin/images/block-editor
.How has this been tested?
You'll be testing WordPress/wordpress-develop#1269 and this PR at the same time.
wordpress-develop
repo, check out Add images for block editor's Welcome Guide wordpress-develop#1269, build usingnpm i; grunt build
.gutenberg
repo, check out Update Welcome Guides to use external image URLs #32026, build usingnpm i; npm run build
.wp-env
, modifygutenberg/.wp-env.json
to set"core": "/path/to/wordpress-develop/build"
, then runwp-env start
.Checklist:
*.native.js
files for terms that need renaming or removal).