Add basic tab/group pinning actions + vtab rendering#12534
Open
johnturcoo wants to merge 2 commits into
Open
Conversation
Contributor
|
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 Powered by Oz |
Contributor
There was a problem hiding this comment.
Overview
This PR adds pin/unpin actions for tabs and tab groups behind PinnedTabs, plus vertical-tabs pin indicators and unit coverage for the basic reordering behavior.
Concerns
- Pin state is now user-mutated and saved, but tab/group pinned flags are still absent from the app-state snapshot and SQLite persistence path, so pinned tabs and groups are lost after restart.
- The ungrouped pinned-tab indicator remains visible while row hover action buttons are shown, which can overlap the kebab/close controls in vertical tabs.
Verdict
Found: 0 critical, 2 important, 0 suggestions
Request changes
Comment /oz-review on this pull request to retrigger a review (up to 3 times on the same pull request).
Powered by Oz
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.
Description
Adds the ability to pin individual tabs and tab groups in the vertical tabs panel, behind the
PinnedTabsfeature flag. Pinned items are moved to the top of the tab list (appended after existing pinned items), and a small pin icon appears in the top-right corner of each pinned row so the state is visible.This includes adding a new Pin/Unpin tab/group option to tab and group menus respectively, and connecting these entry points to their associated actions.
Currently dragging, creating new tabs/groups and moving tabs to groups do not respect the pinned invariant that all pinned items must come before any items that are not pinned, but this will be addressed in a follow up PR.
How it works
Created new
WorkspaceActionsfor pinning/unpinning both tabs and groups. The pin/unpin methods compute a singlepinned_boundary_index(the count of leading tabs already in the pinned region, which can be pinned tabs or tabs in a pinned group) and reposition the affected tab or group block to that boundary in one move.Tab pinning and group pinning are deliberately independent:
pin_tabon a grouped tab first removes it from its group, then pins it standalone, whilepin_tab_grouponly flips the group's own pinned flag and moves the group's contiguous block — individual membertab.pinnedflags stay false because the block always travels as a unit.Linked Issue
https://linear.app/warpdotdev/issue/APP-4696/pinningunpinning-actions-for-tabs-groups
Testing
./script/runScreenshots / Videos
Demo video
Additional demo for pinning a tab that is in a group
This is the product behavior that was decided on