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

Handling overflow in the quick toolbar #2898

Closed
jasmussen opened this issue Oct 6, 2017 · 8 comments
Closed

Handling overflow in the quick toolbar #2898

jasmussen opened this issue Oct 6, 2017 · 8 comments
Labels
General Interface Parts of the UI which don't fall neatly under other labels. Needs Design Feedback Needs general design feedback. [Type] Question Questions about the design or development of the editor.

Comments

@jasmussen
Copy link
Contributor

jasmussen commented Oct 6, 2017

This topic has come up a number of time, but hasn't been opened in a separate ticket. All discussions will be referenced from this ticket.

The question for the day: how do we handle overflow in the quick toolbar?

Overflow refers to when there isn't enough available space to fit the buttons inside the quick toolbar. This might happen on mobile, or it might happen if you float a block.

As the quick toolbar decreases in width, there are a number of ways to handle the overflow, including:

  1. "pop off" buttons and move them to an overflow menu
  2. let the quick toolbar scroll horizontally
  3. allow multiple stacked toolbars

Solution 1 is good for the desktop, as scrolling horizontaly is not a good experience.

Solution 2 is good on mobile, as swiping horizontally feels natural. But it makes the code complex when it comes to dropdowns in the quick toolbar.

Solution 3 is what the Classic Text block does, and should ideally be avoided.

Note: there is an overflow menu on mobile, there to handle the mover, cog, trash buttons. As we look for a solution to the quick toolbar overflow, we should keep this in mind, for example by moving these buttons to the quick toolbar on the mobile breakpoint.

Mockups

Here's how Google Docs handles it on the desktop:

Here are various mockups that illustrate potential solutions:

Desktop breakpoint:

desktop toolbar overflow

Mobile breakpoint version 1, toolbar scrolls:

mobile overflow scroll
mobile overflow scrolled

Mobile breakpoint version 2, "More" button appears (like Docs):

mobile overflow more button

mobile overflow more popout

Tickets where this has come up:

@jasmussen jasmussen added General Interface Parts of the UI which don't fall neatly under other labels. Design Needs Design Feedback Needs general design feedback. [Type] Question Questions about the design or development of the editor. labels Oct 6, 2017
@jasmussen jasmussen mentioned this issue Oct 6, 2017
12 tasks
@androb
Copy link
Contributor

androb commented Oct 8, 2017

FWIW we found Version 1 (a horizontally scrollable toolbar) worked better on mobile than a "more drawer." (Version 2) in Textbox.io. The "more drawer" covered up too much screen real estate.

@jasmussen
Copy link
Contributor Author

@androb Nice, thanks for the info. How did you handle dropdown menus inside a scrolling toolbar?

@hedgefield
Copy link

hedgefield commented Oct 9, 2017

I'd go for a horizontal scroll too, it's a pattern that Google also uses in Material when a tab/toolbar is wider than the screen 👍

As a side note, I'd hide the scrollbar (seen in the second mobile mockup), you wouldn't be able to grab that with your finger on a mobile device anyway, and as a visual cue there's probably something better(-looking), like a fade or an arrow on the end of the bar (or nothing, like in Material, but I don't know if enough people are familiar with that pattern yet).

@jasmussen
Copy link
Contributor Author

I'd go for a horizontal scroll too, it's a pattern that Google also uses in Material when a tab/toolbar is wider than the screen 👍

I like the horizontal scroll, but the two problems with it remain — it's very difficult to get a dropdown button to work when it can also scroll horizontally. And it also doesn't work on the desktop, whereas an ellipsis or a "more" button would work on both.

As a side note, I'd hide the scrollbar (seen in the second mobile mockup), you wouldn't be able to grab that with your finger on a mobile device anyway

Totally — that was just an artifact of the mockup, to indicate the auto hiding scrollbar that shows up on mobile when you drag.

@hedgefield
Copy link

Ah hm, I wasn't paying attention to the fact that overflow could also be an issue on desktop... Then I would prefer the more button too yeah. My only concern with that on mobile is to make sure there won't be any of the standard, commonly-used features hidden behind that button due to lack of space. From the mockups it looks like that won't be an issue, but if it ever does become one, maybe we could also offer a way to customize which elements go on the main toolbar and which are inside the more dropdown, like Apple sometimes offers for apps with a bottom drawer?

@androb
Copy link
Contributor

androb commented Oct 9, 2017

@jasmussen we had a different interaction on mobile vs. desktop. Horizontal scroll worked better on mobile and a "more" button worked better on the desktop.

As for scrolling horizontally with a drop down, I am not sure what the issue is? Is that the drop-down doesn't move in sync with when the toolbar gets scrolled?

@jasmussen
Copy link
Contributor Author

As for scrolling horizontally with a drop down, I am not sure what the issue is? Is that the drop-down doesn't move in sync with when the toolbar gets scrolled?

No, just wondering whether you solved the technical challenges (sounds like you did), like syncing up the x position of where to show the dropdown, etc.

@jasmussen
Copy link
Contributor Author

I'm going to close this ticket in favor of #4084, which offers a different approach to some of the issues this ticket tried to address.

That doesn't mean the inherent issue here is fixed, but it is mitigated both by the horizontal scrolling of the quick toolbar, and when 4084 happens, by a more obvious and discoverable place to find the trash button and movers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
General Interface Parts of the UI which don't fall neatly under other labels. Needs Design Feedback Needs general design feedback. [Type] Question Questions about the design or development of the editor.
Projects
None yet
Development

No branches or pull requests

3 participants