Skip to content

Enhance Activitybar layout and item separation - #332002

Merged
Lee Murray (mrleemurray) merged 5 commits into
mainfrom
mrleemurray/brave-crimson-guan
Aug 23, 2026
Merged

Enhance Activitybar layout and item separation#332002
Lee Murray (mrleemurray) merged 5 commits into
mainfrom
mrleemurray/brave-crimson-guan

Conversation

@mrleemurray

@mrleemurray Lee Murray (mrleemurray) commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

The Activity Bar hid view containers behind the "Additional Views" overflow menu while there was still room to show them. This was most visible with the compact Activity Bar and with Modern UI enabled, where it could collapse down to a single icon in a window that comfortably fits all of them.

Changes

  • Size the overflow computation from the current item height instead of a hardcoded 52px, which did not track the compact Activity Bar (28px) or Modern UI (36px + 8px gap) sizes.
  • Publish the Modern UI inter-item gap from TypeScript as --activity-bar-action-gap and consume it in floatingPanels.css, so the rendered spacing and the overflow computation share a single source of truth rather than restating the same value in both places.
  • Reserve the measured height of the global Accounts/Manage icons rather than deriving it from the overflow action size, which over-reserved by one gap. GlobalCompositeBar.size() has no remaining callers and is removed.
  • Give back the one leading-item gap that the per-item stride folds into every item, since the gap only renders between items — without it the last item still overflowed a gap early.
  • Add regression coverage for the per-item stride, the published CSS variable, and the leading-gap compensation across all four size combinations.

Validation

  • 21 ActivitybarPart unit tests pass.
  • typecheck-client, ESLint, and hygiene are clean.
  • Verified in a Code OSS dev build across classic and Modern UI at both default and compact sizes, sweeping window heights from 190px to 440px: the number of icons shown matches the space actually available at every overflow boundary, and items never overlap the global icons.

Copilot AI balanced review requested due to automatic review settings August 21, 2026 16:54
@mrleemurray
Lee Murray (mrleemurray) enabled auto-merge (squash) August 21, 2026 16:54
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

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

Benjamin Christopher Simmonds (@benibenj)

Matched files:

  • src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
  • src/vs/workbench/browser/parts/globalCompositeBar.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Improves Activity Bar overflow calculations across classic, compact, and Modern UI layouts.

Changes:

  • Derives overflow sizing from rendered item height and spacing.
  • Measures global action-bar space directly.
  • Adds CSS variable support and regression tests.

Reviewed changes

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

Show a summary per file
File Description
activitybarPart.ts Updates sizing and layout calculations.
globalCompositeBar.ts Removes obsolete item-count sizing.
floatingPanels.css Uses the shared action-gap variable.
activitybarPart.test.ts Adds sizing regression coverage.
vscode-known-variables.json Registers the CSS variable.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/vs/workbench/browser/parts/activitybar/activitybarPart.ts Outdated
Comment thread src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
The global bar height is measured from the DOM rather than derived from the
item size, but no test exercised it. Add coverage for one and two global
actions so the measured reservation, and the single gap that separates two
icons, cannot silently regress.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Clean implementation. Types and docs are up to date.

@mrleemurray
Lee Murray (mrleemurray) merged commit 628de0e into main Aug 23, 2026
61 of 63 checks passed
@mrleemurray
Lee Murray (mrleemurray) deleted the mrleemurray/brave-crimson-guan branch August 23, 2026 06:01
@vs-code-engineering vs-code-engineering Bot added this to the 1.135.0 milestone Aug 23, 2026
@wenma531

Copy link
Copy Markdown

ActivitybarPart

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants