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

Scrollable tabs #1509

Closed
1 task done
munteannatan opened this issue Sep 11, 2023 · 5 comments
Closed
1 task done

Scrollable tabs #1509

munteannatan opened this issue Sep 11, 2023 · 5 comments
Assignees
Labels
client request Client team would immediately benefit from this change dynamic form fields DFF Client Request enhancement New feature or request interaction design Interaction design work item

Comments

@munteannatan
Copy link
Contributor

munteannatan commented Sep 11, 2023

😯 Problem to Solve

When the tabs displayed have longer names or there are too many of them, they overflow the page.
This can hide valuable information from the user and hinder navigation.
overflowing tabs

💁 Proposed Solution

The tabs should be customizable so that they may be confined to the existing container width and the tab titles could be truncated.
truncated tabs

The easiest way this can be achieved is by providing a part name to the Tab component default slot so that it can be customized.

<template slot="tab" role="tab" aria-disabled="${x => x.disabled}">
  ${startSlotTemplate(options)}
  <slot part="content"></slot>
  ${endSlotTemplate(options)}
</template>

📋 Tasks

@munteannatan munteannatan added enhancement New feature or request triage New issue that needs to be reviewed labels Sep 11, 2023
@munteannatan munteannatan changed the title Nimble Tabs should have the width limited to the page or container Nimble Tabs should have the option to limit the width to the page or container width Sep 11, 2023
@m-akinc m-akinc added client request Client team would immediately benefit from this change interaction design Interaction design work item and removed triage New issue that needs to be reviewed labels Sep 12, 2023
@m-akinc m-akinc moved this to Current Iteration in Nimble Design System Priorities Sep 12, 2023
@m-akinc m-akinc moved this from Current Iteration to Backlog in Nimble Design System Priorities Sep 26, 2023
@fredvisser fredvisser added the triage New issue that needs to be reviewed label Jan 24, 2024
@m-akinc m-akinc removed the triage New issue that needs to be reviewed label Jan 30, 2024
@m-akinc
Copy link
Contributor

m-akinc commented Jan 30, 2024

Dynamic form fields are another case where long, user-provided labels may have the same issue.

image

@jattasNI
Copy link
Contributor

The team that originally submitted this request mentioned that they plan to use a workaround of manually setting the tab titles to include ellipses and to add a tooltip with the full text.

@fredvisser fredvisser added the team review Flag issue for team discussion and review label Aug 7, 2024
@fredvisser
Copy link
Contributor

I'd like to propose that we prioritize a scrollable implementation like Shoelace.

image

Any challenges to this approach?

@fredvisser fredvisser added the dynamic form fields DFF Client Request label Aug 7, 2024
@m-akinc m-akinc removed the team review Flag issue for team discussion and review label Aug 27, 2024
@m-akinc m-akinc changed the title Nimble Tabs should have the option to limit the width to the page or container width Scrollable tabs Aug 27, 2024
@m-akinc m-akinc moved this from Backlog to Current Iteration in Nimble Design System Priorities Aug 27, 2024
@jattasNI
Copy link
Contributor

jattasNI commented Sep 6, 2024

Notes from team review of the visual design:

  1. there shouldn't be a visible scrollbar on any OS
  2. when a tab has keyboard focus, left/right arrow keys should continue to move to the next tab as they do today. That tab should scroll into view if it was off screen.
  3. don't need to worry about keeping the current tab within view
  4. TBD whether the scroll buttons are tab-focusable
  5. start by matching shoelace's behavior when an arrow button is clicked: scrolling one "page width" (i.e. all the currently visible tabs scroll out of view). We can start there, play with it and see how it feels.
  6. we should have usage guidance that tabs shouldn't be given very long names. In case that's out of an app's control (e.g. user-specified names) we could consider following our established pattern of having a reasonable default max-width on each tab but allowing apps to override it. This will probably require other styling changes to behave well.

rajsite added a commit that referenced this issue Sep 26, 2024
# Pull Request

## 🤨 Rationale

- #1509

## 👩‍💻 Implementation

N/A

## ✅ Checklist

<!--- Review the list and put an x in the boxes that apply or ~~strike
through~~ around items that don't (along with an explanation). -->

- [ ] I have updated the project documentation to reflect my changes or
determined no changes are needed.

---------

Co-authored-by: Jesse Attas <[email protected]>
Co-authored-by: Milan Raj <[email protected]>
@atmgrifter00 atmgrifter00 self-assigned this Oct 14, 2024
@atmgrifter00 atmgrifter00 mentioned this issue Oct 16, 2024
1 task
atmgrifter00 pushed a commit that referenced this issue Oct 23, 2024
# Pull Request

## 🤨 Rationale

- #1509
rajsite pushed a commit that referenced this issue Oct 24, 2024
# Pull Request

## 🤨 Rationale

- #1509

## 👩‍💻 Implementation

Standard boiler-plate implementation for exposing label provider
attributes to Angular/Blazor.

## 🧪 Testing

Typical boiler-plate unit tests.

## ✅ Checklist

<!--- Review the list and put an x in the boxes that apply or ~~strike
through~~ around items that don't (along with an explanation). -->

- [ ] I have updated the project documentation to reflect my changes or
determined no changes are needed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
client request Client team would immediately benefit from this change dynamic form fields DFF Client Request enhancement New feature or request interaction design Interaction design work item
Projects
Development

No branches or pull requests

5 participants