Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hide toolbars on inactive tabbars #11480

Conversation

colin-grant-work
Copy link
Contributor

@colin-grant-work colin-grant-work commented Jul 28, 2022

What it does

Fixes #9593

Theia displays toolbars on all tabbars in the main area, whether the tabbar is active or not. VSCode only displays the toolbar on the active tabbar. As a consequence, plugin toolbar items can have unexpected effects if the user clicks on toolbar item for an inactive tab. This PR aligns Theia's behavior with VSCode's by hiding toolbars on inactive tabbars.

An alternative would be to try to focus the relevant widget before executing the command if the user clicks on a toolbar item for an inactive tabbar. That way, we could continue to display toolbars as we currently do, but the behavior when executing commands would (probably) be compatible with plugins' expectations.

How to test

  1. Open e.g. two markdown files in different columns in the main area.
  2. Observe that the 'Open preview to side' icon(s) appear on the tabbar for the active widget and not for the other tabbar.
  3. Focus the other widget, and observe that the icon(s) appear there.

Review checklist

Reminder for reviewers

@colin-grant-work colin-grant-work added vscode issues related to VSCode compatibility ui/ux issues related to user interface / user experience labels Jul 28, 2022
Copy link
Member

@msujew msujew left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍 I can confirm that the behavior aligns better to vscode now.

Copy link
Member

@vince-fugnitto vince-fugnitto left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes work well for me 👍
I believe the changes close:

@colin-grant-work colin-grant-work merged commit 9da42cf into eclipse-theia:master Jul 29, 2022
@colin-grant-work colin-grant-work deleted the bugfix/toolbars-on-inactive-tabbars branch July 29, 2022 14:00
@colin-grant-work colin-grant-work added this to the 1.29.0 milestone Aug 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ui/ux issues related to user interface / user experience vscode issues related to VSCode compatibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Plugin-contributed commands render on inactive tabbars
3 participants