Commit ad73053
authored
Swap tab groups to render icon only to match tabs (warpdotdev#13105)
## Description
When tabs shrink to a certain size in the horizontal tab bar, they stop
displaying the tab name and just show their icon. This PR modifies tab
group headers to follow the same behavior.
## How it works
- Wrapped the group header in a `SizeConstraintSwitch` that swaps the
full layout (collage + name) for a compact, icon-only collage below
`COMPACT_TAB_WIDTH_THRESHOLD` (42px) — the same mechanism and threshold
`TabComponent` already uses, so headers and tabs go compact at the same
width.
- The compact collage renders at the tab's compact icon size
(`TAB_INDICATOR_HEIGHT`, 14px), centered
## Linked Issue
https://linear.app/warpdotdev/issue/APP-4777/tab-group-header-icon-collage-is-clipped-when-many-tabs-open
## Testing
<!--
How did you test this change? What automated tests did you add? If you
didn't add any new tests, what's your justification for not adding any?
Manual testing is required for changes that can be manually tested, and
almost all changes can be manually tested. If your change can be
manually tested, please include screenshots or a screen recording that
show it working end to end.
You can run the app locally using `./script/run` - see AGENTS.md for
more details on how to get set up.
-->
- [x] I have manually tested my changes locally with `./script/run`
### Screenshots / Videos
<!-- Attach screenshots or a short video demonstrating the change, where
appropriate. Remove this section if it is not relevant to your PR. -->
[Demo
before](https://www.loom.com/share/c1af83499c9349a8a59249deb8c5c335)
[Demo
after](https://www.loom.com/share/6ad23f13cacb4a8f9c1d8f5dd7d474a9)1 parent d45528a commit ad73053
2 files changed
Lines changed: 48 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
58 | | - | |
| 58 | + | |
59 | 59 | | |
60 | 60 | | |
61 | 61 | | |
| |||
77 | 77 | | |
78 | 78 | | |
79 | 79 | | |
80 | | - | |
| 80 | + | |
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
96 | 96 | | |
97 | 97 | | |
98 | 98 | | |
99 | | - | |
| 99 | + | |
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
357 | | - | |
358 | | - | |
| 357 | + | |
| 358 | + | |
359 | 359 | | |
360 | 360 | | |
361 | 361 | | |
| |||
19708 | 19708 | | |
19709 | 19709 | | |
19710 | 19710 | | |
19711 | | - | |
19712 | | - | |
19713 | 19711 | | |
19714 | 19712 | | |
19715 | 19713 | | |
| |||
19736 | 19734 | | |
19737 | 19735 | | |
19738 | 19736 | | |
19739 | | - | |
| 19737 | + | |
| 19738 | + | |
| 19739 | + | |
19740 | 19740 | | |
19741 | 19741 | | |
19742 | 19742 | | |
19743 | 19743 | | |
19744 | 19744 | | |
19745 | | - | |
| 19745 | + | |
| 19746 | + | |
| 19747 | + | |
| 19748 | + | |
| 19749 | + | |
19746 | 19750 | | |
19747 | 19751 | | |
19748 | 19752 | | |
19749 | 19753 | | |
19750 | 19754 | | |
19751 | | - | |
| 19755 | + | |
19752 | 19756 | | |
19753 | | - | |
| 19757 | + | |
| 19758 | + | |
| 19759 | + | |
| 19760 | + | |
| 19761 | + | |
| 19762 | + | |
| 19763 | + | |
| 19764 | + | |
| 19765 | + | |
| 19766 | + | |
| 19767 | + | |
| 19768 | + | |
| 19769 | + | |
| 19770 | + | |
| 19771 | + | |
| 19772 | + | |
| 19773 | + | |
| 19774 | + | |
| 19775 | + | |
| 19776 | + | |
| 19777 | + | |
| 19778 | + | |
| 19779 | + | |
| 19780 | + | |
| 19781 | + | |
| 19782 | + | |
| 19783 | + | |
| 19784 | + | |
| 19785 | + | |
| 19786 | + | |
19754 | 19787 | | |
19755 | 19788 | | |
19756 | 19789 | | |
| |||
19764 | 19797 | | |
19765 | 19798 | | |
19766 | 19799 | | |
19767 | | - | |
19768 | | - | |
19769 | | - | |
19770 | | - | |
19771 | | - | |
19772 | | - | |
19773 | | - | |
| 19800 | + | |
| 19801 | + | |
| 19802 | + | |
| 19803 | + | |
19774 | 19804 | | |
19775 | 19805 | | |
19776 | 19806 | | |
| |||
0 commit comments