-
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
Add option to add other types of blocks to navigation block #22096
Comments
Social links should be exposed as its own block, not the child blocks themselves (which can only be inserted within a social-links parent). |
I've always found the current behavior of the + button in the Navigation block confusing. Having the inserter show makes a lot of sense to me. I'd expect to be able to add the Heading, Paragraph, Image, and List blocks to my navigation. I'd also expect a way to add the Columns block in a sub-menu, but that likely requires a lot more work. |
Thanks for the feedback everyone. I think we can then move this to 'needs dev' and note the following as a potential starting point:
The one I ponder is list, but happy for that to just be me. I would also like search to be considered as a later iteration. |
My main worry for this is whether the "Link" is sufficiently clear as the primary item. Should we have variations of the "link" block that are "Page", "Post", "Category" to help streamline the action? (Note this was discussed very early, when we didn't have variations, and it meant creating separate blocks for each type of link, which was determined undesirable.) |
Interesting, I actually like the idea of various links, it's a great way to stop those massive searches: Note the icons are just there to suggest and would need to be worked out. Then the link interface would just adapt based on entry point selected. I am half wondering if the fast row interface works better for adding over a full library here. Similarly, I am not convinced that search is needed. Here are some variations around that, putting back on feedback label as that can be opened. |
Yeah, a simple list feels better than a 3-column layout... actually, I think we should consider using a list in all forms of the block inserter. Using block variations to show the Navigation Link block multiple times with different presets is a clever idea. I'm not sure how exactly it would work in practice, though. Wouldn't it require creating block attributes that exist solely for determining which placeholder UI to use? Or can block variations also set local state? |
Looks great! I also prefer the fast row interface, the "Add to navigation" label also helps clarify things. The regular 3-column layout might confuse users that you're adding blocks, but not navigational items. Some ideas:
|
@rickybanister That's a really neat mockup, though I wonder how it would work with languages like German where words tend to be a lot longer. (That tends to be the biggest issue with using tabbed interfaces.) It looks like there's barely any room for the 4 tabs as-is. I think when a person goes to add something to a Navigation, once they've chosen what kind of thing they're adding, they don't need to go back and change it. Perhaps an interface where "Pages", "Posts", etc. are all provided in a vertical list, and after selecting one, the popover switches to a list of the kind of thing you chose (plus a search bar). Then again, that's not so different from the vertical-list-style inserter idea, so maybe we should just go with that. |
Could you show a flow (a few screenshots, not necessarily a full prototype) of the steps you would take to add a paragraph to describe what a sub menu does? Its a good use case and I think a full flow would more clearly illustrate the effectiveness of both design options. (or surface another) |
The complexity of this block with just links is very... complex. Adding more items/blocks to the mix is a good idea for a future iteration. But right now, I'd like to see us get the link interface dialed in first. To help bring this full circle, there were some early post/page/link explorations which may spark more ideas: #13690 (comment) |
Question, which story are the works above solving for: Story: I would like the option to add different blocks like paragraphs, lists, headers,etc to my primary and sub navigation, so that I can create a robust navigation structure that includes more than text links. or is it Story: I would like the option to add different blocks to my sub navigation while keeping text links as my primary navigation option. I want this so that I can maintain a clean/clear primary navigation structure, while providing a more robust sub navigation that could house things like paragraphs, lists, videos, images, etc. If they aren't solving for either, then could you share the story(ies) it is solving for.
In this scenario, couldn't a person achieve this by grouping a navigation block, and paragraph block? To make it "global", couldn't they a) make the group (pattern) reusable b) place it in a global template area if the group live in the header, footer, or sidebar? |
Thanks for the feedback on this. A little status update that has come from this discussion and conversations around the original idea posed by @mtias. For now, this is going to be put to one side, however, that doesn't mean I won't be updating and responding to feedback. That also doesn't mean others can't jump in and continue their explorations, there are some idea seeds would be great for others to explore. Let's recap a bit and update though as some questions were raised that it's worth before pausing to respond to. FlowI have created a very rough flow of what adding text for subnav could be like. I know @kellychoffman asked for that, so spun this up fast to at least show the steps. Note, this uses all existing interfaces and shouldn't be considered an ideal final flow, that's for deeper exploring. In this very rough flow, however, it shows how you could:
This is just one very clunky example, but it shows the flow without the one of adding a link. I also did a rough one of simply adding the link that uses all existing flows, over adding new. Sub-navigation has some work in development for improving that experience #22087, so it's worth noting to split that out from this flow. Similarly, columns block behaviours are probably good to learn from, but there's complexity with the toolbars in a small space, that could do with iteration. This iterating would benefit not only navigation but any child or group blocks. Questions answeredNow, there were a few questions I wanted to ensure got some replies.
I love that idea @ballio2000 and potentially this could see some exploring around the block library itself as far as an iteration.
I'm nodding as I suspect this could happen and I love the idea of it being supportively predicting and saving time. @rickybanister I think potentially the link interface itself could benefit from your improvements, navigation block or not. I personally love tabs for a solution in these little box interfaces.
After chatting to @mapk, you confirmed this was the moving of child blocks. I agree that they need refining, I don't think one is a blocker for this work, however, there is an opportunity for wider exploration which we now have. The link interface itself is another story and right now is pretty solid as far as iterations go, although I wouldn't mind seeing the exploration by Rick in PR to see what it feels like for all links. @olaolusoga your first story seems close to the intention. I would caution against opening up all blocks. I think having a strong use case for any block is key here and should have each looked at individually. For example, video strikes me as a less common and potentially problematic addition.
Potentially, I think that knowing to group and the learnt behaviour of this is quite a tall order for most people using the editor though. That could indicate grouping needs iteration to level that steep learning path though. |
Yes, moving blocks is one aspect. There's a few others that can help the Navigation block:
I'd like to see us nail these down and really create a good Navigation block experience (with just links) before we add more complexity. Thank you, @karmatosed, for all this great work! |
Unable to add native menus? |
I see you're making the rounds, @javierlorente. I answered you on the other issue where you asked that question. 😄 |
Quick update on this issue:
There are some issues that need to be resolved:
With these fixed we can then proceed with building out the rest of this feature:
|
Closing this in favour of #24364 which overviews at a high level how this feature will work and what the next steps are. |
In the current implementation of the navigation block, you are limited to adding a link. In talking about iterating the sub-navigation experience, @mtias brought up a good use case for this of having a paragraph describing what a sub-menu does. We might want to limit what you can add in terms of blocks, but at least being able to just add longer text makes sense.
Option 1: block selection step
This would show the block library where you would pick the type to add. I would suggest limiting this, perhaps to the following:
As you can see, this also could allow the social links to be added if wanted.
Option 2: allow longer text to be added
This option takes out the block library and allows you to write longer-form easier within the existing link. I haven't mocked this up as for me this isn't as flexible and limits. It might be an easy short-term win.
Feedback
I am looking for specific feedback on next steps here. For me, the easiest is to just add a block selection step and then have the flow unchanged.
The text was updated successfully, but these errors were encountered: