Skip to content

fix(tabs): lay MoonTabStrip as an in-flow overflow row - #57

Merged
kirillDevPro merged 1 commit into
masterfrom
feat/tab-strip
Aug 29, 2026
Merged

fix(tabs): lay MoonTabStrip as an in-flow overflow row#57
kirillDevPro merged 1 commit into
masterfrom
feat/tab-strip

Conversation

@kirillDevPro

Copy link
Copy Markdown
Collaborator

What & why

MoonTabStrip laid every tab at an absolute left and, when bounds() was set, made the whole strip absolute too. Chart and dock tabs then clipped instead of scrolling, jumped under font scale, and painted under neighbouring chrome.

This keeps the Moon look (mono label, 28-unit height, amber underline) and adopts TabBar's overflow mechanism: in-flow flex children, inner overflow_x_scroll with a persisted ScrollHandle, and an optional Moon chevron menu (off by default). bounds() is a max-size constraint, not a position. The dock tab header uses the same yield-and-scroll pattern so detach/zoom/close stay visible.

How to verify

  • cargo check -p moon-ui-gallery
  • cargo xtask component-api --check-baseline
  • Gallery Navigation/Tabs: a short strip has no chevron; many tabs scroll.
  • Dock header in the gallery/host: tabs yield; trailing controls stay on screen.

MoonTabStrip placed every tab with absolute left offsets and made
its root absolute whenever bounds() was set. Chart and dock tabs
then jumped under font scale, clipped instead of scrolling, and
painted under neighbouring chrome.

Tabs are now in-flow flex children. Overflow uses TabBar's outer
overflow_x_hidden plus inner overflow_x_scroll with a persisted
ScrollHandle, and a Moon chevron menu that defaults off. bounds()
is a max-size constraint, not a position. The dock header yields
with the same scroll-and-menu pattern; pinned tabs keep their
styling but are not a sticky non-scrolling cluster.
@kirillDevPro
kirillDevPro merged commit 7bc25ba into master Aug 29, 2026
2 checks passed
@kirillDevPro
kirillDevPro deleted the feat/tab-strip branch August 29, 2026 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant