co-design icon indicating copy to clipboard operation
co-design copied to clipboard

Fix mobile display for multiple categories

Open ArtOfCode- opened this issue 5 years ago • 3 comments

When you have multiple (more than 3) categories, the category header works fine on desktop:

categories

When you use it on mobile, it completely screws the layout:

categories-mob

That should probably wrap onto the next line. We can look at collapsing multiple categories into a "see more" link in QPixel too, but Co-Design should still avoid breaking on this case.

ArtOfCode- avatar May 03 '20 21:05 ArtOfCode-

If the length of the category list exceeds the available space, I think we want to show the first however many fit and then have a "more" affordance. Whether that's something with a dropdown or a link to the categories list or something else, I don't know (want input from better UX folks than I).

cellio avatar May 03 '20 21:05 cellio

Alternative that I've just stumbled on by complete accident: simply hide the overflow and make the bar scroll horizontally. Looks terrible on a desktop, but won't happen on a desktop (unless a site has a ridiculous number of categories); looks just fine on a phone:

categories-scroll

For added bonus, the half-hidden name is exactly the affordance it needs to indicate that it's scrollable.

ArtOfCode- avatar May 03 '20 22:05 ArtOfCode-

Horizontal scrolling seems fine for mobile, though I think conventionally there would be '<' and '>' indicators instead of relying on the luck of truncation?

Ultimately, though, we're going to have to deal with possible category overflow on non-touch interfaces too, and when we do we might end up using the same solution on both. I really want @mattjbrent to weigh in on that.

cellio avatar May 03 '20 22:05 cellio