Include cascading properties in Navigation deprecation#36432
Merged
tellthemachines merged 2 commits intotrunkfrom Nov 29, 2021
Merged
Include cascading properties in Navigation deprecation#36432tellthemachines merged 2 commits intotrunkfrom
tellthemachines merged 2 commits intotrunkfrom
Conversation
|
Size Change: -15 B (0%) Total Size: 1.09 MB
ℹ️ View Unchanged
|
Contributor
|
Code looks good to me, but I would think it might need a code sanity check beyond what I can offer. Thanks for working on this. |
3d3d4e2 to
68912b0
Compare
Mamaduka
approved these changes
Nov 29, 2021
Member
Mamaduka
left a comment
There was a problem hiding this comment.
It works as expected, and the code looks good to me. Thanks, @tellthemachines.
noisysocks
pushed a commit
that referenced
this pull request
Nov 30, 2021
* Include cascading properties in nav deprecation * Update fixtures
youknowriad
reviewed
Dec 1, 2021
| "layout": { | ||
| "type": "flex", | ||
| "justifyContent": "left", | ||
| "setCascadingProperties": "true", |
Contributor
There was a problem hiding this comment.
What does this property on a "layout" object mean? Sounds very weird to me?
Contributor
There was a problem hiding this comment.
I see it's coming from #36292 I'll check there.
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.
Description
The Navigation block migration that handles the change to layout isn't adding
setCascadingProperties:"true"to the attributes, so migrated navigations are not getting the correct justification properties set.This PR adds that attribute and cleans up the code a little.
How has this been tested?
I think the easiest way to test this is switching to code view in the block editor, pasting in some deprecated nav markup such as
<!-- wp:navigation {"itemsJustification":"right","isResponsive":true} -->and saving. The saved content should show the updated attributes, includingsetCascadingProperties.Moving out of code view and adding a few items to the nav, the layout should reflect the justification/orientation attributes set.
Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist:
*.native.jsfiles for terms that need renaming or removal).