-
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: Add delete nav menu button #35981
Conversation
Size Change: +271 B (0%) Total Size: 1.08 MB
ℹ️ View Unchanged
|
|
92a4d3e
to
25199fa
Compare
25199fa
to
7bebfcd
Compare
7bebfcd
to
718c855
Compare
The issue with the entity saving process has a temporary fix now, so this is ready for review. It would be good to get in for 5.9. |
@jasmussen There's an issue for restoring the admin page, but it isn't straightforward (#36036). If that doesn't land, users will need a way to delete menus. I did wonder about a separate modal for managing menus as another idea.
I don't think this would be accessible. Using the keyboard, this menu would need to work as a grid, which unfortunately breaks the accessible menu concept. Any other thoughts? I don't a huge amount of time to iterate on this, so the simpler solutions are better. Could we lower the prominence of the button somehow? |
I think it's unfortunate that the inspector panel pushes down the visual appearance controls that are so important for the navigation block. I think a tool to delete menus might get buried if put under the "Advanced" collapsed-by-default panel, and my best other instinct, as noted, would be to have an item in the ellipsis menu next to Reusable blocks. If that needs to open a modal, perhaps that's a way forward. I know you feel these mockups might be a mouthful, but part of what they do by embracing the multi entity saving flow is to both reduce the weight of having to think about saving, but also in doing it only when you're done with the page, minimizing the potential proliferation of saved menus, reducing the need to delete them. Is there anything we can do to simplify that flow, but keep the principle the same? The placeholder plus selection dropdown is already in a good place per Isabels fast work, we don't need the snackbar, we can omit the "Unsaved" button from the toolbar until the menu has been saved, and we don't need the ability to rename menus in the multi entity saving flow. In my mind that means all that's left is to remove the modal to name the menu, and have the saving happen only as part of the multi entity saving step. Do you think that would be feasible? |
I don't really understand how saving helps a user delete a menu? |
Saving only once when you're done editing the page means you end up with fewer overall, reducing the urgency for a delete button, at the very least it reduces the need for it to be so prominent. |
Right, but it doesn't seem like it removes the need. |
My feeling is that renaming and deleting a menu aren't actions that are only for advanced users. They are, whether we like it or not, something many users will want/need to do. For example, people make typos. Or they accidentally create something and then realise they don't need it. Maybe we don't quite give the features the priority they have right now, but I do think they need to be accessible, not too hidden away. |
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 way I see it is that we're working on new foundational features without a UX designed. So we approximate. And when we approximate we get feedback as complex flows that reroute all work to new horizons instead of allowing us to make the next step. That means we can postpone the realisation of these designs to future iterations. Future iterations thay may very well be next week ;D
This is how the entire project moves, I don't see how this particular thing has to be different.
In this case, we can't work with independent menus that can't be deleted. Hopefully once the editing in isolation will crystalize the need to delete from the block will vanish or will be moveable to a secondary place. For now adding a button is a good stepping stone allowing us to figure out the lay of the land in the UX of managing reusable menus.
Maybe in the end we realise that the block theme system doesn't encuorage users to create useles superfluous menus, because of the direct manipulation UX. Then also the delete can be relegated to some accordion at the end of the inspector. But we don't know.
I'd go ahead with this PR so we can have something to move around later but also something to work with now.
I'll merge this one. If there's an alternative design that's relatively quick to achieve and doesn't hide the feature away too much, then I'm happy to look at it. |
Description
Adds a button for deleting 'wp_navigation' posts to the nav block's block inspector:
Deleting has a confirm step:
There's a bug in the multi-entity saving flow that needs to be shipped, preferably before this is shipped. When deleting an entity, it shows in the saving panel as an 'undefined' change 😬 :This should preferably be filtered out, deleting entities is immediate and doesn't need to be saved.
How has this been tested?
Types of changes
New feature (non-breaking change which adds functionality)
Checklist:
*.native.js
files for terms that need renaming or removal).