Repository navigation
fix: readable, wheel-scrollable tabs and no tab bar for a single tab - #432
Merged
Merged
Conversation
2 of 6 tasks
3 tasks
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 this does
People who keep dozens of tabs open in one pane could barely read them: every tab shrank to the same width and showed one letter, and only a sideways trackpad swipe scrolled the strip. Tabs now keep a width that fits their title, a regular mouse wheel scrolls the strip, and the selected tab stays in view. A pane with a single tab hides its tab bar entirely, the way cmux does, and the bar comes back at two tabs.
Summary
Review order:
Sources/WindowPaneChromePortal.swift, thenPaneContainerView.swift.layoutPills()squeezed every pill to an even share once the row overflowed, floored at 78 pt, which left about 10 pt for the title. The compression is gone: pills takemin(220, max(78, title width))and the strip scrolls.TabStripScrollViewturns a phase-less, vertical-only wheel event into horizontal scroll. Trackpads and Magic Mouse keep native handling. No global event monitors.TabItem ==compares ids only, so SwiftUI skippedupdateNSViewon a rename or OSC title change.BonsplitPaneChromeAnchornow gets a content signature of the tab fields the bar draws.showsTabStripis false when a pane has exactly one tab, except for the top-left pane in minimal mode with the sidebar hidden, where the strip is the titlebar row next to the traffic lights and keeps the window draggable.Appearance.tabMinWidthandtabMaxWidthfromBonsplitConfiguration(no readers).Test Plan
./scripts/reload.sh --tag tabs-overflowbuilds.xcodebuildends in BUILD SUCCEEDED.python3 scripts/check-structural-budgets.pypasses.rename-tabupdates the pill (onepaneChrome.updatelog line per rename; none before the fix).Screenshots: before/after needed (30 tabs, single tab).