Support setting colors for tab groups
Description
Adds the ability to color an entire tab group. Assigning a color tints the whole group, the header and every member tab, in both horizontal and vertical tab layouts. The color is set from the same dot color picker already used for individual tabs, now also surfaced in the tab-group right-click menu.
Tabs within a group can not be given individual colors, this is intentional.
How it works
A group's color is resolved at render time rather than written onto its member tabs. A grouped tab's effective color comes from its group, so members inherit the group color (and an uncolored group renders its members neutrally, ignoring their own colors).
The bulk of the change is in how a colored group is rendered. The group container is filled with the group color at the normal resting-tab opacity, and the header and member tabs add no tint of their own — so the group reads as a single uniform color — and only layer their hover/selected highlight on top. The same model is applied to both horizontal and vertical tabs
To avoid duplicating the color picker, the existing dot-based color selector was pulled out of the per-tab menu into a single shared menu builder parameterized by what it's coloring (a tab vs. a group). Both the per-tab and per-group menus now use it and dispatch the appropriate toggle action.
It also includes two small polish fixes that came out of the above: colored tabs in a multi-selection are no longer over-highlighted (a saturated fill reads much brighter than the neutral highlight regular tabs use, so this highlighting was reduced), and a horizontal group background is now filled while being dragged instead of translucent.
Linked Issue
https://linear.app/warpdotdev/issue/APP-4671/allow-modifying-colors-for-tab-groups
Testing
- [x] I have manually tested my changes locally with
./script/run
Screenshots / Videos
@johnturcoo
I'm starting a first review of this pull request.
You can view the conversation on Warp.
I completed the review and no human review was requested for this pull request.
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz