#58550 closed task (blessed) (fixed)
Update layout block support definitions to be handled by a function, stabilise the block support
Reported by: | andrewserong | Owned by: | isabel_brison |
---|---|---|---|
Milestone: | 6.3 | Priority: | normal |
Severity: | normal | Version: | 6.3 |
Component: | Editor | Keywords: | gutenberg-merge has-patch |
Focuses: | Cc: |
Description
Backport changes from the Gutenberg repo relating to stabilising the layout block support.
Two changes that would be good to group together include moving the layout definitions from being stored in theme.json
to being output by a PHP function, and stabilising the block support by looking layout support via the layout
key with a fallback to __experimentalLayout
.
These changes landed in the Gutenberg plugin in the following PRs:
- Move layout definitions: https://github.com/WordPress/gutenberg/pull/50621
- Stabilise layout block support: https://github.com/WordPress/gutenberg/pull/51434
Due to the relationship between the PHP and JS changes for moving layout definitions, backporting the above changes should likely land just after or at the same time as landing the JS packages update for WordPress 6.3.
A note: moving the layout definitions is technically a breaking change in case there were any themes or plugins attempting to override the layout definitions in theme.json
. This is unlikely to be common, as overriding layout definitions was both discouraged and the ability to do so was undocumented and would likely have broken block themes that attempted to do it.
Assuming the backports are approved and land for 6.3, I'll write up a dev note covering the change.
Change History (10)
This ticket was mentioned in PR #4624 on WordPress/wordpress-develop by @andrewserong.
16 months ago
#3
- Keywords has-patch added
#4
@
16 months ago
There is a single theme in the theme directory that uses the layout definitions incorrectly: https://wpdirectory.net/search/01H31P1EQSPHQXTY98TKZQG11H
@andrewserong commented on PR #4624:
16 months ago
#6
@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 🤞
@ramonopoly commented on PR #4624:
16 months ago
#7
Code looks good to me. No frontend regressions. Packages should be release today so we can give it a final ✅
#8
@
16 months ago
- Type changed from enhancement to task (blessed)
Converting to a task as this can ship after beta 1 is released.
Trac ticket: https://core.trac.wordpress.org/ticket/58550
🚧 🚧 🚧 This is a WIP and is not yet ready for review 🚧 🚧 🚧
This PR (will) backport 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 https://github.com/WordPress/gutenberg/pull/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.
## To-do