#52991 closed task (blessed) (fixed)
Editor: Update WordPress packages to use with WordPress 5.8
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 5.8 | Priority: | normal |
Severity: | normal | Version: | 5.8 |
Component: | Editor | Keywords: | has-patch has-unit-tests |
Focuses: | Cc: |
Description
In the response to the discussion during the Dev Chat, I'm opening a ticket to group all efforts to keep WordPress packages up to date in the WordPress 5.8 release cycle:
@clorith started a discussion on more frequently merging updates from the Gutenberg plugin in to Core. Highlighting that this would make testing future releases of WordPress features easier without keeping track of which features will remain in the plugin for the time being. There was general support for the idea. @chanthaboune is offered her help to move this forward
https://make.wordpress.org/core/2021/03/25/dev-chat-meeting-summary-march-24-2021/
Change History (89)
This ticket was mentioned in Slack in #core-editor by gziolo. View the logs.
4 years ago
This ticket was mentioned in PR #1175 on WordPress/wordpress-develop by gziolo.
4 years ago
#2
- Keywords has-patch added
4 years ago
#4
Committed in https://core.trac.wordpress.org/changeset/50685 without the dummy commit.
Trac ticket remains open.
This ticket was mentioned in PR #1176 on WordPress/wordpress-develop by gziolo.
4 years ago
#6
Trac ticket: https://core.trac.wordpress.org/ticket/52991
I executed npm run wp-packages-update
and npm run build:dev
to update the block editor to the latest version based on WordPress packages published to npm.
4 years ago
#7
I’m surprised to see it happening, but it looks like the update for WordPress packages works on the first try in core. The version of the Gutenberg plugin (v10.3.1) is ready to land:
https://github.com/WordPress/wordpress-develop/pull/1176
It would be great to learn which PHP changes are missing and need to be backported, but I think we can do it separately. I haven’t tried enabling FSE features or installing the Gutenberg plugin.
youknowriad commented on PR #1176:
4 years ago
#8
I think we should compare the "lib" folder between the two Gutenberg versions used previously and the new one.
youknowriad commented on PR #1176:
4 years ago
#9
Do you know which version was used before?
youknowriad commented on PR #1176:
4 years ago
#10
I think for instance, that there are a number of changes to the block-supports folder (all of them maybe?) that should be backported.
4 years ago
#11
Do you know which version was used before?
Not yet, but I'm going to check it soon.
There are some changes in how blocks are aligned when the plugin gets activated:
<img width="1917" alt="Screen Shot 2021-04-07 at 14 43 19" src="https://user-images.githubusercontent.com/699132/113868198-b663d900-97af-11eb-89a6-21707f4176d1.png">
The most important part is that it works with the plugin installed so it feels like we can merge those changes as the first step and backport all the missing bits afterward. What do you think?
youknowriad commented on PR #1176:
4 years ago
#12
The most important part is that it works with the plugin installed so it feels like we can merge those changes as the first step and backport all the missing bits afterward. What do you think?
I don't know to be honest, I wouldn't want to merge a broken experience personally, at least we should identify them and have tickets for them. I'm going through some of theme right now https://github.com/WordPress/gutenberg/compare/v9.9.3...v10.3.2
For example, I see the lazy loading related changes as well.
4 years ago
#13
Many of the changes are behind the feature flag for FSE themes on PHP side. I'm not sure how much of the code is also removed from the JS build for those features marked as experimental which is most of the FSE blocks.
youknowriad commented on PR #1176:
4 years ago
#14
Here's what I got so far, I only kept the changes that should probably be backported (not experimental things)
- Block Supports changes (even if it uses experimental flags, these flags are used in Core blocks, so this is mandatory)
- Inline lazy loading (I don't know if this impacts the experience if not backported, maybe it's optional and should have its own ticket)
- New style handles to register and tweak dependencies (classic.css and reset.css, reusable-blocks.css). this is very important
- Prevent the default editor styles from being loaded. this is very important too
- Update Reusable block CPT labels
- editor settings function (you know better for this one)
- WP_REST_URL_Details_Controller (not sure about that one and whether it's used by stable JS things)
- Layout block support and « supportsLayout » editor setting. (this might require some theme.json related stuff so we could potentially skip until we backport theme.json stuff)
- New block category (theme) though maybe it’s just for FSE blocks now (need to confirm that)
4 years ago
#15
Thank you @youknowriad for checking. I converted your comment into todo list and marked the last item as done. I took care of it 2 weeks ago.
4 years ago
#16
Inline lazy loading (I don't know if this impacts the experience if not backported, maybe it's optional and should have its own ticket)
@aristath, can you help us decide whether it's mandatory to include for WordPress 5.8?
draganescu commented on PR #1176:
4 years ago
#17
4 years ago
#18
inline lazy styles loading has no JS dependencies so it can go in 5.8 👍
It is completely opt-in (by default enabled for FSE but otherwise opt-in is required) and won't break anything out of the box, so it would be great to have it in core and allow developers to start taking advantage of it.
youknowriad commented on PR #1176:
4 years ago
#19
@aristath I'm reading that it can go into its own dedicated ticket right? And updating the packages won't break anything if it's not done at the same time?
4 years ago
#20
@aristath I'm reading that it can go into its own dedicated ticket right? And updating the packages won't break anything if it's not done at the same time?
Yes, updating the packages won't break anything if not done at the same time. It _can_ be a separate, dedicated ticket.
youknowriad commented on PR #1176:
4 years ago
#21
Did another review of the diff and checked a few items on the list, I think we're good.
We're missing two things:
- the editor settings refactoring (this can potentially be separate as I don't think it impacts frontend, it's just a refactoring)
- lazy loading (can we create a ticket and link to it as a reference)
There are three things that we should remember to do when back porting theme.json changes (if they land on 5.8)
- Fully backport the layout block support,
- Add a conditional check about the "classic.css" dependency in the style loader (only load it for non theme.json themes),
- Add the supportsLayout editor setting.
4 years ago
#22
I will fix the issues reported by CI, improve PHPDoc comments and test locally.
We're missing two things:
- the editor settings refactoring (this can potentially be separate as I don't think it impacts frontend, it's just a refactoring)
- lazy loading (can we create a ticket and link to it as a reference)
Right, those can land separately 👍🏻
We also need to add unit tests for newly added functionality in the follow-up patches
- block supports
- align
- border
- colors
- custom classname
- generated classname
- layout
- padding
- typography
block_has_support
4 years ago
#24
All changes committed in https://core.trac.wordpress.org/changeset/50761.
youknowriad commented on PR #1176:
4 years ago
#25
Would love if we can run the e2e tests against trunk. I tried running the command but it's failing because of wp-env somehow.
peterwilsoncc commented on PR #1176:
4 years ago
#26
Thanks for following this up folks. It looks like my instinct was correct that it would require more than a simple package update so I'm glad I left it for the experts. :)
4 years ago
#27
@peterwilsoncc, actually I also backported changes from 5.7.1 in https://github.com/WordPress/wordpress-develop/commit/a45c8715410b1f362218da80eda9bd0248fd5503 as a temporary step. However, @youknowriad helped to identify missing PHP changes and here we are enjoying all the latest stable features of Gutenberg in WordPress trunk
😄
This ticket was mentioned in Slack in #core-editor by gziolo. View the logs.
4 years ago
This ticket was mentioned in Slack in #core-editor by gziolo. View the logs.
4 years ago
This ticket was mentioned in PR #1226 on WordPress/wordpress-develop by gziolo.
4 years ago
#30
Trac ticket: https://core.trac.wordpress.org/ticket/52991
First pass, I haven't tested it yet. I plan to take care of it tomorrow.
4 years ago
#31
There is one more thing left that I almost missed. For the File block, we need to add an entry point for the JS file used on the frontend.
4 years ago
#32
There is one more thing left that I almost missed. For the File block, we need to add an entry point for the JS file used on the frontend and exposed under the
wp-block-library-file
script handle.
It's a more complex task than I anticipated. Let's land the changes include already and tackle changes to the build system separately.
4 years ago
#34
Landed with https://core.trac.wordpress.org/changeset/50824.
This ticket was mentioned in PR #1257 on WordPress/wordpress-develop by gziolo.
4 years ago
#35
Trac ticket: https://core.trac.wordpress.org/ticket/52991
## TODO
It needs more work. All newly exposed core blocks aren't registered on the server. It requires changes in webpack build and some references for PHP files for most of the blocks.
youknowriad commented on PR #1257:
4 years ago
#36
I updated the todo list with a few required items as well.
4 years ago
#37
Site Logo block registers 3 filters in addition to block registration:
https://github.com/WordPress/gutenberg/blob/bed089677e91b4ae00916645139c7f806f46ce8b/packages/block-library/src/site-logo/index.php#L74-L75
https://github.com/WordPress/gutenberg/blob/bed089677e91b4ae00916645139c7f806f46ce8b/packages/block-library/src/site-logo/index.php#L126
Do you think we should apply those changes directly to WP core?
4 years ago
#39
I scanned quickly changes applied between 10.5 and 10.6 and I might have covered all of them with the last commit. We need to double-check: https://github.com/WordPress/gutenberg/compare/release/10.5...release/10.6.
I backported all changes for block supports in https://github.com/WordPress/wordpress-develop/pull/1257/commits/934ec7a4b25af80142b5cc09ce2f27d8e8e36edf. I left there 2 TODO items where I had to removed logic that depends on Global Styles in the layout support. It's something we need to explicitly list for the next round so it's wired correctly.
4 years ago
#40
I found the logic that is related to:
Some php changes to support the iframed template editor
It looks like something that could be done separately.
youknowriad commented on PR #1257:
4 years ago
#41
@gziolo did we include the 10.6.1 package update and php changes here?
4 years ago
#42
did we include the 10.6.1 package update and php changes here?
If 10.6.1 was applied this week, then the answer is no.
youknowriad commented on PR #1257:
4 years ago
#43
I noticed that the editor styles are not applied properly (compared to the plugin), not sure why. You can compare with tt1 theme, you'll see that the background is not applied
youknowriad commented on PR #1257:
4 years ago
#44
Nevermind, I was testing with tt1-blocks and theme.json based styles are not backported yet, so we're all good here.
4 years ago
#46
I removed the Site Logo block for now because it creates too much friction, and I couldn't find a simple way to make failing tests pass without changing assertions. It needs to be investigated separately.
4 years ago
#48
Closed with https://core.trac.wordpress.org/changeset/50929.
This ticket was mentioned in PR #1273 on WordPress/wordpress-develop by youknowriad.
4 years ago
#51
Trac ticket: https://core.trac.wordpress.org/ticket/52991
## TODO
- [ ] Remove the Post Author PHP code.
- [ ] Check PHP changes between 10.6 and 10.7.
youknowriad commented on PR #1273:
4 years ago
#52
I think I included all the mandatory php changes but would appreciate confirmation https://github.com/WordPress/gutenberg/compare/v10.6.0...v10.7.0-rc.1
4 years ago
#53
I assume that the changes for Block Patterns will be handled separately or do we keep the default ones in WP core for now?
4 years ago
#54
Two follow-ups required:
- Porting
gutenberg_extend_block_editor_styles_html
but I guess it's related to the template editor integration task - Site Logo block needs to be integrated on the server together with changes to the REST API endpoint with settings (theme_mods and stylesheet changes).
4 years ago
#56
Committed with https://core.trac.wordpress.org/changeset/50945.
#57
@
4 years ago
AM src/wp-includes/block-supports/elements.php
This has caused a PHP Notice, See https://github.com/WordPress/gutenberg/pull/32135
<?php echo render_block( array( 'blockName' => 'wporg-learn/workshop-details' ) ); ?> E_NOTICE: Undefined index: attrs in wp-includes/block-supports/elements.php:20
This ticket was mentioned in PR #1319 on WordPress/wordpress-develop by youknowriad.
4 years ago
#61
This includes the following PRs
- Generate babel polyfill dynamically https://github.com/WordPress/gutenberg/pull/31279
- Improve the List View component https://github.com/WordPress/gutenberg/pull/31290 https://github.com/WordPress/gutenberg/pull/32063
- Template mode:
- Fix embed dimensions https://github.com/WordPress/gutenberg/pull/32057
- Update the welcome guide https://github.com/WordPress/gutenberg/pull/32055 https://github.com/WordPress/gutenberg/pull/32026
- Don’t display the notice at the same time as the welcome guide https://github.com/WordPress/gutenberg/pull/32076
- Remove MetaBoxes https://github.com/WordPress/gutenberg/pull/32315
- Update the title area https://github.com/WordPress/gutenberg/pull/32037
- Widgets Screen:
- Fix unsaved changes https://github.com/WordPress/gutenberg/pull/31757
- Fix toolbar alignment https://github.com/WordPress/gutenberg/pull/31991
- Fix block toolbar position after scroll https://github.com/WordPress/gutenberg/pull/32212
- Fix the visible widget area header https://github.com/WordPress/gutenberg/pull/32262
- Fix legacy widgets preview https://github.com/WordPress/gutenberg/pull/32260
- Block Widgets in the customizer:
- Fix customizer title overlapping block toolbar https://github.com/WordPress/gutenberg/pull/32140
- Fix styling issues https://github.com/WordPress/gutenberg/pull/32072
- Fix escape key events https://github.com/WordPress/gutenberg/pull/32175
- Add preferences menu group label https://github.com/WordPress/gutenberg/pull/32259
- Fix creating and replacing legacy widgets https://github.com/WordPress/gutenberg/pull/32005
- Fix the welcome guide’s image https://github.com/WordPress/gutenberg/pull/32264 https://github.com/WordPress/gutenberg/pull/32302
- Fix Cover to Image transform duotone error https://github.com/WordPress/gutenberg/pull/32006
- Remove filter_var usage from blocks https://github.com/WordPress/gutenberg/pull/32046
- Fix image width for aligned Post Featured Image block https://github.com/WordPress/gutenberg/pull/32070
- Prevent excessive Image block re-rendering https://github.com/WordPress/gutenberg/pull/32102
- Remove gutenberg domain from core blocks https://github.com/WordPress/gutenberg/pull/32152
- Use the block editor context class for the the different settings filters https://github.com/WordPress/gutenberg/pull/32159
- Fix Latest Posts block grid view https://github.com/WordPress/gutenberg/pull/32160
- Fix preset classes generation per block https://github.com/WordPress/gutenberg/pull/32190
- Fix logic to enable custom colors and gradients https://github.com/WordPress/gutenberg/pull/32200
- Update the Site Logo logic to use a dedicated site option https://github.com/WordPress/gutenberg/pull/32229
- Limit the Latest Posts block’s featured image width https://github.com/WordPress/gutenberg/pull/32245
- Remove opacity animation in the canvas. https://github.com/WordPress/gutenberg/pull/32266
- Make the focus style valid CSS https://github.com/WordPress/gutenberg/pull/32305
- Fix theme.json styles for the core/list block https://github.com/WordPress/gutenberg/pull/32343
- Fix PHP notice when calling render_block https://github.com/WordPress/gutenberg/pull/32135
The PHP changes are not backported yet, we need to check this diff:
https://github.com/WordPress/gutenberg/compare/51adf3de548dcf49173d96028c1b3ae447d63859...wp/trunk
4 years ago
#62
Fix for enabling custom colors and gradients.
This was already ported.
I've prepared https://github.com/youknowriad/wordpress-develop/pull/1 to address:
- Update elements block supports.
- Theme.json presets classes changes and unit test.
noisysocks commented on PR #1319:
4 years ago
#63
The PHP changes are not backported yet, we need to check this diff:
I had a quick look through and confirmed that all of the widgets PHP changes are to do with making the Gutenberg plugin compatible with core and so don't need to be ported to core.
youknowriad commented on PR #1319:
4 years ago
#65
Committed.
This ticket was mentioned in PR #1338 on WordPress/wordpress-develop by youknowriad.
4 years ago
#69
This updates WP to the latest WP packages. It includes the backports from https://github.com/WordPress/gutenberg/pull/32484
Trac ticket: https://core.trac.wordpress.org/ticket/52991
Todo:
- [ ] Changes related to theme.json and block supports
- [ ] Changes related to widgets editor
See the diff in https://github.com/WordPress/gutenberg/pull/32484/files
4 years ago
#70
Prepared https://github.com/youknowriad/wordpress-develop/pull/2 for the changes related to theme.json
and block supports.
noisysocks commented on PR #1338:
4 years ago
#71
Changes related to widgets editor
I only see changes to packages/block-library/src/legacy-widget/index.php
which should be copied over when grunt build --dev
is ran.
youknowriad commented on PR #1338:
4 years ago
#72
Thanks @noisysocks @nosolosw
youknowriad commented on PR #1338:
4 years ago
#74
Committed.
This ticket was mentioned in PR #1350 on WordPress/wordpress-develop by youknowriad.
4 years ago
#75
- Keywords has-unit-tests added
This updates WP to the latest WP packages. It includes the backports from https://github.com/WordPress/gutenberg/pull/32508
Trac ticket: https://core.trac.wordpress.org/ticket/52991
See the diff in https://github.com/WordPress/gutenberg/pull/32484/files
youknowriad commented on PR #1350:
4 years ago
#76
mmm looks like I created this branch on the core repo, I'll create another one on the fork.
This ticket was mentioned in PR #1351 on WordPress/wordpress-develop by youknowriad.
4 years ago
#77
This updates WP to the latest WP packages. It includes the backports from https://github.com/WordPress/gutenberg/pull/32508
Trac ticket: https://core.trac.wordpress.org/ticket/52991
See the diff in https://github.com/WordPress/gutenberg/pull/32508/files
youknowriad commented on PR #1350:
4 years ago
#78
Moved the PR here https://github.com/WordPress/wordpress-develop/pull/1351
youknowriad commented on PR #1351:
4 years ago
#80
committed.
This ticket was mentioned in Slack in #core by desrosj. View the logs.
4 years ago
#84
@
4 years ago
- Resolution set to fixed
- Status changed from new to closed
I believe everything here has been addressed.
Please open a new ticket for each beta and RC sync going forward.
#85
@
4 years ago
@ryelle, thank you for the follow-up. SVN ignore becomes the most annoying part in the process since you need to set it per every folder :(
@desrosj, I know it's on the radar but we really need to look after WP 5.8 is done into ways how we can improve the part of the build process that handles blocks the sync from WordPress packages.
Trac ticket: https://core.trac.wordpress.org/ticket/52991
This PR only updates development dependencies for WordPress packages to align better with the Gutenberg plugin.