-
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 on Browse Mode #50396
Comments
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 |
I have some questions about this:
|
@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. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
@scruffian If we're using List View instead of the OffCanvas, would we get drag and drop/expanding children etc for free? |
A few more questions to consider:
|
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? |
@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. |
Wanted to pass along some related feedback from the FSE Outreach Program for this experience of having more than on menu and how folks are wanting to be able to select what's shown/manipulated there:
This echos what's already being thought of with multiple menus :) |
@jasmussen just to clarify this scenario, is it a Navigation that contains only a Page List block? Or a custom Navigation that contains only Page Link blocks? I think we need to consider both, and they may have slightly different affordances. With a custom menu, the + would allow you to draft new pages, or add any other navigation child (page link, custom link, search, etc). A custom menu would also support revisions. But Page List is less flexible, and may need to restrict you to drafting new pages only. Revisions probably don't make sense in this scenario either since Page List is synced automatically. Alternatively, it may offer the option to add things like custom links, search, etc., on the proviso that the navigation is converted to a custom menu first. At that point revisions come into play. |
This comment was marked as resolved.
This comment was marked as resolved.
That seems good to me. It's a shame the sync is lost, but that's a separate issue. |
This is important to me - as for a long time I thought the goal of the panel was to allow people to browse through their website and preview their pages and sections, helping in a way to find the place you want to edit. I guess this is still true but it is not the goal it's a side effect. With this goal a lot of what the navigation block does will be duplicated into the navigation screen of the site editor sidebar. I wonder if we should explore the idea of using blocks outside of their normal block list home? Just a though - I am not sure much will be gained by avoiding the duplication. I also don't think we have a good solution to share this functionality today because of how packages try to remain independent. |
@SaxonF some possible answers 👍🏻
This is not something that exists or will exist. All menus are wp_navigation CPTs which contain a restricted list of potential blocks (seel ALLOWED_BLOCKS of the navigation block edit component).
I assume you mean if you open a navigation in isolation? Yes why wouldn't we allow styling? Ideally it should be similar to opening a template part in isolation.
@jasmussen the way I understand in Matias' origina post is the plus on the top right is to add a new navigation. "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." - so that means in these mockups we need a way to add navigation elements via some other plus? @SaxonF that other plus should open something like the LinkUI yes - but potentially better than that popover madness.
Today it only removes the menu item. If we want to remove whole pages from this screen we need some more UI work to inform this is the consequence. But given the goal this screen has it should never be the case that we edit anything other than menus (data in the currently shown wp_navigation CPT, not the pages it links to)
This cannot happen. We explicitly disable recursion in a navigation block. Maybe you mean something else?
Currently you get a notification in the canvas. @jasmussen and I found there are two paths to consider:
|
I think Saxon means what if a menu exists but that menu is not assigned to a Navigation block instance. The answer that as far as I can see it would be fine. The menu would be rendered into the sidebar and you could interact with it however you'd like. If later you choose to assign to a particular Nav block instance then that's also fine.
One reason is that editing a menu in the sidebar makes it devoid of any particular design context. Let's say you create a menu in your header using the Nav block and then you add styling to the menu items. Then later that menu ends up being shown in the Browse Mode sidebar and you click through to "isolated" view. Then you start making visual changes. Then doesn't that risk you breaking the design of the Navigation in it's original location? For me, it's always been important that we put all the styling on the parent Navigation block and allow it to cascade down to menu items. If we do this then the items themselves remain as largely "data" and the parent is the supplier of context specific styling. |
Also here is a reminder that I explored Isolated/Focus mode for Navigation Menus here. |
This comment was marked as resolved.
This comment was marked as resolved.
For the [+] button, should we also account for adding existing pages to the current menu, if it is complex? There's also adding new menus to consider down the road.
Not yet I'm afraid, but the other panels are in this Figma, if you'd like to add Navigation. |
For the first iteration at least it won't be possible to add or rename navigations using the side bar in browse mode. |
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. |
There has been a fair amount of progress here. We now have ✅ Listing Navigations |
Update: the only features that didn't land here are:
|
@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! |
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. |
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. |
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 😁 |
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 there are some non-standard blocks in it
If more than one navigation:
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:
Tasks
The text was updated successfully, but these errors were encountered: