-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
Backport layout block support layout definition and stabilisation changes for 6.3 #4624
Backport layout block support layout definition and stabilisation changes for 6.3 #4624
Conversation
175edee
to
083a757
Compare
@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 🤞 |
Code looks good to me. No frontend regressions. Packages should be release today so we can give it a final ✅ |
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.
Spotted a few nit picks and one comment about naming things.
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.