-
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
Enable always on burger menu for responsive navigation menus. #35568
Conversation
Size Change: +523 B (0%) Total Size: 1.07 MB
ℹ️ View Unchanged
|
Closer now (b758795) 😉 The new design also proposes moving these settings to the root level panel instead of being under "Display settings", but that will require a bigger refactor; I think this is a good first step. |
I added a separate subheading: This particular subheading style is likely one we will want to revisit and unify. In this case, the change I'm making affects all |
.wp-block-navigation__responsive-container-close { | ||
display: none; | ||
&:not(.hidden-by-default) { | ||
&:not(.is-menu-open) { |
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.
The rules here are a bit hard to parse, but I think they make sense. But it would be good if a themer, perhaps @kjellr could take this PR for a spin with a theme that uses the existing responsive feature, to see that it works as it should?
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.
I tested this with a few existing block themes that had the responsive menu set to (what is now) "Mobile" and found no issues. @jeffikus and @scruffian are also giving it a quick spin too just to be sure but I feel pretty solid on this so far.
Alright, I've pushed some polish to this one, tested it thoroughly, and it feels like it's in both a pretty solid place featurewise, and in my testing, it works as intended with no ill side effects. The only missing thing is to add some back compat to existing themes that toggled on the previous Here's some test content for an existing menu that is set to "responsive":
|
I'm not sure if we should do this as there are labels from other controls inside |
For the time being, it's not touching labels, I agree that needs a more holistic look. It only touches h3's inside the inspector — and those appear to have been mostly unused for the inspector, so it feels safe enough to me. Also CC @ciampo related to the components/labels conversation around headings we had recently. |
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.
Thanks for working on this Vicente! LGTM!
I'd appreciate a check for the deprecation code though by you 😄
Thanks for the quick work on this one! |
Tested on Blockbase, Quadrat, Geologist, Seedlet Blocks and Mayland Blocks. Looks good on all of them. |
Tested, and it looks good to me too! Thanks everyone for contributing, fast iteration, and testing! It was beautiful waking up to all this activity 🙂 |
💯 |
`isResponsive` was removed in WordPress/gutenberg#35568, which broke several parts of the design. See WordPress/wporg-news-2021#53
`isResponsive` was removed in WordPress/gutenberg#35568, which broke several parts of the design. Similar changes were made in a corresponding commit to the global header/footer. Fixes #53
Description
Fixes #34783
Introduces an option to keep a Navigation Menu always hidden behind a burger menu.
Classnames and text are WIP.
How has this been tested?
Screenshots
Individual Switches
Toggle Group