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
views: support auxiliary bar in OpenViewContainerAction #170137
Conversation
@@ -367,13 +367,16 @@ export class ViewsService extends Disposable implements IViewsService { | |||
const viewsService = serviceAccessor.get(IViewsService); | |||
const viewContainerLocation = viewDescriptorService.getViewContainerLocation(viewContainer); | |||
switch (viewContainerLocation) { | |||
case ViewContainerLocation.Sidebar: | |||
if (!viewsService.isViewContainerVisible(viewContainer.id) || !layoutService.hasFocus(Parts.SIDEBAR_PART)) { | |||
case ViewContainerLocation.AuxiliaryBar: |
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.
Thanks for this change @connor4312 ... Looks like this command got forgotten in the changes with the views. Your fix actually highlights another problem with this command. The title of the command is Show X or Toggle X depending on where the view container lives at startup. The behavior however is based on the location at execution. I'm not really sure if there is a strong reason for having this differentiation so I suggest we stick to the same behavior for all locations: Show X and simplify here. @sandy081 what do you think?
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.
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.
If we don't go for consistency, we need to fix the bug where the command name doesn't reflect the behavior. And we also need to make a decision on whether the Secondary Side Bar acts more like the panel or more like the Primary Side Bar. I would say Side Bar behavior, since that's what its called and that would be my vote for all view "commands".
Oops, My approval auto merged it and I did not see the auto merge is enabled. Sorry about it. @sbatten Feel free to suggest any additional comments if you have. |
Fixes #169907