Uh oh!
There was an error while loading. Please reload this page.
Backport Layout block support refactor part 2 - #3254
Conversation
andrewserong
commented
Sep 15, 2022
@tellthemachines I believe this one is working correctly — it just depends on #3218 in order for the generated styles to be output. |
costdev
left a comment
There was a problem hiding this comment.
Thanks for handling this PR @andrewserong! I've left some thoughts below.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
| */ | ||
| public function data_wp_get_layout_style() { | ||
| return array( | ||
| 'should_return_empty_value_with_no_args' => array( |
There was a problem hiding this comment.
There was a problem hiding this comment.
I've updated the wording for each of these, thanks!
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
andrewserong
commented
Sep 16, 2022
Thanks for all the feedback @costdev! I believe I've implemented it all, so this should be ready for another look now 🙂 |
tellthemachines
left a comment
There was a problem hiding this comment.
Code looks good! In testing all the correct styles and classnames are output on the front end.
I also tested with the #3154 patch applied, and everything worked correctly in the post editor (minus some PHP warnings that are not related to this PR). I wasn't able to test the site editor because it doesn't load at all once #3154 is applied. It's likely that those packages are dependent on another PHP backport 🤔
| @@ -1,5 +1,5 @@ | |||
| <div class="wp-container-1 wp-block-columns has-3-columns"> | |||
| <div class="is-layout-flex wp-container-1 wp-block-columns has-3-columns"> | |||
There was a problem hiding this comment.
Does this keep wp-container-1 because it has non-default flex settings?
There was a problem hiding this comment.
Yes, columns set nowrap so it has a non-default setting from the perspective of the flex Layout type. Thanks for double-checking!
costdev
left a comment
There was a problem hiding this comment.
Thanks @andrewserong! Just one suggestion left from me then LGTM 👍
Uh oh!
There was an error while loading. Please reload this page.
costdev
left a comment
There was a problem hiding this comment.
LGTM 👍 Thanks for all the work on this @andrewserong!
andrewserong
commented
Sep 19, 2022
Co-authored-by: Colin Stewart <79332690+costdev@users.noreply.github.com>
18118b2 to
d64d61dCompareandrewserong
commented
Sep 20, 2022
I've given this a rebase, and confirmed that it's still working correctly on top of |
hellofromtonya
commented
Sep 20, 2022
I'm self-assigning for review and commit. |
costdev
commented
Sep 20, 2022
Test ReportSteps to Test
Expected Results
Environment
Actual Results
Supplemental Artifacts |
mukeshpanchal27
left a comment
There was a problem hiding this comment.
Thanks @andrewserong LGTM. Left one minor change.
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Mukesh Panchal <mukeshpanchal27@users.noreply.github.com>
hellofromtonya
commented
Sep 21, 2022
For this backport, I'll be reverting the DocBlock changes for
Instead, I'll do a follow-up coding standards commit to improve the DocBlock including updating the descriptions for the optional parameters (e.g. adding the word |
* Reverts changes not found in Gutenberg PR 40875 * Updates changes from Gutenberg PR 40875 for coding standards WordPress/gutenberg#40875
hellofromtonya
left a comment
There was a problem hiding this comment.
- Changes in this PR meet Core's coding standards ✅
- Other changes not found in the original GB PR have been removed (follow-up commit coming) ✅
- Per testing instructions, confirmed works ✅
- PHP 8.1 and 8.2 tests do not show any additional deprecation issues ✅
There are additional tweaks that could be done. However, to retain a more pure backport, those will be addressed in follow-up patch(es)/ commit(s).
This is ready for commit. Prepping commit now.
hellofromtonya
commented
Sep 21, 2022
Committed via changeset https://core.trac.wordpress.org/changeset/54274. Thank you everyone for your contributions! A follow-up commit is coming to address other changes that were not part of the original GB PR (such as DocBlock improvements). |
hellofromtonya
commented
Sep 21, 2022
DocBlock improvements suggestioned in this PR were committed via changeset https://core.trac.wordpress.org/changeset/54275. |

This PR is a follow-up to #3205 and backports the remaining parts of the layout block support.
Note: the updates to the server test fixtures are all expected changes — the updates to the Layout support are that we now also output semantic classnames for the layout types
(e.g.is-layout-floworis-layout-flex). Also, thewp-container-xxx` classname will no longer be output for many blocks that use the default layout settings.To-do
Backport testsEnsure it's working on top of Backport script loader: enqueue stored block supports styles #3218To confirm that it's working, you can manually copy the changes from #3218 on top of this PR, and in the rendered view of TwentyTwentyTwo theme, the space between styling of the row block should be output correctly as in the screenshot below (note the highlighted layout classnames that have been added there, too
is-layout-flex, etc):Trac ticket: https://core.trac.wordpress.org/ticket/56467
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.