-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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 menu block: Adding menu items #13789
Comments
Updated the issue description — have some concepts coming later. |
This set of concepts explores two ideas: Search, and Search & Browse. These designs are built under the principle of the primary interface for a block is the content area of the block. Adding and removing pages are a key task in menu management, and as such, the interface for them should be inside the block itself. This is why I'm not presenting an option that includes a sidebar or modal. SearchThis is a remix of @sarahmonster's previous concept, but the idea is pretty much the same — paste in a link, or search for existing content. If the thing you're searching for doesn't exist, you can create a new page directly from the block. Pros
Cons
Search & BrowseA combination of the above, plus a browsing component. Browsing would act a bit like the current lists in both Pros
Cons
What do you think?
|
Awesome concepts here, @melchoyce! Adding items this way feels natural. Search
I love the ease at which this happens, however, would existing users struggle with the indication that they're only adding "pages" to the nav block, or could we imagine this as a way to help shift paradigms that "everything" is a "page"?
I think if it's a good search experience, this shouldn't be too bad. If anything I'd remember some sort of keyword with which to begin. Search & Browse The Popover looks great when tied to the "Add page" CTA, but in the last little mockup, I noticed the popover no longer does that after "Services" has been added. Should the popover still follow the "Add page" CTA? If not, maybe we should consider another way to show the triangle notch that doesn't leave it hanging.
I love this option!
How so? Just b/c of all the things that could potentially be listed? A lot to sort through, I would agree. But with the option of a "search" feature, I think it's still acceptable. Response to your questions
|
I think most folks already think this way — something that came up consistently in my chats with Happiness Engineers is that people don't really know the difference between page types in the first place.
Yeah, I just forgot to reposition the arrow. Good catch 👍
Yeah, worried about space and sites that have several dozen pages. I guess it's not much worse than how
I can explore that next! |
I'm leaning toward the "Search" over the "Search and Browse", primarily because it feels less intimidating—there's less stuff to look at and I feel less paradox of choice. I suspect for new users, this would be a more pleasant solution that won't require them to unpack WordPress' different content types. That said, there may be a way to allow users to browse for content if they can't find what they want. Could we offer a "Search or Browse" switch at the top to toggle between the two mechanisms? Or perhaps return a "Browse for content" option if the search yields no results, or few results? A few notes for accessibility considerations:
Some additional commentary here: https://www.a11ymatters.com/pattern/accessible-search/, but it would be great to get the accessibility team's input before we get too deep into the weeds here. (@LukePettway perhaps?) Given that this pattern is so similar to the patterns used for adding inline links and linking a button, this is a great opportunity to unify all these interfaces into a robust universal component that could then be reused across WordPress (and potentially to clean up the many different search interfaces). This could be an opportunity to unify these experience across the entirety of the product whilst also making a teensy accessibility win. |
Ah, I actually did mock this up. It appears when you search for a page that doesn't exist:
Yeah we need to do this, and it also needs to be updated in the existing component.
Would love this! |
@sarahmonster the article you linked is an excellent reference for how a search like this should work. Another good example is the one detailed here: https://haltersweb.github.io/Accessibility/autocomplete.html It outlines some of the more technical and content approaches to consider. I really appreciate the thought into having a fully visible label, especially since placeholder text should never serve as the label. As far as buttons, how would these component function? When you type in the search field, I assume a keyboard or AT user would press enter on the item they wish to add to the list. I feel like a button would only be necessary if you could select one or more than one option at a time but that seems like it might be more confusing. Content wise the results would need to have some assistive text to infer the type of content a result belongs to: post/page/etc. There are some considerations around the Create page button:
How often do users find themselves create a page in this menu? It might not be a bad idea to only display that if no results are found. (No Results Found for "search term", Create "search term" Page), you get the idea. |
All good points, thanks @LukePettway.
In the "search" example, you'd just pick one at a time. When you select it using any of input method (mouse, keyboard, etc.), the popover would close, and the menu item you selected is added. In the "search and browse" example, I was thinking that when you toggle a checkbox, you'd see the menu item you toggled added to the menu in realtime, and the popover would remain open until you click or re: Create Page button: At some point in another round of ideation, I tried this: But I think your ideas to hook into "No results found" works quite well — I'll give that a try. |
Drive-by comment, feel free to ignore: When I see a UI like the search & browse one, my eye is drawn to the browse area as it's bigger and I forget that search is usually better. What do you think about hiding the browse option and only revealing it when a user clicks "browse for a page" or something similar? That way users would be prompted to search first but could still browse if they wanted to... |
Search vs Search & Browse: I'm torn here. Search & browse feels more useful, but search is simpler. My sense is that I would be unlikely to remember everything I've created, so Search & Browse would likely aid discoverability. In the cons of Search & Browse, I wonder if you could expand on why you believe it wouldn't scale, and why different content types could add confusion? Feel there's more there that I'm not quite grasping. A few things @melchoyce shared:
Completely agree.
Love this! |
In the interest of restricting in-block interactions to only the core interactions, and moving more advanced options to the block inspector, an approach to explore here might be moving the "browse" part of the interaction into the inspector, and keeping only "search" in the block itself (with a link to easily jump to the advanced "browse" controls. |
Since design explorations have largely concluded here, I'm closing this ticket as non-actionable, and we can loop back to #13690 or new issues for any further conversation that comes up as development work progresses. Thanks everyone for all the feedback! 🙌 |
This is intended to splinter conversation from #13690 and allow us to focus the conversation on one part of the problem at a time. We'll loop back to the tracking issue when we've determined a path forward. For this issue, we're focussing on adding stuff to your menu:
How do I add a menu item to my navigation menu?
This issue assumes that you already have an existing menu on your page. How do you add more menu items to it?
We have a lot of prior art exploring this, which should provide a good view of the paths we've already gone down.
With these prior explorations in mind, here are some assumptions based on some initial research and conversations with Happiness Engineers at Automattic:
Do these assumptions sound correct? Is there anything additional we can do to validate them?
The text was updated successfully, but these errors were encountered: