Skip to content

workspace: Handle double-click on pinned tab row empty space#51592

Merged
JosephTLyons merged 6 commits intozed-industries:mainfrom
mgabor3141:mgabor/workspace-handle-double-click-on
Apr 6, 2026
Merged

workspace: Handle double-click on pinned tab row empty space#51592
JosephTLyons merged 6 commits intozed-industries:mainfrom
mgabor3141:mgabor/workspace-handle-double-click-on

Conversation

@mgabor3141
Copy link
Copy Markdown
Contributor

When tab_bar.show_pinned_tabs_in_separate_row is enabled, double-clicking the empty space on the unpinned tab row creates a new tab, but double-clicking the empty space on the pinned tab row does nothing.

Add the same on_click double-click handler to the pinned tab bar drop target so both rows behave consistently.

Release Notes:

  • Fixed double-clicking empty space in the pinned tab row not opening a new tab when show_pinned_tabs_in_separate_row is enabled.

@cla-bot
Copy link
Copy Markdown

cla-bot Bot commented Mar 15, 2026

Thank you for your pull request and welcome to our community. We could not parse the GitHub identity of the following contributors: mgabor3141.
This is most likely caused by a git client misconfiguration; please make sure to:

  1. check if your git client is configured with an email to sign commits git config --list | grep email
  2. If not, set it up using git config --global user.email email@example.com
  3. Make sure that the git commit email is configured in your GitHub account settings, see https://github.com/settings/emails

@mgabor3141 mgabor3141 force-pushed the mgabor/workspace-handle-double-click-on branch from dc999e2 to d695b58 Compare March 15, 2026 11:26
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Mar 15, 2026
@mgabor3141 mgabor3141 marked this pull request as ready for review March 15, 2026 11:27
@JosephTLyons
Copy link
Copy Markdown
Collaborator

JosephTLyons commented Mar 30, 2026

Hey @mgabor3141, these changes are looking and feeling good, and they match what VS Code does when the double pinned tab bar setting is enabled. That being said, I'd like to pin down this behavior with a test, which would involve setting up the test to have the tab_bar.show_pinned_tabs_in_separate_row enabled, adding a pinned tab, locating the empty space in the pinned tab bar, doing a double click, and asserting a new empty tab is added to the non-pinned tab bar.

If you scan the tests in pane.rs, you should find examples for how to do most of that. These two tests will cover most of it.

  • test_separate_pinned_row_has_right_border
  • test_middle_click_pinned_tab_does_not_close

Once a test is in place, and this is rebased on main, I'm happy to merge it into the main. :)

@JosephTLyons
Copy link
Copy Markdown
Collaborator

I went ahead and added in a test so we could merge this in. Thanks @mgabor3141

@JosephTLyons JosephTLyons merged commit 2b4901d into zed-industries:main Apr 6, 2026
30 checks passed
MasoudAlali pushed a commit to MasoudAlali/zed-ide that referenced this pull request Apr 7, 2026
…ustries#51592)

When `tab_bar.show_pinned_tabs_in_separate_row` is enabled,
double-clicking the empty space on the unpinned tab row creates a new
tab, but double-clicking the empty space on the pinned tab row does
nothing.

Add the same `on_click` double-click handler to the pinned tab bar drop
target so both rows behave consistently.

Release Notes:

- Fixed double-clicking empty space in the pinned tab row not opening a
new tab when `show_pinned_tabs_in_separate_row` is enabled.

---------

Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
@mgabor3141
Copy link
Copy Markdown
Contributor Author

I went ahead and added in a test so we could merge this in. Thanks @mgabor3141

Thanks. I've been busy with other things so I couldn't get to this one. Thank you for taking it over the finish line.

piper-of-dawn pushed a commit to piper-of-dawn/zed that referenced this pull request Apr 25, 2026
…ustries#51592)

When `tab_bar.show_pinned_tabs_in_separate_row` is enabled,
double-clicking the empty space on the unpinned tab row creates a new
tab, but double-clicking the empty space on the pinned tab row does
nothing.

Add the same `on_click` double-click handler to the pinned tab bar drop
target so both rows behave consistently.

Release Notes:

- Fixed double-clicking empty space in the pinned tab row not opening a
new tab when `show_pinned_tabs_in_separate_row` is enabled.

---------

Co-authored-by: Joseph T. Lyons <JosephTLyons@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants