-
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 Menu: handle overflowing Nav Items #18298
Comments
cc @mtias because you've mentioned this as an Issue. It's already on the board and we will address it. |
Needs decisionThere are now
@shaunandrews has also suggested having a "more" mechanic, but there we a number of edge cases / concerns raised by others around this. I've also worked on a mechanic for allowing the parent Block to consume the child Block's toolbar which could help. But I believe @mtias doesn't see this as something the Nav Block will make use of. I think we're at a point where we need to make a decision on the way forward. |
We have another approach as well: Wrap. #18431 It wraps it in the editor, and the frontend, keeping the two consistent. It's very little code, and it solves the overflow issue. |
I think to answer this we need to go back to the principles the Editor is going for. While we aren't aiming for perfect accuracy, we want for the Editor to match as possible the frontend experience. That should be the driving principle for this decision. As such:
Which means that the only two viable solutions are only:
tl;dr: Always wrap — I want to add a note here: long menus are bad. A design that "suggests" what happens for too long menus is actually beneficial in creating also better designed websites, because it nudges the user behaviour in the right direction. For this reason, it's not a problem if a long menu triggers a solution that might not look clean. Because ultimately it won't on the front-end, and it would create a worse experience for their users. |
Just catching up with this conversation. A scrolling container doesn't make a lot of sense because it only "fixes" an editor issue; it doesn't communicate to the user what they are actually creating. In general, wrapping is what I would expect, as it shows the user that their navigation might need some tweaking. In the future, allowing users to opt-in to having all overflowing items grouped within a "more" dropdown could be nice. The only issue with wrapping is the conflicts it might have with dropdowns, but that is also the case with the front-end. If you have a navigation menu that goes into multiple lines and also items with dropdown in the first line, it's going to be a rough experience for visitors. tl;dr: I agree with @folletto |
Thanks @folletto @mtias and @jasmussen. I think that's a definite 👍to moving forward with @jasmussen's wrap approach and get this Issue resolved. @shaunandrews would you be ok to open another Issue to discuss the "More " option as a longer-term solution? |
I also would 👍wrap and the more can come later. For what it's worth unless we have more on front then the idea of 'more' isn't really aligning. |
Sure, makes sense to move it to a future iteration. |
Currently when lots of items are added to the navigation menu, the block forces the editor container to widen, which adds a horizontal scrollbar to the entire editor:
It looks kinda terrible!
Instead, we might consider adding a horizontal scroll container within the block itself.
See the table block for prior art on this.
The text was updated successfully, but these errors were encountered: