Skip to content

Fixes open-metadata/openmetadata-collate#7317: dark-mode surfaces and borders render light - #35271

Merged
shah-harshit merged 3 commits into
mainfrom
shah-harshit/dark-mode-white-surfaces
Oct 12, 2026
Merged

shah-harshit merged 3 commits into
mainfrom
shah-harshit/dark-mode-white-surfaces

Conversation

@shah-harshit

@shah-harshit shah-harshit commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes open-metadata/openmetadata-collate#7317

Dark mode showed light surfaces and white borders across pages: tab count badges, the Activity Feed comments box, the conversation/task drawer, the create-task page, the column detail drawer, bulk-edit operation badges, and most dividers.

Root cause: #34936 added light values for the legacy --om-* aliases on :root in tokens.css. tokens.css is imported after app.less, and :root has the same specificity as the .dark-mode bridge on <html>, so the light values won. Every legacy var bridged in app.less, such as @grey-15 (the app-wide border), @grey-1/2/5/6/9/26, @blue-29/30 and the status tints, stayed light in dark mode.

Changes:

  • Root-cause fix: the dark bridge selector is now :root.dark-mode, so it wins regardless of import order. Light values are unchanged.
  • Remaining white edges: borders using #dde3ea on non-antd surfaces (feed editor toolbar, test-connection cards, explore/retention core dialogs) now use the core --tw-border-color-secondary / tw:border-secondary. Antd-only surfaces and classic mode are out of scope: antd is being removed and classic mode won't support dark.
  • Column detail panel spacing: the title no longer always truncates (amount → amo…). The legacy max-width: 95% sat inside the shrink-to-fit tooltip trigger added in Fixes open-metadata/openmetadata-collate#6890: Migrate antd Tooltip to core and freeze antd imports with ESLint #35193. Key Profile Metrics now uses the same 14px inset, section gap and divider as the sibling sections.
  • Devrel dark palette (Primary Blue #1570EF): dark accents (text/icons/links, --color-text-link, fg-brand-*) move from brand-300 #84caff to brand-400 #53b1fd. Fills and borders use #1570ef: the selected explore card has a 1px #1570ef border, the AI sidebar selected pill uses #1570ef at 20%, and sidebar hover uses white at 6%. The sidebar previously read var(--color-brand-300), which is never emitted, so it silently fell back. It now reads --tw-color-brand-*.

Type of change:

  • Bug fix

High-level design:

N/A: CSS cascade fix plus token swaps. No component APIs changed.

Tests:

Use cases covered

  • Dark mode, table page: tab count badges, Activity Feed list and comments box, conversation/task drawer, column detail drawer (title, Key Profile Metrics alignment, dividers) all render on dark surfaces with subtle borders
  • Dark mode: create-task page, explore summary panel dividers, explore selected card (#1570ef) and link/accent colour (#53b1fd)
  • Light mode: column detail panel unchanged apart from the title no longer clipping

Unit tests

  • jest src/components/Database/ColumnDetailPanel src/components/common/EntityImport: 10 suites, 109 tests passed

Checks

  • yarn ui-checkstyle:changed (OSS + core) clean
  • yarn token-audit: no new errors (88 pre-existing on main, unchanged)

UI screenshots (dark, main → this branch)

main this branch
Activity Feed before_feed after_feed
Column detail panel before_panel after_panel
Explore before_explore after_explore

Light, column detail panel (this branch): after_light

Not in this PR (Collate-only code): the tag details popover header's tw:border-2 tw:border-white (TagDetailsPopup.tsx), and the Auto Classification config card in the Add Tag modal.

tokens.css (imported after app.less) declares light values for the
legacy --om-* aliases on :root, which ties the .dark-mode bridge on
<html> and wins on order, so every bridged var stayed light in dark.
Scope the bridge to :root.dark-mode.

- point #dde3ea borders at the core secondary border token
- column panel: drop max-width 95% that always clipped the title;
  align Key Profile Metrics padding/divider with sibling sections
- dark accents follow the devrel palette: brand-400 for text/icons/links,
  brand-600 for the selected explore card and nav pill (20%)

Fixes open-metadata/openmetadata-collate#7317
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Oct 12, 2026
@shah-harshit shah-harshit self-assigned this Oct 12, 2026
@shah-harshit
shah-harshit marked this pull request as ready for review October 12, 2026 16:24
Antd is being removed and classic mode won't support dark, so keep the
fix to non-antd surfaces.
Classic mode gets no dark theme and antd-only surfaces are not themed
for dark; add the decision record and point the styling rule at it.
@gitar-bot

gitar-bot Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 1 closed / 1 findings

🟡 Medium risk · Changing the global dark-mode token bridge and brand palette affects surfaces, borders, and accents across the UI, potentially producing unreadable or inconsistent styling.

Fixes dark-mode surfaces and borders that rendered light by making the dark bridge selector :root.dark-mode so it wins regardless of tokens.css import order, and swaps remaining white borders to core --tw-border-color-secondary. The previously flagged unrecorded rule that classic mode and antd surfaces get no dark mode is now documented in docs/decisions/2026-10-12-dark-mode-targets-ai-mode-core-surfaces-only.md and linked from .claude/rules/frontend-styling.md. No issues found.

✅ 1 closed
✅ Quality: Unrecorded rule: classic mode and antd surfaces get no dark mode

📄 openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/FeedEditor/feed-editor.less:1002 📄 openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/FeedEditor/feed-editor.less:1012 📄 openmetadata-ui/src/main/resources/ui/src/styles/app.less:830-833
The PR description sets a scope rule that no file in the tree records: "Antd-only surfaces and classic mode are out of scope: antd is being removed and classic mode won't support dark." That rule decides which #dde3ea borders this PR changes (the commit 7bc3d67 reverted the antd-only swaps). It also decides which dark-mode bugs later contributors should fix. The repository squash-merges, so the rule disappears once this merges, and nothing under docs/decisions/ says it (the closest record, 2026-10-11-migrated-antd-components-adopt-core-styling.md, covers migrated components only). Add a record that states: "Classic (non-AI) mode does not support dark mode, and antd-only surfaces are not themed for dark; dark-mode fixes target core/Tailwind surfaces only." Or, if no such rule is meant to last, say so in the PR.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

Options

Display: compact → Counting what did not apply, without listing it.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source

@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 77%
77.22% (123428/159824) 63.37% (76581/120843) 64.82% (25699/39646)

@sonarqubecloud

Copy link
Copy Markdown

@shah-harshit
shah-harshit added this pull request to the merge queue Oct 12, 2026
Merged via the queue into main with commit 1701ab6 Oct 12, 2026
76 checks passed
@shah-harshit
shah-harshit deleted the shah-harshit/dark-mode-white-surfaces branch October 12, 2026 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants