Skip to content

Collapsing htab groups gives flex to remaining tab bar items#13101

Merged
johnturcoo merged 1 commit into
masterfrom
johnturco/app-4788-give-back-flex-to-other-tabs-when-a-tab-group-is-collapsed
Jun 28, 2026
Merged

Collapsing htab groups gives flex to remaining tab bar items#13101
johnturcoo merged 1 commit into
masterfrom
johnturco/app-4788-give-back-flex-to-other-tabs-when-a-tab-group-is-collapsed

Conversation

@johnturcoo

Copy link
Copy Markdown
Contributor

Description

When a horizontal tab group collapses, give the space it frees back to the other tabs so they grow to fill it (Chrome-style), instead of parking that space at the end of the bar.

How it works

In render_tab_bar_contents, removed the collapsed_group_flex_giveback that re-added each collapsed group's freed flex (its members + 2 edge spacers) to the trailing spacer. The trailing spacer is now just Shrinkable::new(0.5, …), so when a collapsed group drops from header + members + 2 spacers of flex down to a single header slot, the freed flex redistributes across the remaining flex children — the other tabs widen to reclaim it.

Linked Issue

https://linear.app/warpdotdev/issue/APP-4788/give-back-flex-to-other-tabs-when-a-tab-group-is-collapsed

Testing

  • I have manually tested my changes locally with ./script/run

Screenshots / Videos

Demo of before

Demo of after

@cla-bot cla-bot Bot added the cla-signed label Jun 26, 2026
@johnturcoo johnturcoo requested a review from peicodes June 26, 2026 20:19
@johnturcoo johnturcoo force-pushed the johnturco/app-4768-htab-groups-inconsistent-header-sizes-cause-several-bugs-in branch from c139c45 to 3a3f0c1 Compare June 27, 2026 17:52
Base automatically changed from johnturco/app-4768-htab-groups-inconsistent-header-sizes-cause-several-bugs-in to master June 27, 2026 19:07
@johnturcoo johnturcoo force-pushed the johnturco/app-4788-give-back-flex-to-other-tabs-when-a-tab-group-is-collapsed branch from fbb2b66 to b9f65af Compare June 28, 2026 01:28
@johnturcoo johnturcoo enabled auto-merge (squash) June 28, 2026 01:30
@johnturcoo johnturcoo merged commit 0b1e4ab into master Jun 28, 2026
38 of 41 checks passed
@johnturcoo johnturcoo deleted the johnturco/app-4788-give-back-flex-to-other-tabs-when-a-tab-group-is-collapsed branch June 28, 2026 16:25
dagmfactory pushed a commit that referenced this pull request Jun 30, 2026
## Description

When a horizontal tab group collapses, give the space it frees back to
the other tabs so they grow to fill it (Chrome-style), instead of
parking that space at the end of the bar.

## How it works

In `render_tab_bar_contents`, removed the
`collapsed_group_flex_giveback` that re-added each collapsed group's
freed flex (its members + 2 edge spacers) to the trailing spacer. The
trailing spacer is now just `Shrinkable::new(0.5, …)`, so when a
collapsed group drops from `header + members + 2 spacers` of flex down
to a single header slot, the freed flex redistributes across the
remaining flex children — the other tabs widen to reclaim it.

## Linked Issue


https://linear.app/warpdotdev/issue/APP-4788/give-back-flex-to-other-tabs-when-a-tab-group-is-collapsed

## 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

[Demo of
before](https://www.loom.com/share/6f6226b5583643bba1501cfb053f154b)

[Demo of
after](https://www.loom.com/share/c270e24984654594a3072bae636668e1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants