Skip to content

Navigation on Browse Mode #50396

Closed
Closed

Description

@mtias

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.

If only one navigation and the navigation is simple:

Only one menu, and the menu is pages only
  • 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

Only one menu, and the menu is mostly pages but has one or two non page items

If more than one navigation:

Multiple menus

If navigation is complex, do not allow direct edit but instead open focused template part mode.

Multiple menus, and the menu is complex

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

Activity

  1. added
    [Block] Navigation
    on May 5, 2023
  2. added
    Needs Design
    on May 8, 2023
  3. moved this to Needs design, or refresh in 6.3 Designon May 8, 2023
  4. jasmussen commented on May 8, 2023

    @jasmussen
    Contributor

    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 pages only

    Only one menu, and the menu is mostly pages but has one or two non page items:

    Only one menu, and the menu is mostly pages but has one or two non page items

    • Search block is shown as disabled. We may need to tune the colors to differentiate more.
    • Edit button is surfaced for the advanced editing.

    Multiple menus:

    Multiple menus

    • Each menu is listed directly in Navigation with drilldowns.
    • Each individual menu then falls back to earlier behaviors.

    Multiple menus, and the menu is complex:

    Multiple menus, and the menu is complex

    • When the menu has complex blocks (anything outside of a limited allow-list), we require you to edit the menu in focused mode, just like template parts

    CC: @WordPress/gutenberg-design

  5. moved this from Needs design, or refresh to Needs feedback in 6.3 Designon May 8, 2023
  6. changed the title [-]Menus on Browse Mode[/-] [+]Navigation on Browse Mode[/+] on May 8, 2023
  7. scruffian commented on May 8, 2023

    @scruffian
    Contributor

    I have some questions about this:

    1. What counts as a complex navigation? Does does a nested navigation count as complex?
    2. If a navigation has nested submenus, should I be able to expand it and edit the children?
    3. Should drag and drop work within this view?
    4. If a link is not a page on the site, should it just be disabled as with the search block example above?
    5. The view of the focussed navigation shows it within the context of a template part - is that deliberate? What should happen if a navigation isn't used in a template? It might be hard for us to know which navigation is used in which template.
  8. richtabor commented on May 8, 2023

    @richtabor
    Member

    When the menu has complex blocks (anything outside of a limited allow-list), we require you to edit the menu in focused mode, just like template parts

    @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?

    The view of the focussed navigation shows it within the context of a template part - is that deliberate? What should happen if a navigation isn't used in a template? It might be hard for us to know which navigation is used in which template.

    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?

    What counts as a complex navigation? Does does a nested navigation count as complex?

    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.

    If a navigation has nested submenus, should I be able to expand it and edit the children?

    Yes

    Should drag and drop work within this view?

    Yes

    If a link is not a page on the site, should it just be disabled as with the search block example above?

    Should be editable via the LinkUI (if possible), same as we have today.

  9. richtabor commented on May 8, 2023

    @richtabor
  10. jasmussen commented on May 8, 2023

    @jasmussen
  11. richtabor commented on May 8, 2023

    @richtabor
    Member

    @scruffian If we're using List View instead of the OffCanvas, would we get drag and drop/expanding children etc for free?

  12. SaxonF commented on May 9, 2023

    @SaxonF
    Contributor

    A few more questions to consider:

    • What if a menu contains blocks but isn't yet part of a navigation block? How does it look on canvas/in editor?
    • If you are editing a menu in the editor, do we allow styling of menu items?
    • When hitting +, what happens? Do we trigger Link UI?
    • When removing an item from a navigation, does it the remove the page itself or just the menu item? Since on menu item click it drills down to the page itself we need to make sure this is very clear.
    • What happens if a menu is part of multiple navigation blocks?
    • What happens if you remove a menu that a navigation block is currently using?
  13. jameskoster commented on May 9, 2023

    @jameskoster
    Contributor

    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?

  14. draganescu commented on May 9, 2023

    @draganescu
    Contributor

    If we're using List View instead of the OffCanvas, would we get drag and drop/expanding children etc for free?

    @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.

  15. 23 remaining items

  16. moved this from Needs feedback to Needs dev in 6.3 Designon May 17, 2023
  17. added
    Needs Dev
    and removed
    Needs Design
    on May 17, 2023
  18. moved this from 🎨 Needs design to 💻 Needs development in Gutenberg Phase 2: Customizationon May 17, 2023
  19. jasmussen commented on May 17, 2023

    @jasmussen
    Contributor

    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.

  20. getdave commented on Jun 16, 2023

    @getdave
    Contributor

    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.

  21. getdave commented on Jun 26, 2023

    @getdave
    Contributor

    Update: the only features that didn't land here are:

  22. mtias commented on Jun 28, 2023

    @mtias
    MemberAuthor

    @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!

  23. moved this from 💻 Needs development to ✅ Done in Gutenberg Phase 2: Customizationon Jun 28, 2023
  24. iamleese commented on Jul 6, 2023

    @iamleese

    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

    navigation_flow

    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.

  25. getdave commented on Jul 7, 2023

    @getdave
    Contributor

    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.

  26. draganescu commented on Jul 7, 2023

    @draganescu
    Contributor

    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 😁

  27. moved this from Needs dev to Done in 6.3 Designon Jul 12, 2023
  28. removed
    Needs Dev
    on Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    [Block] Navigation

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions