-
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
Ability to save Nav blocks locally without creating a wp_navigation post. #38278
Comments
Do you have a temporary way to edit the menu block code? @getdave I don't know how long it takes to get this solved. Any hint would be appreciated. |
@word-x I have documented a solution to accessing Navigation block inner blocks in this video. I hope that helps?
The menus are blocks so the best medium for editing them is in a block editor. You might like to review this Issue which tracks the need to have the ability to edit menu items in isolation. |
Yes, I watched this video. |
Reporting a comment from @fabiankaegy:
|
@fabiankaegy I will defer to @WordPress/gutenberg-design on this one but I don't think we want to introduce friction into the insertion experience. We used to have an experience like that and design were very keen to guide us away from that and have the block "just work". The aim is to hide the complexity of the concept of sync'd navigations as that's not really something the user should have to care about. I think that approach is pretty valid when you consider the 80% use case is likely to be the requirement for a synced navigation. That's not to say I don't agree with the use case you outline. But I would like to see the mechanism for switching to unsynced be something you have to find and activate rather than something you are required to choose each time you insert a block. Perhaps a @richtabor has an idea for how this could function. Maybe a "detach" option somewhere. Technically, we'd have to refine the logic for the block to ensure that if a user has added the I'm curious to hear how important you feel this feature to be relative to the items currently listed on the tracking issue. Thanks again for taking the time to provide feedback 🙇 |
Hey @getdave 👋 I think the fact that I mixed two different issues there made my comments more confusing. When I proposed the addition of the placeholder when inserting a new navigation, that had nothing to do with unsynced vs. synced navigations. I agree that is an issue that should be considered. But the issue for which I added the mockup is that I currently find it's to difficult for a user to switch between navigation menus in the navigation block. And when you insert a new navigation block today it's not obvious which menu was selected and even that it is synced. So I often run into the issue that someone inserts the navigation block and changes the items in the menu without realizing that it affects other navigation blocks also. Because of that I very much believe that the friction we would be adding would actually be a good thing because it would allow users to understand whether they want to display an existing navigation or display a new one. And for starters I would also expect that creasing a new one would create a new synced one. I think that issue is different from unsynced navigations |
What problem does this address?
Currently when creating a Navigation block a
wp_navigation
post is automatically created and all inner blocks are saved to that post.It is therefore not possible to create a Navigation block that is local to a specific post context. This also means that anyone without the
edit_theme_options
capability cannot create Navigations even if they are only for the purpose of a single page (as opposed to global).What is your proposed solution?
Add a means by which users an opt to save the Navigation block items locally to the current post. In such cases no Navigation Post would be created and the block would use standard uncontrolled inner blocks.
cc @spacedmonkey who has previously discussed this with me.
The text was updated successfully, but these errors were encountered: