Repository navigation
fix(ui-core): dark-mode support for features empty-placeholder gradient - #33876
Conversation
The "features" EmptyPlaceholder (e.g. the Glossary empty state) had a light-only white gradient that stayed white in dark. It read the `--tw-gradient-*` mirror (@Property inherits:false) inline, which a .dark-mode ancestor can't re-point. Read the source `--gradient-empty-placeholder-features` token (inherits) instead, and add a dark value (fades to the page with a subtle blue tint). Light unchanged. globals.css is intentionally left un-Prettier-formatted (it already fails `--check` on main); the diff here is purely the additive dark token. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
✅ Playwright Results — workflow succeededValidated commit ✅ 4561 passed · ❌ 0 failed · 🟡 5 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 39m 18s ⏱️ Max setup 4m 29s · max shard execution 22m 23s · max shard-job elapsed before upload 25m 39s · reporting 14s 🌐 224.41 requests/attempt · 2.23 app boots/UI scenario · 38.14% common-shard skew Optimization targets still in progress:
🟡 5 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Repaint every StatusBadge status in dark mode to the design-system utility scale (500 @ 16% bg, 500 @ 35% border, 400 text) — the same tokens the core Badge resolves — so the legacy badge matches the Dark Mode Home spec without a structural rewrite. Dark-only override; light values stay frozen. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
The Explore DataQualityTab and ContractDetailTab re-color specific status pills with raw legacy palette vars at higher specificity, which defeated the base StatusBadge dark turnaround in those spots. Add .dark-mode overrides that keep the custom light tints frozen and swap only the fills to the utility scale (auto-flips in dark). Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Address greptile P2. jsdom can't resolve the CSS var() cascade, so the dark flip itself is only verifiable in Storybook; this guards the wiring that actually regressed — the background must read the inheriting --gradient-* custom property, not the --tw-gradient-* mirror (@Property inherits:false) that can't flip for descendants. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Entity-detail cards, widgets, tab content and tables read bg-primary (or raw white), so in dark they render the page color (#0c0e12) and blend into the page, losing hierarchy. Switch these raised container surfaces to --om-color-bg-surface, which is #fff in light (identical, frozen) and #22262f in dark. Scope: activity-feed cards/columns, generic tab content, right-panel nav, task tab, feed editor, the common Table container + dropdown, and the custom-property card. Intentional brand-fill count badge, segmented controls, and row-hover states are left as-is. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
Code Review ✅ Approved🟡 Medium risk · Multiple UI surfaces and status badges receive theme-dependent styling changes. Fixes dark-mode support for the features empty-placeholder gradient by switching 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 |
|



Summary
The features variant of
EmptyPlaceholder(e.g. the Glossary "Build your business dictionary" empty state) rendered a light-only white gradient background that stayed white in dark mode, making the header text nearly invisible.Cause: the component applied the gradient inline via the
--tw-gradient-empty-placeholder-featuresmirror token, which is a Tailwind@property { inherits: false }— so a.dark-modeancestor can't re-point it (the element keeps the light initial value).Fix:
features-empty-placeholder.tsxnow reads the source tokenvar(--gradient-empty-placeholder-features)(a normal inheriting custom property), so a.dark-moderedeclaration reaches it.globals.cssadds a dark value for--gradient-empty-placeholder-features(fades to the pagegray-950with a subtle blue tint top/bottom, mirroring the light gradient).Light mode is byte-unchanged (same source token value).
Testing
@openmetadata/ui-core-components/globals.cssresolves to source (./src/styles/globals.css), so the app bundles this change directly (no core rebuild)..dark-modeflips it; light value unchanged.🤖 Generated with Claude Code
Summary by Gitar
StatusBadgeusing design-system utility scale tokens.dark-modetheme styles forstatus-badgeandstatus-badge-labelelementsDataQualityTabstatus pills andContractDetailTabsuccess status badges--gradient-empty-placeholder-featuresinglobals.cssand updatedFeaturesEmptyPlaceholderto consume inheriting gradient tokenThis will update automatically on new commits.
The PR appears safe to merge with no outstanding correctness, security, or repository-rule issues.
Summary
This PR corrects dark-mode styling across empty placeholders and several legacy application surfaces.
FeaturesEmptyPlaceholderconsume the inheriting gradient source token and defines its dark-mode gradient.Reviews (5) · Last reviewed commit: "fix(ui): dark-mode raise entity-detail c..."