Skip to content

Conversation

@faogustavo
Copy link
Collaborator

@faogustavo faogustavo commented Jan 8, 2026

  • Using the HorizontallyScrollableContainer causes a minor ui glitch as the component getts bigger to accomodate the scrollbar
  • To prevent this issue to happen, I'm rollabacking to manually create the scrollbar and use a box instead
  • This is needed because the default guidelines mandate a space for the scrollbar, however the implementation for tabstrip should render over the tabs

Release notes

⚠️ Important Changes

  • TabStrip is not using the HorizontallyScrollableContainer as it mandates some behavior that should not apply to the TabStrip
    • All functionality should remain the same

Note

Ensures the TabStrip no longer resizes when the scrollbar appears by rendering a hover‑activated overlay scrollbar and using native horizontalScroll.

  • Replaces HorizontallyScrollableContainer with a Box + Row using horizontalScroll; adds AnimatedVisibility fade for HorizontalScrollbar and hides it from accessibility
  • Keeps keyboard navigation and auto‑scroll to selected tab; simplifies code by removing custom scrollbar color logic
  • UI test updated: adds testTags and a new test asserting TabStrip height remains constant while adding many tabs; minor test setup optimization with derivedStateOf

Written by Cursor Bugbot for commit 8fdbcd0. This will update automatically on new commits. Configure here.

- Using the HorizontallyScrollableContainer causes a minor ui glitch as the component getts bigger to accomodate the scrollbar
- To prevent this issue to happen, I'm rollabacking to manually create the scrollbar and use a box instead
- This is needed because the default guidelines mandate a space for the scrollbar, however the implementation for tabstrip should render over the tabs
modifier = Modifier.semantics { hideFromAccessibility() },
) {
HorizontalScrollbar(scrollState, style = style.scrollbarStyle, modifier = Modifier.fillMaxWidth())
}
Copy link

Choose a reason for hiding this comment

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

Scrollbar appears when content doesn't need scrolling

Medium Severity

The AnimatedVisibility visibility condition only checks tabStripState.isHovered, but the old HorizontallyScrollableContainer also checked scrollState.canScroll to ensure the scrollbar only appears when the content actually needs scrolling. The new implementation will show a scrollbar when hovering even if there are only a few tabs and no scrolling is needed, which differs from the intended behavior where the scrollbar should only appear when content overflows.

Fix in Cursor Fix in Web

Copy link
Collaborator

@rock3r rock3r left a comment

Choose a reason for hiding this comment

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

Would like a screenrecording or two to validate the behaviour :)

enter =
fadeIn(
tween(
durationMillis = scrollbarVisibility.trackColorAnimationDuration.inWholeMilliseconds.toInt(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this be the thumb animation duration? Same below

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants