warp icon indicating copy to clipboard operation
warp copied to clipboard

Horizontal tab group rework - several bug fixes

Open johnturcoo opened this issue 5 months ago • 1 comments

Description

Reworks horizontal tab groups so that group headers are now the same width as tabs, regardless of the tab group title. Also modifies the layout of tab groups so that groups have dynamic flex spacers rather than fixed margins/padding on either side of the member tabs. This allows the tab group to resize dynamically and keeps all tabs in the tab bar the same width.

This change resolves a lot of bugs with horizontal tab groups, and I got the designs for the header change approved.

Bugs can be seen in the demo below.

What changed

  • The group header fills one tab slot of flex and is capped at the same 200px max as a tab.
  • Each expanded group gets a flex spacer on each side of its members ([header][spacer][members][spacer]). Because the spacers are their own flex slots, member tabs stay exactly as wide as ungrouped tabs. -target_group_at_axis now uses the group's (dynamically resizing) flex spacers for horizontal tabs while keeping fixed-margin logic for vertical tabs. Some special cases were added to make dropping into the last position of a group, dropping between groups and dragging out of a group a bit more seamless.

Notes

Debugging flex is hard. I finally understand.

Linked Issue

https://linear.app/warpdotdev/issue/APP-4768/htab-groups-inconsistent-header-sizes-cause-several-bugs-in-the-tab

Testing

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

Screenshots / Videos

Demo before rework

Demo after rework

johnturcoo avatar Jun 25 '26 00:06 johnturcoo

@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

warp-for-oss[bot] avatar Jun 25 '26 00:06 warp-for-oss[bot]