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

feat(Tabs): Scroll wide content of a Tab Panel horizontally #1855

Merged
merged 2 commits into from
Feb 12, 2025

Conversation

VincentSmedinga
Copy link
Contributor

@VincentSmedinga VincentSmedinga commented Feb 5, 2025

Describe the pull request

Thank you for contributing to the project!
Please use this template to help us handle your PR smoothly.

What

Allows the content of a Tab Panel to scroll horizontally.

Why

To prevent the Tabs from growing to contain its content, after which may overflow its container.

How

By adding .ams-tabs__panel { overflow-x: auto; } and an example.

Checklist

Before submitting your pull request, please ensure you have done the following. Check each checkmark if you have done so or if it wasn't necessary:

  • Add or update unit tests
  • Add or update documentation
  • Add or update stories
  • Add or update exports in index.* files
  • Start the PR title with a Conventional Commit prefix, as explained here.

Additional notes

  • There has been some discussion on a composition of a Table in a Description List in a Tab Panel causing overflow. We concluded this is expected behaviour of CSS and that a responsive appearance of our table component may resolve this in the future. I recommended a local inline style to influence the local sizing behaviour of CSS Grid.

@dlnr
Copy link
Contributor

dlnr commented Feb 7, 2025

Works but there seems to be an underlying problem with Table here

Copy link
Contributor

@RubenSibon RubenSibon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally, I approve this as an MVP solution, but having one or two horizontal scrollbars on smaller views is not a very user-friendly and visually appealing UI. It fixes breaking the layout on the short-term, but for the longer term a more elegant solution is welcome.

@github-actions github-actions bot temporarily deployed to demo-DES-1169-tab-panel-overflow February 12, 2025 09:08 Destroyed
@alimpens alimpens merged commit 8ece501 into release/v0.14.1 Feb 12, 2025
4 checks passed
@alimpens alimpens deleted the feat/DES-1169-tab-panel-overflow branch February 12, 2025 09:16
@github-actions github-actions bot mentioned this pull request Feb 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants