Long tab name, in a fitted mode or node, don't render well. Only the first tab is visible and it's impossible to access and click the other tabs.
The tab name should probably use an ellipsis to show the name has been cut off while showing all other tabs (or at least the special ... dropdown).
In a fitted mode, because of its narrow space, having a way to render the tabs one below the other would also be appreciated. Especially when the number of tabs is hardcoded and the amount is very small (1-3 I'd say)
Currently, only the first tab is available, and we cannot read its full content.
<Tabs> component where the first tab has a very long content.https://codesandbox.io/s/y75qy17yj
I've removed the accessibility-related labels since this issue affects all users by making the controls unavailable.
This needs some design exploration to determine how to treat it. Long tab names should be avoided in favor of clear language, but long tab names shouldn鈥檛 break as they do now.
I can rule out stacked tabs鈥攊n this configuration they鈥檙e no longer recognizable as tabs. If you need tabs to work this way, an accordion might be a better approach. (An accordion can be built in Polaris with a set of <Collapsible> components.)
Yup, the stackable approach was just an idea to solve the issue, but I understand your point.
The idea here is to find a way to render the tabs correctly in a narrow space. Let's say you have a 300px column in which you want 2 or 3 tabs. They might render well in most cases, in English, French, Spanish. But what about German which usually have way longer names? So even if I agree that tab name should usually be concise. It's not always easy to control this in foreign languages.
I also don't think using a DisclosureTab in this case would be a good idea for a narrow container. But I like the idea of having the name on 2 lines.
How would max-width work when the Tabs are fitted?
The idea here is to find a way to render the tabs correctly in a narrow space
Exactly; it shouldn鈥檛 break with languages that tend to have longer strings. On the other hand, there鈥檚 only so much the component can do. Wrapping to 2 lines makes a lot of sense, but wrapping with an ellipsis is notoriously difficult in CSS, so we might need to compromise. If we have to compromise, I鈥檓 OK with simply fixing the existing behavior (rolling up any tabs that don鈥檛 fit into the disclosure menu)鈥攅ven if it鈥檚 not great in German.
max-width would have to be ignored when fitted is on.
This issue has been inactive for 180 days and labeled with Icebox. It will be closed in 7 days if there is no further activity.
The UX of the tabs component will be changing in the coming months to scroll instead of roll up into a popover. I'm reopening this since it is still an issue until the design is updated.
This issue has been inactive for 180 days and labeled with Icebox. It will be closed in 7 days if there is no further activity.