Skip to content
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

Closed
talldan opened this issue Nov 6, 2019 · 8 comments · Fixed by #18431
Closed

Navigation Menu: handle overflowing Nav Items #18298

talldan opened this issue Nov 6, 2019 · 8 comments · Fixed by #18431
Assignees
Labels
[Block] Navigation Affects the Navigation Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Enhancement A suggestion for improvement.

Comments

@talldan
Copy link
Contributor

talldan commented Nov 6, 2019

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:
Screen Shot 2019-11-06 at 5 47 50 pm

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.

@talldan talldan added [Type] Enhancement A suggestion for improvement. [Block] Navigation Affects the Navigation Block labels Nov 6, 2019
@talldan talldan added the Good First Issue An issue that's suitable for someone looking to contribute for the first time label Nov 6, 2019
@getdave
Copy link
Contributor

getdave commented Nov 6, 2019

cc @mtias because you've mentioned this as an Issue. It's already on the board and we will address it.

@getdave
Copy link
Contributor

getdave commented Nov 14, 2019

Needs decision

There are now two three distinct approaches

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

@getdave getdave added Needs Decision Needs a decision to be actionable or relevant and removed Good First Issue An issue that's suitable for someone looking to contribute for the first time labels Nov 14, 2019
@jasmussen
Copy link
Contributor

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.

@folletto
Copy link
Contributor

folletto commented Nov 14, 2019

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:

  • I don't expect any navigation scrolling
  • I don't expect any navigation to change layout when clicked

Which means that the only two viable solutions are only:

  • Always wrap — most themes do this
  • 'More' mechanic — nice, but I consider this for a v2 of this feature

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.

@mtias
Copy link
Member

mtias commented Nov 14, 2019

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

@getdave
Copy link
Contributor

getdave commented Nov 14, 2019

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?

@getdave getdave changed the title Navigation Menu: Add scroll container Navigation Menu: handle overflowing Nav Items Nov 14, 2019
@karmatosed
Copy link
Member

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.

@shaunandrews
Copy link
Contributor

would you be ok to open another Issue to discuss the "More " option as a longer-term solution?

Sure, makes sense to move it to a future iteration.

@mtias mtias removed the Needs Decision Needs a decision to be actionable or relevant label Nov 17, 2019
@mtias mtias removed the Needs Design Feedback Needs general design feedback. label Nov 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block [Status] In Progress Tracking issues with work in progress [Type] Bug An existing feature does not function as intended [Type] Enhancement A suggestion for improvement.
Projects
None yet
8 participants