Repository navigation
fix(macos): shrink and scroll tile tabs without a system scroller - #254
Merged
Merged
Conversation
A tile's tab strip used `.scrollIndicators(.hidden)`, which is only a hint
on macOS: with legacy scrollers ("Show scroll bars: Always", or a mouse
connected) AppKit still drew a 17 pt scroller under the tabs and squeezed
them into the remaining 16 pt. The strip also clipped the selected tab,
scrolled the add button away, and showed no sign of hidden tabs.
Tile tabs now share the strip: the widest shrink first, down to 88 pt,
while the selected tab keeps at least 160 pt. Past that, the strip
scrolls with no scroller, fades the edges that hide tabs, keeps the
selected tab in view (until the user scrolls by hand), and shows a "+N"
menu of the hidden panes with their icons. The add button follows the
last tab and stays beside the count while the tabs scroll. The split and
zoom actions keep their slot while hidden, so hovering doesn't reflow the
tabs, and tabs show their full title as a tooltip.
A vertical mouse wheel now scrolls the tile strips, the session top tabs,
and the composer and annotation strips across. Other strips and panels
that meant to hide their scrollers use `.never`. The session tabs'
overflow model, count, and edge mask are shared with tile strips.
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.
Problem
When a tile had more tabs than fit:
.scrollIndicators(.hidden)is only a hint on macOS: SwiftUI'sHostingScrollViewstill got a 17 pt horizontal scroller and squeezed the 34 pt strip to 16 pt..neverremoves it. I confirmed this by inspecting the AppKit view tree and capturing windows in both scroller modes.Change (option B from the Paper exploration, page "Tile tab overflow")
TileTabWidths, laid out byTileTabRow).HorizontalWheelScrolling: turns a vertical mouse wheel into horizontal scrolling over the tile strips, the session top tabs, and the composer and annotation strips. It only acts when that strip is the view under the pointer, so panels over it keep their wheel. Trackpads pass through unchanged..hiddenscroll indicators →.never: composer attachment strips,AnnotationStrip(which had no modifier at all), the mention panel, and the bounded diagnostics in the feedback view.TabStripOverflow<ID>).Tests
TileTabStripTestscovers:The scroller check fails if the strip reverts to
.hidden, and the snap-back check fails without the follow guard.Full macOS suite: 971 tests pass.
SessionLauncherTests.renderLauncherForReviewfailed once on its focus-dependent check (#234) and passed on rerun.