-
Notifications
You must be signed in to change notification settings - Fork 128
Always show composite bar of auxiliary bar in title position #10650
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
base: main
Are you sure you want to change the base?
Conversation
|
E2E Tests 🚀 |
| switch (this.configuration.position) { | ||
| case ActivityBarPosition.TOP: return CompositeBarPosition.TOP; | ||
| case ActivityBarPosition.BOTTOM: return CompositeBarPosition.BOTTOM; | ||
| case ActivityBarPosition.HIDDEN: return CompositeBarPosition.TITLE; | ||
| case ActivityBarPosition.DEFAULT: return CompositeBarPosition.TITLE; | ||
| default: return CompositeBarPosition.TITLE; | ||
| } | ||
| // --- Start Positron --- | ||
| // Always keep the composite bar in the TITLE position for the auxiliary bar | ||
| // to avoid duplication when activity bar is at TOP/BOTTOM. | ||
| // See https://github.com/posit-dev/positron/issues/2951 | ||
| return CompositeBarPosition.TITLE; | ||
| // --- End Positron --- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A bit of preamble on my understanding of the primary side bar vs secondary side bar:
The primary side bar creates an ActivityBar when the position is set to default but a CompositeBar when the position is top or bottom. It shows neither when the position is hidden. When the primary bar is positioned at the top or bottom, the CompositeBar created only shows icons instead of the tab names so showing the titles makes sense for that scenario. This is the default behavior and the reason we also get that "duplicate" title in the secondary side bar.
Our case with the secondary side bar is a bit different because we don't have an icon only view for the CompositeBar and always show the title of each tab. The title doubling up is really only a problem when the activity bar position is set to ActivityBarPosition.TOP. The ActivityBarPosition.TOP position options doesn't make a ton of sense for the secondary side bar since the ActivityBarPosition.DEFAULT position already has the tabs at the top.
I wonder if we should alway display the full strip of tabs when activity bar is set to hidden. This would effectively mean that the activity bar only refers to the primary side bar, and activity bar settings do not affect the secondary side bar.
What if we still let the secondary side bar respect the activity bar positions but just prevent the title bar from showing up when the position is ActivityBarPosition.TOP by setting it to CompositeBarPosition.TITLE (the default view). This would allow users to still move the tabs to the bottom or hide them just like the primary activity bar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if we still let the secondary side bar respect the activity bar positions but just prevent the title bar from showing up when the position is ActivityBarPosition.TOP by setting it to CompositeBarPosition.TITLE (the default view). This would allow users to still move the tabs to the bottom or hide them just like the primary activity bar.
That would be reasonable but I think the bottom position makes more sense only for the primary bar. The secondary bar looks and behaves much more like the panel, which isn't affected in any way by the activity bar settings, i.e. the tabs don't move to the bottom. This PR fixes this visual discrepancy.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah gotcha, If we want this to behave like the panel, then this makes sense. We should not show the Activity Bar Position menu item in the right-click menu if possible! I'm going to approve the PR - if we don't do that in this PR we should file a ticket to do that.
Addresses #2951
Before:
Screen.Recording.2025-11-19.at.14.34.48.mov
After:
Screen.Recording.2025-11-19.at.14.33.53.mov
I wonder if we should alway display the full strip of tabs when activity bar is set to hidden. This would effectively mean that the activity bar only refers to the primary side bar, and activity bar settings do not affect the secondary side bar.
Release Notes
New Features
Bug Fixes
QA Notes
The tab names should be consistently displayed no matter the position of the activity bar (top, bottom, hidden). Note that when activity bar is hidden, only the current tab name will be displayed. This is currently expected.
The view-specific actions should still be displayed. Instead of being shown in the duplicate strip, they are now shown in the tab bar.
I ran the full test suite at https://github.com/posit-dev/positron/actions/runs/19503204821