-
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
Navigation block: Add core/buttons
to the allowed blocks.
#53966
Conversation
Size Change: +67 B (0%) Total Size: 1.51 MB
ℹ️ View Unchanged
|
@@ -424,6 +424,7 @@ function LinkControl( { | |||
) } | |||
onChange={ ( { opensInNewTab } ) => { | |||
onChange( { | |||
...internalControlValue, |
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.
Fixed the disappearance of attributes such as url
when open in new tab
is clicked.
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.
That's been fixed #53949
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.
Let's rebase this PR.
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.
Rebased now. Looks like it's working right.
1f52bfb
to
8b15535
Compare
Rebased. Could you review it again? |
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.
This looks like a great idea. I would also love to see the buttons block being added to the list of blocks that can be inside submenus.
What?
core/buttons
can be added to innerBlocks of navigation block.fix #35924
Why?
Designs with buttons at the end of the navigation are commonly used on various websites, and you can find such themes in the WordPress theme directory. Here is an example
https://wordpress.org/themes/next-business/
https://wordpress.org/themes/gutenify-lynx/
https://wordpress.org/themes/blockverse/
https://wordpress.org also uses this type of navigation.
It is also common for menus to include buttons when the navigation is collapsed. (Like wordpress.org.)
Using a buttons block on the navigation block makes it easy to achieve these designs without writing any CSS or special classes.
How?
add to
core/buttons
toALLOWED_BLOCKS
.Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast