Skip to content

fix(ui-core): dark-mode support for features empty-placeholder gradient - #33876

Merged
shah-harshit merged 5 commits into
mainfrom
fix/ai-dark-empty-placeholder
Sep 23, 2026
Merged

shah-harshit merged 5 commits into
mainfrom
fix/ai-dark-empty-placeholder

Conversation

@shah-harshit

@shah-harshit shah-harshit commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

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-features mirror token, which is a Tailwind @property { inherits: false } — so a .dark-mode ancestor can't re-point it (the element keeps the light initial value).

Fix:

  • features-empty-placeholder.tsx now reads the source token var(--gradient-empty-placeholder-features) (a normal inheriting custom property), so a .dark-mode redeclaration reaches it.
  • globals.css adds a dark value for --gradient-empty-placeholder-features (fades to the page gray-950 with a subtle blue tint top/bottom, mirroring the light gradient).

Light mode is byte-unchanged (same source token value).

globals.css is intentionally left un-Prettier-formatted — it already fails prettier --check on main (see PR #33581 reviewer note); this diff is purely the additive dark token.

Testing

  • Confirmed @openmetadata/ui-core-components/globals.css resolves to source (./src/styles/globals.css), so the app bundles this change directly (no core rebuild).
  • Source token is inheriting, so .dark-mode flips it; light value unchanged.

🤖 Generated with Claude Code


Summary by Gitar

  • UI enhancements:
    • Added dark-mode support for legacy StatusBadge using design-system utility scale tokens
    • Configured .dark-mode theme styles for status-badge and status-badge-label elements
  • Dark mode fixes:
    • Added dark-mode styles for DataQualityTab status pills and ContractDetailTab success status badges
    • Configured dark variant for --gradient-empty-placeholder-features in globals.css and updated FeaturesEmptyPlaceholder to consume inheriting gradient token

This will update automatically on new commits.

RetriggerConfidence Score: 5/5

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.

  • Makes FeaturesEmptyPlaceholder consume the inheriting gradient source token and defines its dark-mode gradient.
  • Adds regression coverage for the component’s token wiring and caller-provided background override.
  • Migrates raised containers from fixed white or page-background colors to the semantic surface token.
  • Adds dark-mode utility colors for legacy status badges and specialized status pills.

Reviews (5) · Last reviewed commit: "fix(ui): dark-mode raise entity-detail c..."

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]>
@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 Sep 23, 2026
@shah-harshit shah-harshit self-assigned this Sep 23, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 72%
72.58% (104055/143362) 57.67% (63347/109838) 58.75% (20741/35302)

@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit c6c7998be23270442bc2e23ac72ab919642d7f06 in Playwright run 35864382116, attempt 1.

✅ 4561 passed · ❌ 0 failed · 🟡 5 flaky · ⏭️ 1 skipped · 🧰 0 lifecycle flaky

Performance

Blocking 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:

  • Common shard skew was 38.14% (convergence target: at most 15%).
  • Browser traffic was 224.41 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.23 per UI scenario (10829 boots / 4860 scenarios; convergence target: at most 1).
Shard Passed Failed Flaky Skipped Lifecycle failed Lifecycle flaky
✅ Shard advanced-search-01 130 0 0 0 0 0
✅ Shard chromium-01 143 0 0 0 0 0
✅ Shard chromium-02 150 0 0 0 0 0
✅ Shard chromium-03 178 0 0 0 0 0
✅ Shard chromium-04 189 0 0 0 0 0
✅ Shard chromium-05 169 0 0 0 0 0
🟡 Shard chromium-06 174 0 1 0 0 0
✅ Shard chromium-07 172 0 0 0 0 0
✅ Shard chromium-08 188 0 0 0 0 0
✅ Shard chromium-09 181 0 0 0 0 0
✅ Shard chromium-10 176 0 0 0 0 0
🟡 Shard chromium-11 175 0 1 0 0 0
✅ Shard chromium-12 180 0 0 0 0 0
🟡 Shard chromium-13 197 0 1 1 0 0
✅ Shard chromium-14 169 0 0 0 0 0
✅ Shard chromium-15 144 0 0 0 0 0
✅ Shard chromium-16 193 0 0 0 0 0
🟡 Shard chromium-17 202 0 1 0 0 0
✅ Shard chromium-18 153 0 0 0 0 0
🟡 Shard chromium-19 124 0 1 0 0 0
✅ Shard chromium-20 183 0 0 0 0 0
✅ Shard chromium-21 156 0 0 0 0 0
✅ Shard chromium-22 191 0 0 0 0 0
✅ Shard chromium-23 197 0 0 0 0 0
✅ Shard data-asset-rules-01 65 0 0 0 0 0
✅ Shard domain-isolation-01 16 0 0 0 0 0
✅ Shard global-state-01 34 0 0 0 0 0
✅ Shard import-export-01 51 0 0 0 0 0
✅ Shard import-export-02 99 0 0 0 0 0
✅ Shard ingestion-01 46 0 0 0 0 0
✅ Shard ingestion-02 55 0 0 0 0 0
✅ Shard reindex-01 40 0 0 0 0 0
✅ Shard search-01 12 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 5 flaky test(s) (passed on retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › Column lineage for dashboard -> mlModel (shard chromium-06, 1 retry)
  • Features/ArticleReviewerWorkflow.spec.ts › Context Center article reviewer approval flow (shard chromium-11, 1 retry)
  • Flow/ConditionalPermissions.spec.ts › User with owner permission can only view owned Search Services (shard chromium-13, 1 retry)
  • Features/ContextCenterDashboard.spec.ts › Create > Quick Link creates a quick link that appears in the Articles pillar card recent list (shard chromium-17, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard chromium-19, 1 retry)

📦 Download artifacts

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]>
shah-harshit and others added 2 commits September 23, 2026 18:04
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]>
@gitar-bot

gitar-bot Bot commented Sep 23, 2026

Copy link
Copy Markdown
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 FeaturesEmptyPlaceholder from a non-inheriting Tailwind mirror property to the inheriting source token, allowing .dark-mode to properly apply the dark variant. Adds dark gradient styling to globals.css that fades to page background with a subtle blue tint. No issues found.

Review coverage

📋 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

@sonarqubecloud

Copy link
Copy Markdown

This branch was previously deployed

1 inactive deployment
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