feat(tabs): scroll overflowing tabs instead of overflowing the container - #832
Draft
PeerRich wants to merge 1 commit into
Draft
feat(tabs): scroll overflowing tabs instead of overflowing the container#832PeerRich wants to merge 1 commit into
PeerRich wants to merge 1 commit into
Conversation
TabsList now wraps its tabs in a ScrollArea, so a list that is wider than its container scrolls horizontally instead of pushing the page sideways on small screens. The scroll viewport is bled by 2px so focus rings and the active indicator are not clipped. Adds `scrollable` (default true) and `scrollFade` props, a scrollable tabs particle, docs and a changelog entry. Generated with [Linear](https://linear.app/calcom/issue/ENG-3366/enterprise-dashboard-mobile-responsive#agent-session-77ec4890) Co-authored-by: linear-code[bot] <222613912+linear-code[bot]@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Tab strips with many tabs (dashboards, settings) ran off the side of the screen on mobile with no way to reach the hidden tabs —
TabsListwasw-fitwith no overflow handling, so it pushed the page sideways instead of scrolling.TabsListnow wraps its tabs in aScrollArea(the same pattern the calcom example uses for its bookings nav), so an overflowing list scrolls horizontally and stays inside its container.scrollable(defaulttrue) opts out for lists that need to size themselves freely, e.g.className="w-full"— noted in the docs and changelog since that's the one behaviour change for existing consumers.scrollFade(defaultfalse) fades the edges while there is more to scroll to.-m-0.5+ innerp-0.5) so tab focus rings and the active indicator aren't clipped at the edges.Adds a
p-tabs-14scrollable example, docs props table entries and a changelog entry.Verified in the docs app at 390px and 1280px: overflowing lists scroll (pointer + arrow keys scroll the focused tab into view), non-overflowing lists and lists next to flex siblings are unchanged, focus rings are not clipped, and the existing Preview/Code and install tabs in the docs still render correctly.
bun run typecheckandbun run lintpass; registry rebuilt andui:syncrun.