fix(ui): dark-mode AI sidebar and CodeMirror editors - #33567
Conversation
The active sidebar nav item used raw palette steps that never dark-flip: @ask-bg-active = gray-blue-100 and @ask-brand-active = brand-800. In dark mode the selected item rendered a near-white (#eaecf5) pill with dark-blue text — verified on devrel.getcollate.io/ai-dashboards. Point these deferred (#6564) roles at semantic tokens that adapt: interactive-selected (brand @16% dark / brand-50 light) for the surface, link (brand-300 dark / brand-600 light) for the icon/label, and bg-brand for the brand badge. Light mode stays brand-tinted. Refs open-metadata/openmetadata-collate#6573 open-metadata/openmetadata-collate#6564 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
…nction hold Address review: point the selected/brand nav roles at the *utility* scale (utility-gray-blue-100, utility-brand-800, utility-brand-50) instead of interactive-selected/link/bg-brand. Utility colors derive from --color-brand-*, so custom branding still applies; they keep their exact light values (light-freeze) and flip in dark (gray-blue-900 / brand-200 / brand-950). Selected surface stays neutral gray-blue while the count badge stays brand, so they remain distinct in both themes. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
The selected/pressed sidebar surface used a solid neutral gray-blue-900 in dark, which is one palette step from the gray-blue-950 panel and is therefore effectively invisible. The design recording shows a blue-tinted pill (brand-500 @16%) in dark while keeping a neutral gray-blue-100 pill in light. Route @ask-bg-active through a new --ask-selected-surface custom property that .dark-mode flips to --om-color-interactive-selected (brand-500 @16%); light leaves it unset and falls back to gray-blue-100, so light mode is unchanged. This fixes all eight active/pressed surfaces at once. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
Corrected the dark selected-pill against the design recording (source of truth). Earlier this PR used a neutral gray-blue-900 pill in dark. Verified against the recording that this is wrong on two counts:
Fix: Note: the dark brand tint resolves at build time ( Commit: f187de6 |
The active nav label and icon resolved to brand-200 in dark (utility-brand-800 dark step), one step paler than the design recording, which samples brand-300 (#84caff) at the glyph core. Route @ask-brand-active through --ask-selected-fg, which .dark-mode sets to --color-brand-300; light stays on utility-brand-800 (brand-800), so light mode is unchanged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CodeMirror ships a light theme, so every editor (SchemaEditor, table query cards, JSON/manifest RJSF widgets, ontology query console) kept a light editor surface, gutter, line numbers, cursor, selection, and active line in dark mode. Add a dark-scoped block in the shared code-mirror.less mapping that chrome to semantic --om-* tokens; appended last so it wins over the light `.custom-code-mirror-theme`. Covers all CodeMirror instances at once. Syntax token hues are left intact (they read fine on the dark surface); only comments are lifted to the muted text tone for legibility. No editor content, undo history, or focus is touched (pure CSS). Refs open-metadata/openmetadata-collate#6580 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CodeMirror's .CodeMirror-focused .CodeMirror-selected (light lavender) has equal specificity and loads later, so it overrode the dark selection during editing. Include the focused state so the dark selection color wins. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Rest (non-selected) nav/list icons used @ask-text-quaternary (gray-400), which reads a step too bright on the dark surface; the design recording samples ~gray-600. Route the four nav/list icon usages through @ask-icon-rest, which .dark-mode flips to --color-gray-600; light keeps quaternary (frozen). Scoped to icons only — chevrons, expand buttons, and headers keep quaternary. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
CodeMirror 5's default syntax hues (keyword #708, string #a11, number #164, atom #219, …) are dark saturated colors for a light background and fail contrast on the dark editor surface. Remap keyword/def/variable/number/string/ type/operator/error tokens to light palette hues, nested under .dark-mode .CodeMirror so they outrank the default .cm-s-default rules. Light editors keep the defaults (dark-scoped). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Switch sidebar.less and code-mirror.less from the app-level --om-color-* aliases to the globals.css --color-* semantic tokens they resolve to (--om-color-interactive-selected -> --color-bg-brand-primary, --om-color-bg-secondary-hover -> --color-bg-secondary_hover, the rest 1:1). Same computed values in both themes; no behavior change. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This reverts commit da668c9.
Code Review ✅ Approved🟢 Low risk Adds dark-mode styles for the AI sidebar selected state, CodeMirror editors, and empty-state illustrations. All changes route through semantic tokens to preserve light mode and ensure proper contrast in dark mode—no issues found. OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
|



Describe your changes:
Refs open-metadata/openmetadata-collate#6573 (sidebar/nav), open-metadata/openmetadata-collate#6580 (editors), open-metadata/openmetadata-collate#6577 (empty-state assets)
Gate contract: open-metadata/openmetadata-collate#6564
Combines three small, non-overlapping dark-mode fixes.
1. AI sidebar selected/active state (
sidebar.less) — verified against the design recording (source of truth):--om-color-interactive-selected(brand-500 @16%). Covers all 8 active/pressed surfaces.brand-300(#84caff), the recording's glyph-core color.#61656c) to match the recording; quaternary (gray-400) read a step too bright.--ask-*custom properties; light is frozen.2. CodeMirror editors (
code-mirror.less) — CodeMirror 5 ships a light theme, so editor surface, gutter, line numbers, cursor, selection, active-line, and syntax tokens stayed light in dark. Dark-scoped block maps chrome to semantic--om-*tokens and remaps the default syntax hues (keyword#708, string#a11, …) — which fail contrast on the dark surface — to light palette hues, nested under.dark-mode .CodeMirrorso they outrank CM's defaults.3. Empty-state / placeholder illustrations (28 SVGs) — no-data/empty/not-found illustrations shipped light-theme fills (grays, white "paper", dark indigo) that stayed light in dark mode. Neutral fills routed through
currentColoror semantic--omtext/border tokens (light values ≈ originals, so light unchanged); white paper →--om-color-bg-surface; brand-blue accents left intact. Geometry untouched; connector/company logos deliberately not changed (fixed-color brand exception).Type of change:
Checklist:
The current pull request appears safe to merge, with no outstanding reportable findings.
Summary
This pull request improves dark-mode presentation for the AI sidebar and CodeMirror 5 editors.
Reviews (10) · Last reviewed commit: "Merge branch 'main' into 6573-nav-select..."