-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Bring implementations of convert nav menu items to blocks back into sync #31602
Bring implementations of convert nav menu items to blocks back into sync #31602
Conversation
@@ -44,6 +44,14 @@ export const menuItemToBlockAttributes = ( { | |||
type: menuItemTypeField, | |||
target, | |||
} ) => { | |||
// For historical reasons, the `core/navigation-link` variation type is `tag` |
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.
Looks like this got removed. It needs to match the editor's implementation.
Size Change: +24 B (0%) Total Size: 1.31 MB
ℹ️ View Unchanged
|
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.
LGTM ✅
- Unit tests are passing.
- I can view/edit the menu in the editor.
- I can create a navigation block from the existing menu.
- Post tag variation is correctly displayed.
Thanks for the quick follow up @getdave! |
Description
It looks like recently there was a regression whereby the matching implementations of
menuItemToBlockAttributes
in the Nav editor and block got out of sync.This PR updates both sides and brings everything into sync following mine and @gwwar 's changes in the block and editor.
The fact that this happens points even more strongly towards the need for #31580 to land.
How has this been tested?
Check unit tests pass and both implementations still work correctly:
Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).