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

Candidate/142146 #142424

Merged
merged 2 commits into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/vs/workbench/browser/actions/layoutActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -903,13 +903,16 @@ abstract class BaseResizeViewAction extends Action2 {
const isEditorFocus = layoutService.hasFocus(Parts.EDITOR_PART);
const isSidebarFocus = layoutService.hasFocus(Parts.SIDEBAR_PART);
const isPanelFocus = layoutService.hasFocus(Parts.PANEL_PART);
const isAuxiliaryBarFocus = layoutService.hasFocus(Parts.AUXILIARYBAR_PART);

if (isSidebarFocus) {
part = Parts.SIDEBAR_PART;
} else if (isPanelFocus) {
part = Parts.PANEL_PART;
} else if (isEditorFocus) {
part = Parts.EDITOR_PART;
} else if (isAuxiliaryBarFocus) {
part = Parts.AUXILIARYBAR_PART;
}
} else {
part = partToResize;
Expand Down
27 changes: 27 additions & 0 deletions src/vs/workbench/browser/actions/navigationActions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ abstract class BaseNavigationAction extends Action {
const isEditorFocus = this.layoutService.hasFocus(Parts.EDITOR_PART);
const isPanelFocus = this.layoutService.hasFocus(Parts.PANEL_PART);
const isSidebarFocus = this.layoutService.hasFocus(Parts.SIDEBAR_PART);
const isAuxiliaryBarFocus = this.layoutService.hasFocus(Parts.AUXILIARYBAR_PART);

let neighborPart: Parts | undefined;
if (isEditorFocus) {
Expand All @@ -54,6 +55,10 @@ abstract class BaseNavigationAction extends Action {
neighborPart = this.layoutService.getVisibleNeighborPart(Parts.SIDEBAR_PART, this.direction);
}

if (isAuxiliaryBarFocus) {
neighborPart = neighborPart = this.layoutService.getVisibleNeighborPart(Parts.AUXILIARYBAR_PART, this.direction);
}

if (neighborPart === Parts.EDITOR_PART) {
if (!this.navigateBackToEditorGroup(this.toGroupDirection(this.direction))) {
this.navigateToEditorGroup(this.direction === Direction.Right ? GroupLocation.FIRST : GroupLocation.LAST);
Expand All @@ -62,6 +67,8 @@ abstract class BaseNavigationAction extends Action {
this.navigateToSidebar();
} else if (neighborPart === Parts.PANEL_PART) {
this.navigateToPanel();
} else if (neighborPart === Parts.AUXILIARYBAR_PART) {
this.navigateToAuxiliaryBar();
}
}

Expand Down Expand Up @@ -100,6 +107,26 @@ abstract class BaseNavigationAction extends Action {
return !!viewlet;
}

private async navigateToAuxiliaryBar(): Promise<IComposite | boolean> {
if (!this.layoutService.isVisible(Parts.AUXILIARYBAR_PART)) {
return false;
}

const activePanel = this.paneCompositeService.getActivePaneComposite(ViewContainerLocation.AuxiliaryBar);
if (!activePanel) {
return false;
}

const activePanelId = activePanel.getId();

const res = await this.paneCompositeService.openPaneComposite(activePanelId, ViewContainerLocation.AuxiliaryBar, true);
if (!res) {
return false;
}

return res;
}

private navigateAcrossEditorGroup(direction: GroupDirection): boolean {
return this.doNavigateToEditorGroup({ direction });
}
Expand Down