Skip to content

Conversation

@mrleemurray
Copy link
Contributor

@mrleemurray mrleemurray commented Feb 12, 2026

Introduce a compact layout option for the Activity Bar, allowing users to adjust dimensions and icon sizes. Refactor existing styles to utilize CSS variables for better customization and add unit tests to ensure proper functionality of the new layout features.

Recording 2026-02-12 at 12 08 35

Copilot AI review requested due to automatic review settings February 12, 2026 12:08
@mrleemurray mrleemurray self-assigned this Feb 12, 2026
@vs-code-engineering
Copy link

vs-code-engineering bot commented Feb 12, 2026

📬 CODENOTIFY

The following users are being notified based on files changed in this PR:

@bpasero

Matched files:

  • src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
  • src/vs/workbench/browser/parts/activitybar/media/activityaction.css
  • src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css
  • src/vs/workbench/browser/parts/paneCompositeBar.ts
  • src/vs/workbench/browser/workbench.contribution.ts
  • src/vs/workbench/services/layout/browser/layoutService.ts

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 introduces an opt-in compact layout mode for the Activity Bar by adding a new configuration setting and refactoring Activity Bar sizing to be driven by CSS custom properties, with accompanying unit tests to validate sizing and style updates.

Changes:

  • Added workbench.activityBar.compact setting and registered it in the configuration schema.
  • Updated ActivitybarPart and related CSS to support compact vs default sizing via CSS variables (width, action height, icon size).
  • Added browser unit tests to validate size constraints, CSS variables, and change events when toggling the setting.

Reviewed changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/vs/workbench/test/browser/parts/activitybar/activitybarPart.test.ts Adds unit tests for compact/default sizing behavior and CSS variable updates.
src/vs/workbench/services/layout/browser/layoutService.ts Introduces LayoutSettings.ACTIVITY_BAR_COMPACT constant.
src/vs/workbench/browser/workbench.contribution.ts Registers the new workbench.activityBar.compact setting in the configuration schema.
src/vs/workbench/browser/parts/paneCompositeBar.ts Updates URI icon mask sizing to allow overriding via --activity-bar-icon-size.
src/vs/workbench/browser/parts/activitybar/media/activitybarpart.css Switches Activity Bar width to --activity-bar-width with fallback.
src/vs/workbench/browser/parts/activitybar/media/activityaction.css Refactors Activity Bar action dimensions and icon size to CSS variables; adjusts badge/profile overlay for compact mode.
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts Implements compact mode toggling, updates min/max width constraints, sets CSS variables, and recreates the composite bar on change.
build/lib/stylelint/vscode-known-variables.json Adds the new custom properties to the stylelint known-variables allowlist.

@mrleemurray mrleemurray merged commit c4d9d33 into main Feb 12, 2026
18 checks passed
@mrleemurray mrleemurray deleted the mrleemurray/psychological-pink-finch branch February 12, 2026 13:11
Comment on lines 216 to 219
test('filter by command id', async () => {
const id = 'workbench.action.increaseViewSize';
const id = 'workbench.action.view.size.' + uuid.generateUuid();
registerCommandWithTitle(id, 'some title');
prepareKeybindingService();
Copy link
Member

Choose a reason for hiding this comment

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

What is going on here?

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.

3 participants