Repository navigation
Description
Trying to capture here the approach for the "Navigation" section of the "design" subgroup, which was pulled out from 6.2 late in the cycle due to user experience shortcomings.
The overall goal of this panel is to allow users and site maintainers to be able to access, navigate, and modify their navigations without having to find them in a specific template in the site editor.
The challenges are — as per usual with navigations — that the spectrum of complexity goes from simple sites where a navigation is a 1:1 map to the user's pages all the way to large sites with multiple navigations or mega-navigations where data and presentation are more intertwined.
So here's an outline of the basic use cases to address:
Meta actions
Should be possible to delete, duplicate, add a navigation from the ellipsis button next to the drill down state, just like templates, pages, and parts.
- Navigation on Browse Mode: Add ellipsis menu #50583
- Navigation on Browse Mode: Add pages #50580 (refer to modal in Creation modal for "New Page" #48456)
If only one navigation and the navigation is simple:
- Show the navigation content directly and don't include the name of the navigation.
- Made of a single page list — we display the page list block and allow the normal edit operations we have on the navigation block itself (syncs pages by default; if reorder, then it doesn't, etc). Selecting a page goes into the details view of that page as normal.
- Made of mostly page items — if it's a custom navigation but with a few additions (like a search block) we still allow editing directly. If we detect blocks that are not just page list or links, we should allow editing the block as a focused template part by having some icon button for it prominently. (These navigations are operating both as high level data structure and template parts.)
Only one menu, and there are some non-standard blocks in it
If more than one navigation:
- Navigation on Browse Mode: List all navigations #50578
- Preview just the navigation on the frame like a template part upon selection.
If navigation is complex, do not allow direct edit but instead open focused template part mode.
All navigations are displayed by default as a list and don't try to do a "main navigation" outside of maybe grouping things differently. (A label for "main nav" and then "other navigations".) Each navigation can afford a drilldown level which goes back to the "only one navigation" items.
Conceptually the view for each navigation in focus mode is similar to the Style book, in that it shows the generic blocks as they exist. It still has value for the cases where you have multiple menus:
- It provides an easy overview of which menus you have saved
- It provides a single place to manage them
- You can edit them, even if you don't necessarily see the styles that might be applied by a wrapping navigation block or template part.
Tasks
- Navigation on Browse Mode: Remove existing editing functionality #50698
- Navigation on Browse Mode: List all navigations #50578
- Navigation on Browse Mode: Make navigations in the list selectable. #50579
- Navigation on Browse Mode: Add pages #50580
- Navigation on Browse Mode: Add edit button #50581
- Navigation on Browse Mode: "Grey out" non-link blocks #50700
- Navigation on Browse Mode: Add ellipsis menu #50583
- Navigation on Browse Mode: Back button #50584
- Navigation on Browse Mode: Add navigation list view to the template part editor #50704
- Navigation Focus Mode: Ability to access/edit Navigation Post items in isolation #37950
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fields✅ Done
- StatusShow more project fieldsDone
Activity
jasmussen commentedon May 8, 2023
Here's a first stab at this one. Let's unstick this one.
Only one menu, and the menu is pages only:
Only one menu, and the menu is mostly pages but has one or two non page items:
Multiple menus:
Multiple menus, and the menu is complex:
CC: @WordPress/gutenberg-design
[-]Menus on Browse Mode[/-][+]Navigation on Browse Mode[/+]scruffian commentedon May 8, 2023
I have some questions about this:
richtabor commentedon May 8, 2023
@jasmussen Do you have to have multiple navigations (with "complex" blocks), to then open in focus mode? So for sites with one navigation, you won't ever get to the focus mode, the "complex" blocks are just disabled, yea?
I had this same thought. I think the intent is not to focus on the template part, but just the navigation. It may be difficult to surface the surrounding template part.
I get that focusing on the menu is helpful to figure out what navigation element you're editing, but it does add complexity to the flow/diverging expectations (editing nav items in sidebar v. not). I wonder if the added lift is worth it — or is just disabling "complex" blocks and not focusing on the menu fine?
If the Navigation has any blocks other than link-based (Spacer, Logo, Search, Social, etc). I would think sub-menus would not classify the navigation as complex.
Yes
Yes
Should be editable via the LinkUI (if possible), same as we have today.
richtabor commentedon May 8, 2023
jasmussen commentedon May 8, 2023
richtabor commentedon May 8, 2023
@scruffian If we're using List View instead of the OffCanvas, would we get drag and drop/expanding children etc for free?
SaxonF commentedon May 9, 2023
A few more questions to consider:
+, what happens? Do we trigger Link UI?jameskoster commentedon May 9, 2023
We should mockup the isolated edit view as well.
Given settings and styles are governed by the container, I don't suppose we'll be able to include them in that view. Which raises the question: which settings and styles should be applied, and how do we help the user understand that to change these details (things like justification & orientation which seem crucial to navigation editing), they need to go and edit the containing template/template part?
draganescu commentedon May 9, 2023
@richtabor OffCanvas is a ListView so nothing would be lost. List view also has drag and drop but we don't support expanding the tree on hover while dragging (which is what I assume "expanding children" means).
@jasmussen do the conditionals in your comment apply to the whole website, or to the navigation present on the homepage? I assume the default content in the preview will be the homepage hence the question.
23 remaining items
jasmussen commentedon May 17, 2023
I've tentatively updated this issue with the most recent mockups as they appear to be solidifying. Let me know if that was in error.
getdave commentedon Jun 16, 2023
There has been a fair amount of progress here. We now have
✅ Listing Navigations
✅ Single Navigation
✅ Edit, Rename, Duplicate, Delete
✅ Focus Mode for Navigation
✅ Showing Navigation in Template Parts that contain a Nav block.
getdave commentedon Jun 26, 2023
Update: the only features that didn't land here are:
mtias commentedon Jun 28, 2023
@getdave thanks for the update. Let's follow up separately on the add page flow, I'm going to close this as done for now. Good work!
iamleese commentedon Jul 6, 2023
I'm currently testing WP 6.3 and I'm glad to see the Navigation option in the Editor. After playing around with it, there is a lot of redundancy and departs from the current user flow of the Editor to edit the patterns, templates, and styles. I would suggest we remove the sidebar completely after the menu selection and go directly into the editor so the flow would be:
Navigation > Menu Name > Editor
If it were to change like this, the only thing missing would be to edit the menu name itself.
Function-wise, If the navigation styles are dictated by the template they're placed it, it seems that the styles would be unnecessary and that the primary function of this feature would be to only edit labels and links.
Perhaps looking ahead, the Navigation area could expand to mega-menu building and styles might have to be preset within the menu. But for this release, if it's only meant to make editing the navigation easier, I think removing the style option would be best.
getdave commentedon Jul 7, 2023
Thank you for taking the time to provide feedback. It's very much appreciated and highly valuable.
My concern is that if we remove the sidebar we would loose the options menu that allows you to rename, duplicate and delete. This would make discoverability of these key features harder.
Also all other "focus" modes (e.g. Patterns) open with the sidebar so this would be inconsistent.
I also envisage the sidebar providing great utility in future releases - but that's subject to discover from @WordPress/gutenberg-design.
draganescu commentedon Jul 7, 2023
Thank you @iamleese - I do see your point regarding redundancy, it's true, and I think that one of the things we'd lose if we remove showing the navigation itself in the sidebar is the ability to navigate to pages and posts linked in the menu. So it's not an easy call. This is a very intuitive wayfinding option for many sites, particularly the ones which only have one menu. It's very easy to reason about editing some page if you see the exact menu you have on your website and find the page in it as you would on the front end.
Plus, the isolated editing also is probably going to serve more as a power feature, one where much discussed mega menus could be built (somehow). It's not a screen where everyone should land by default - particularly with the current scary barebones UI 😁