Backport layout block support layout definition and stabilisation changes for 6.3#4624
Closed
andrewserong wants to merge 7 commits intoWordPress:trunkfrom
Closed
Conversation
175edee to
083a757
Compare
Contributor
Author
|
@tellthemachines @ramonjd, I believe this PR is now ready for review. It'll likely want to wait until it can be tested with the JS changes backport, but I've given it a rebase and updated all the expected test strings, so I believe it's now consistent with where we'd expect it to be for Beta 1 🤞 |
Member
|
Code looks good to me. No frontend regressions. Packages should be release today so we can give it a final ✅ |
Contributor
peterwilsoncc
left a comment
There was a problem hiding this comment.
Spotted a few nit picks and one comment about naming things.
peterwilsoncc
approved these changes
Jun 27, 2023
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Trac ticket: https://core.trac.wordpress.org/ticket/58550
This PR backports the following PRs:
As the changes in this PR will need some JS changes to be backported first, this PR will likely need to land fairly late in the cycle before Beta 1 is released. More specifically, in WordPress/gutenberg#50621, the JS is updated to not depend on the PHP version of the layout definitions, and this PR will no longer pass the data to JS from PHP via block settings, so needs to land either at the same time as the JS changes, or just after.
Current status of this PR
This PR is generally working, however as the JS changes have not yet landed, layout support will be broken in the post and site editors. Once the JS changes have landed, this should be able to be merged straight afterwards.
A note on the size of changes in expected test strings
Prior to this PR, the Theme JSON class's tests used a data provider to use an artificially smaller set of layout definitions for the tests. With the layout definitions being moved to PHP, the tests now use closer-to-real data, and more accurately reflect the real CSS output of the layout styles.
To-do
This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.