fix(tabs): lay MoonTabStrip as an in-flow overflow row - #57
Merged
Conversation
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.
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.
What & why
MoonTabStrip laid every tab at an absolute
leftand, whenbounds()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_scrollwith a persistedScrollHandle, 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-gallerycargo xtask component-api --check-baseline