Skip to content

Conversation

@bpasero
Copy link
Member

@bpasero bpasero commented Jan 17, 2026

An opus production.

Bugs:

  • when panel is maximized you cannot click the close icon to close it
  • when panel is maximized you cannot toggle its visibility (e.g. from the title toolbar)
  • when auxiliary bar is maximized and toggling it (e.g. from the title toolbar), the entire workbench becomes blank

Copilot AI review requested due to automatic review settings January 17, 2026 12:41
@bpasero bpasero self-assigned this Jan 17, 2026
@bpasero bpasero changed the title Support maximizing the panel when justified (fix #271356) ⛔ Support maximizing the panel when justified (fix #271356) Jan 17, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR enables panel maximization for all panel alignment modes (left, right, justify, and center), removing the previous restriction that only allowed maximization for center-aligned panels. This addresses issue #271356.

Changes:

  • Removed preconditions and checks that prevented panel maximization with non-center alignments
  • Enhanced panel maximization logic to hide/show sidebars when using non-center alignments
  • Added state management to restore sidebar and auxiliary bar visibility when unmaximizing

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
src/vs/workbench/browser/parts/panel/panelActions.ts Removed precondition restrictions and runtime warning for non-center panel maximization; cleaned up unused imports
src/vs/workbench/browser/layout.ts Refactored setPanelMaximized to support all alignments by hiding/restoring sidebars for non-center alignments; added visibility state tracking and transition guard
src/vs/workbench/browser/actions/layoutActions.ts Removed precondition that prevented toggling editor visibility with non-center panel alignment; removed unused import

Comment on lines +2183 to +2184
this.setSideBarHidden(!state?.sideBarVisible);
this.setAuxiliaryBarHidden(!state?.auxiliaryBarVisible);
Copy link

Copilot AI Jan 17, 2026

Choose a reason for hiding this comment

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

The optional chaining operator (state?.) is unnecessary here because assertReturnsDefined on line 2176 guarantees that state is defined. Remove the optional chaining to use state.sideBarVisible and state.auxiliaryBarVisible directly, consistent with the similar code pattern in the auxiliary bar implementation (line 2096-2098).

Suggested change
this.setSideBarHidden(!state?.sideBarVisible);
this.setAuxiliaryBarHidden(!state?.auxiliaryBarVisible);
this.setSideBarHidden(!state.sideBarVisible);
this.setAuxiliaryBarHidden(!state.auxiliaryBarVisible);

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants