Repository navigation
Tab groups with a tab strip drawn like the system tab bar - #2
Merged
Merged
Conversation
Replaces the native window tabs with the app's own strip under the toolbar. Tabs can be grouped under a colored chip with an optional name; clicking the chip collapses the group, and tabs or whole groups drag to reorder, move between windows, or open a new window. Groups are saved with the session. Each window controller now holds its tabs (ReaderTab, one per document) and shows one at a time; menu commands reach the shown tab through the responder chain.
Control-Tab and Control-Shift-Tab switch tabs again: the window used them for keyboard focus before the menu saw them, so a key monitor catches them. The group editor keeps its margins, new groups start blue instead of grey, and the shortcuts page and README describe groups.
…essions Taking tabs out of a window no longer picks a replacement on the spot, which could pick a tab hidden in a collapsed group and expand it. A tab moved within its window stays shown, a group moved to another window keeps its shown tab, and a window that loses its shown tab shows the nearest visible tab, or a new tab when every tab left is in a collapsed group, the same rule collapsing uses. While a tab is dragged, every window shows its tab strip, so a window with a single tab can take the drop. The drag state is one value. Sessions saved before tab groups have no groups key; they load again instead of being dropped.
The strip copies the measures and colors of the tab bar AppKit draws: equal tabs on a band that darkens the window color, the shown tab left clear so the desktop tint shows through, centered titles, the close button at the left on hover, dividers, and a new tab segment at the right end. It moves from a title bar accessory into the top of the content view, because AppKit draws a separator over accessories that only its own tab bar can hide. A pressed tab or group chip now follows the pointer along the strip while the others slide aside, and becomes a drag to another window or a new one once pulled away from the strip. Drop slots are picked by the nearest gap, with a margin at a group's end so a tab leaves the group only on purpose.
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.
Summary
Adds Chrome-style tab groups. The system window tab bar cannot show a clickable group chip, hide tabs, or take clicks on its labels, so each window now draws its own tab strip, measured to match the system bar.
ReaderTab, one per document) and shows one. Menu and toolbar commands pass on to the shown tab through the responder chain.Testing