Skip to content

themes: improve 2026 editor placeholder contrast - #346707

Merged
Cherry Wang (chryw) merged 1 commit into
mainfrom
dev/cherwan/agents/fix-placeholder-contrast-issue-338627
Nov 7, 2026
Merged

Cherry Wang (chryw) merged 1 commit into
mainfrom
dev/cherwan/agents/fix-placeholder-contrast-issue-338627

Conversation

@chryw

Copy link
Copy Markdown
Contributor

Related to #338627.

Elicitation answer placeholders are difficult to read in Light 2026 and Dark 2026. Set those themes' existing editor.placeholder.foreground values so placeholders exceed 4.5:1 contrast while remaining distinguishable from entered text.

The current answer field uses Monaco's placeholder overlay, not a native input placeholder. Its semantic token is already correct; the inherited ghost-text colors are too faint. This changes only the two themes' placeholder values, leaving inline completions, custom token overrides, and high-contrast themes unchanged.

Before and after

Matched headless captures of the production question carousel, including the auxiliary-bar background cascade. Light 2026 improves from 3.5603543474602684:1 to 4.753447789207311:1 on #FAFAFD; Dark 2026 improves from 3.1168823577501694:1 to 5.182932868292986:1 on #191A1B.

Light 2026: before and after placeholder contrast, with annotated detail

Dark 2026: before and after placeholder contrast, with annotated detail

Validation

  • pnpm run build-fast --client-only — passed.
  • pnpm run test-node --run src/vs/workbench/contrib/themes/test/node/defaultThemeColors.test.ts — 12 passed; both new contrast regression cases fail without the theme entries.
  • pnpm run test-browser-no-install --run src/vs/workbench/contrib/chat/test/browser/widget/chatContentParts/chatQuestionCarouselPart.test.ts --browser chromium --grep 'boolean question with custom answers|Escape in the empty custom answer|renders summary when constructed with isUsed|blocks submit on required empty text field' — 4 passed.
  • pnpm run eslint src/vs/workbench/contrib/themes/test/node/defaultThemeColors.test.ts and git diff --check — passed.
  • Live headless checks preserved focus, typing/clearing, custom color overrides, and geometry. Both high-contrast theme captures were unchanged. Native MCP and screen-reader validation were not performed.

To try: in Light 2026 and Dark 2026, trigger an MCP elicitation form with a text answer. Check the empty answer placeholder, focus the field, type an answer, and clear it. The placeholder should remain readable but quieter than entered text.

Keep elicitation placeholders readable without changing the existing semantic token or inline completion colors.

Refs #338627

Co-authored-by: Copilot <[email protected]>
Copilot AI balanced review requested due to automatic review settings November 7, 2026 01:02

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.

🟢 Approval recommended

The placeholder contrast update has no active review issues.

No open issues 🎉

What changed in this PR

Improves Monaco editor placeholder readability in Light 2026 and Dark 2026, addressing the elicitation answer-field contrast issue in #338627 without changing inline-completion colors or high-contrast themes.

Changes:

  • Sets theme-specific placeholder colors to exceed 4.5:1 contrast while remaining quieter than entered text.
  • Adds regression tests for placeholder contrast across five workbench surfaces.
File Description
src/​vs/​workbench/​contrib/​themes/​test/​node/​defaultThemeColors.test.ts Tests placeholder readability and contrast relative to entered text in both themes.
extensions/​theme-defaults/​themes/​2026-light.json Sets the editor placeholder foreground to #707070.
extensions/​theme-defaults/​themes/​2026-dark.json Sets the editor placeholder foreground to #8C8C8C.

Review effort: Balanced

@Amy34831 amy woods (Amy34831) left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

  • [Amy34831 ] Image.jpg

@Amy34831

Copy link
Copy Markdown

🟢/ Approval recommended

The placeholder contrast update has no active review issues.

No open issues 🎉

What changed in this PR
Review effort: Balanced

amy woods (@Amy34831)

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

Labels

None yet

Projects

None yet

4 participants