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

Don’t squeeze all tabs into a single line, if there are a lot of tabs #3073

Closed
tpmatthes opened this issue Jul 6, 2018 · 9 comments
Closed
Labels
enhancement improvements to existing features ux 😄 features related to user experience

Comments

@tpmatthes
Copy link

Description

If you have a lot of tabs in a section and a small sceen, you can’t see all tab titles:

collapsing tabs

It’s hard to navigate between tabs on (very) small screens. It may be better to wrap them into multiple lines (like in Craft 2.5) and/or use a dropdown menu (see #1014) instead.

Some ideas:

  1. Add flex-wrap: wrap to #main-container
  2. Remove inline max-width from li

Steps to reproduce

  1. Create a new section
  2. Add a lot of tabs
  3. Edit an entry in this section on a mobile device

Additional info

  • Craft version: Craft Pro 3.0.14
  • PHP version: 7.1.12
  • Database driver & version: MySQL 5.6.38
  • Plugins & versions: none
@tpmatthes tpmatthes changed the title Improve tab display Don’t squeeze all tabs into a single line, if there are a lot of tabs Jul 6, 2018
@brandonkelly
Copy link
Member

I’m not sure I like the idea of multiple rows – would be hard to style that well if the selected tab isn’t on the bottom row – but maybe we could swap the non-selected tabs out with a dropdown menu if there isn’t enough room to display their full labels. I’ll look into that alongside #2325.

In the meantime, I just tweaked the CSS so all of the left/right padding in the CP (including tabs) goes from 24px to 12px on screens smaller than 768px wide, which should help quite a bit:

screen shot 2018-07-08 at 6 42 22 am

@tpmatthes
Copy link
Author

You’ll at least need a border-bottom for each row, if you wrap them into multiple rows. It can look good, but I also think that a dropdown menu is a better solution in the long run. If you have even more tabs, multiple rows would waste too much space, escpecially on mobile devices.

Thanks for the quick padding fix! It’s a small improvement, but it definitely helps. 👍

@guyinpv
Copy link

guyinpv commented Jul 19, 2018

In VS Code, the tabs remain at their default widths, but the entire tab strip scrolls left and right. This is one possible solution. There would have to be an indicator that a person can swipe or scroll the tabs bar to see more.

Another alternative is to show as many tabs as possible but shuffle the rest into a tabs dropdown. If they click the dropdown and select a tab, that tab becomes active. With this method, each time you select a tab from the list, the previous tab is slid over to make room. This creates a natural order of tabs by the order in which they are opened. Almost like a "recent tabs" list, making it easier to click back to the last tab you were on without going into the dropdown menu again.

Another method would be to get rid of tabs entirely and switch to a text link list. Some links would perhaps take up less room than larger full width tab buttons.

Another would be to shuffle every tab except the current one into a tabs dropdown menu.

Another method would be to create LEFT/RIGHT arrow buttons which allow you to click between the tabs in sequence. Click the right arrow and it goes to the next tab to the right, etc.

@brandonkelly
Copy link
Member

All good suggestions @guyinpv! The dropdown menu idea is most likely what we’ll go with.

@brandonkelly
Copy link
Member

Also I guess it’s worth mentioning, if you’re on a desktop computer, you can hover over tabs that aren’t fully visible and you will get a tooltip with the full tab name.

@brandonkelly brandonkelly added authoring ✍️ features related to author experience enhancement improvements to existing features labels May 17, 2019
@BenParizek
Copy link
Contributor

We've had several folks run into this problem with Sprout Forms as well. We currently solve it by just making that tabs area scrollable, but implementing a dropdown menu idea would be a nice solution that I'd happily piggy back on.

@Gnative
Copy link

Gnative commented Jul 4, 2019

I'll add my voice/vote to this as well. Always nice to not have labels hidden or truncated unless necessary. Easier for the User.
Dropdown or Accordion.
Thanks.

brandonkelly added a commit that referenced this issue Nov 17, 2019
@brandonkelly brandonkelly added ux 😄 features related to user experience and removed authoring ✍️ features related to author experience labels Nov 17, 2019
@brandonkelly brandonkelly added this to the 3.4 milestone Nov 17, 2019
@brandonkelly
Copy link
Member

The overflow menu has been added for Craft 3.4!

A tab bar with an expanded overflow menu

See #2883 (comment) for more details.

@brandonkelly
Copy link
Member

For posterity, we’ve revisited the tab design for Craft 3.7 – see #7299 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improvements to existing features ux 😄 features related to user experience
Projects
None yet
Development

No branches or pull requests

5 participants