Skip to content

Modern UI: add themeable shell colors, panel borders and resize grips - #335056

Merged
Lee Murray (mrleemurray) merged 17 commits into
mainfrom
mrleemurray/invisible-blush-bee
Sep 8, 2026
Merged

Lee Murray (mrleemurray) merged 17 commits into
mainfrom
mrleemurray/invisible-blush-bee

Conversation

@mrleemurray

Copy link
Copy Markdown
Contributor

This gives theme authors finer control over Modern UI surfaces and coordinates built-in theme colors across active and inactive windows.

Changes

  • Add theme colors for active and inactive shell backgrounds, floating panel borders, resize grips, and inactive status bars.
  • Refine built-in palettes with coordinated inactive colors, consistent section dividers, stronger surface borders, and theme-specific grip colors.
  • Keep shell, title bar, and status bar colors independent across window focus changes and startup, preserving debugging and empty-window status colors and compatibility with older splash data.
  • Honor explicit high-contrast overrides while retaining opaque defaults and compact-density behavior.
  • Correct 2026 theme highlight transparency, remove obsolete overrides, and deprecate unused chat animation accents without removing compatibility registrations.
  • Document token defaults, precedence, and theme-author examples, with regression coverage for color resolution and window state.

Validation

  • 26 focused unit tests passed during implementation; the gripper tests were rerun successfully after the final 40% alpha adjustment.
  • Client typecheck, targeted ESLint, and layer checks passed.
  • Six real-window checks passed on macOS using Code OSS 1.137.0 Dev, covering dark/light themes, both high-contrast themes, startup splash colors, and auxiliary-window focus. These UI checks preceded the final gripper palette tuning.
… support

refactor(activitybar): replace isInactive state with activeWindowId for focus handling

refactor(statusbar): update to use activeWindowId instead of isInactive for background color logic

refactor(titlebar): modify title bar to track activeWindowId instead of isInactive

fix(theme): improve status bar inactive background description for clarity

chore(chat): deprecate unused chat input accent colors and clarify usage

docs(modernUI): update README with details on new color IDs and their usage

test(partsSplash): add tests for parts splash colors handling based on window focus

test(chatColors): implement tests for chat color registrations and deprecations

test(titlebar): create tests for title bar color resolution based on window focus
Copilot AI balanced review requested due to automatic review settings September 8, 2026 13:41
@vs-code-engineering

Copy link
Copy Markdown
Contributor

📬 CODENOTIFY

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

Robo (@deepak1556)

Matched files:

  • src/vs/code/electron-browser/workbench/partsSplash.ts
  • src/vs/code/electron-browser/workbench/workbench.ts
  • src/vs/code/test/electron-browser/partsSplash.test.ts

Benjamin Christopher Simmonds (@benibenj)

Matched files:

  • src/vs/workbench/browser/parts/activitybar/activitybarPart.ts
  • src/vs/workbench/browser/parts/statusbar/statusbarPart.ts
  • src/vs/workbench/browser/parts/titlebar/titlebarPart.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.

🔵 Needs a closer look

The vertical resize-grip regression test currently validates the horizontal style instead of the vertical pseudo-element.

Pull request overview

Adds themeable Modern UI shell surfaces, borders, resize grips, and focus-aware inactive-window colors.

Changes:

  • Introduces new theme colors and coordinated built-in palettes.
  • Applies focus-sensitive colors during runtime and startup.
  • Expands documentation, compatibility, and regression coverage.
File summaries
File Summary Review comment
src/vs/workbench/test/browser/parts/titlebar/titlebarPart.test.ts Tests title and shell focus colors. —
src/vs/workbench/test/browser/parts/statusbar/statusbarPart.test.ts Tests inactive status-bar behavior. —
src/vs/workbench/contrib/splash/browser/partsSplash.ts Persists new splash colors. —
src/vs/workbench/contrib/modernUI/test/browser/modernUI.contribution.test.ts Tests borders, dividers, shell, and grips. Moderate (2 votes): verticalShadowColor incorrectly reads horizontalStyle; use the vertical pseudo-element style.
src/vs/workbench/contrib/modernUI/README.md Documents tokens and precedence. —
src/vs/workbench/contrib/modernUI/browser/media/sashHandles.css Themes resize-grip dots. —
src/vs/workbench/contrib/modernUI/browser/media/paneHeaders.css Adds divider color fallbacks. —
src/vs/workbench/contrib/chat/test/common/chatColors.test.ts Tests animation color registrations. —
src/vs/workbench/contrib/chat/common/widget/chatColors.ts Relaxes transparency and deprecates unused accents. —
src/vs/workbench/common/theme.ts Registers new workbench colors. —
src/vs/workbench/browser/parts/titlebar/titlebarPart.ts Resolves per-window title and shell colors. —
src/vs/workbench/browser/parts/statusbar/statusbarPart.ts Applies inactive status backgrounds. Nit (1 vote): Condense the new inline comment to meet the one-line limit while retaining its precedence rationale.
src/vs/workbench/browser/parts/activitybar/activitybarPart.ts Improves per-window inactive styling. —
src/vs/workbench/browser/media/floatingPanels.css Applies panel and shell tokens. Nit (1 vote): Replace the hard-coded border width with the shared stroke token.
src/vs/platform/theme/common/themeService.ts Extends persisted splash color data. —
src/vs/code/test/electron-browser/partsSplash.test.ts Tests splash color precedence. —
src/vs/code/electron-browser/workbench/workbench.ts Renders focus-aware startup colors. —
src/vs/code/electron-browser/workbench/partsSplash.ts Centralizes splash color resolution. —
extensions/theme-tomorrow-night-blue/themes/tomorrow-night-blue-color-theme.json Coordinates inactive and divider colors. —
extensions/theme-solarized-light/themes/solarized-light-color-theme.json Adds light inactive and divider colors. —
extensions/theme-solarized-dark/themes/solarized-dark-color-theme.json Adds dark inactive and divider colors. —
extensions/theme-red/themes/Red-color-theme.json Refines the Modern UI red palette. —
extensions/theme-quietlight/themes/quietlight-color-theme.json Adds inactive, divider, and grip colors. —
extensions/theme-monokai/themes/monokai-color-theme.json Coordinates Monokai surfaces. —
extensions/theme-monokai-dimmed/themes/dimmed-monokai-color-theme.json Refines dimmed Monokai surfaces. —
extensions/theme-kimbie-dark/themes/kimbie-dark-color-theme.json Adds inactive and divider colors. —
extensions/theme-defaults/themes/light_vs.json Updates default light inactive colors. —
extensions/theme-defaults/themes/light_modern.json Adds inactive status color. —
extensions/theme-defaults/themes/hc_light.json Adds explicit high-contrast light inactive colors. —
extensions/theme-defaults/themes/hc_black.json Adds explicit high-contrast dark inactive colors. —
extensions/theme-defaults/themes/dark_vs.json Refines default dark borders and inactivity. —
extensions/theme-defaults/themes/dark_modern.json Adds inactive status color. —
extensions/theme-defaults/themes/2026-light.json Refines highlights, borders, and overrides. —
extensions/theme-defaults/themes/2026-dark.json Refines highlights, borders, and overrides. —
extensions/theme-abyss/themes/abyss-color-theme.json Adds inactive and divider colors. —
build/lib/stylelint/vscode-known-variables.json Registers the new CSS variables for linting. —
Review details

Suppressed comments (3)

src/vs/workbench/browser/media/floatingPanels.css:78

  • The edited border still hard-codes the standard stroke width. Use the shared stroke token so this floating surface stays on the same one-stroke design-system tier as the rest of Modern UI.
	border: 1px solid var(--modern-ui-floating-card-border-color, var(--vscode-modernPanel-border, var(--vscode-surface-border, var(--vscode-widget-border, transparent)))) !important;

src/vs/workbench/browser/parts/statusbar/statusbarPart.ts:730

  • This new inline method comment exceeds the repository’s one-line hard limit for inline comments. Please condense it while retaining the precedence rationale.
		// The inactive background is a resting state only: a style override (e.g. while debugging)
		// and the no folder background both communicate state and must stay visible when inactive.

src/vs/workbench/contrib/modernUI/test/browser/modernUI.contribution.test.ts:1453

  • verticalShadowColor is read from horizontalStyle, so this assertion cannot catch a regression in the vertical grip's currentColor. Read the vertical pseudo-element style here.
  • Files reviewed: 36/36 changed files
  • Comments generated: 0
  • Review effort level: Balanced

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

Model the active window through TestHostService so the Electron unit test does not depend on the runner window's document focus.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Verify that refocusing the host does not reactivate the main activity bar while an auxiliary window remains active.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

7 participants