Skip to content

fix(ui): apply semantic dark-theme component colors - #33255

Open
shah-harshit wants to merge 6 commits into
mainfrom
6568-dark-theme-alert-semantics
Open

fix(ui): apply semantic dark-theme component colors#33255
shah-harshit wants to merge 6 commits into
mainfrom
6568-dark-theme-alert-semantics

Conversation

@shah-harshit

@shah-harshit shah-harshit commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Describe your changes:

Part of open-metadata/openmetadata-collate#6568
Also advances open-metadata/openmetadata-collate#6569
Gate contract: open-metadata/openmetadata-collate#6564
Token foundation: #33249

This combines two small slices from the same core-theme workstream:

  • Replaces numeric utility-palette borders on success, warning, and error Alerts with approved semantic subtle-border roles.
  • Migrates AI sidebar surfaces, borders, text, hover states, section headings, and collapsed-rail icons to shared semantic roles.
  • Makes the shared TextArea resize handle follow border-primary without hardcoded light/dark colors or an explicit dark override.
  • Adds focused regression tests for Alert severities and sidebar heading typography.
  • Adds the missing Layer-2 bg-secondary-hover alias and repairs token generation so semantic scale names are not duplicated as numeric extensions.
  • Keeps component APIs, interaction behavior, and existing light-mode values unchanged.

The sidebar hover alias resolves to the existing #f5f5f5 light value and the approved translucent hover treatment in dark mode.

Brand/informational and neutral Alerts remain unchanged because their desired dark treatments do not yet have light-preserving semantic roles. AI sidebar page, selected, brand, and badge palette values also remain unchanged pending the binding decisions in Gate Zero; badge migration belongs to open-metadata/openmetadata-collate#6570.

Type of change:

  • Bug fix
  • Improvement
  • Tests

High-level design:

Alert variants continue to use the existing component API and now select border-success-subtle, border-warning-subtle, or border-error-subtle.

The AI sidebar keeps its existing structure and local LESS aliases, but those aliases now resolve shared --om-* semantic roles for surfaces, borders, text, and interaction states. Typography headings use the semantic text-quaternary utility. The TextArea resize glyph is rendered as a theme-neutral CSS mask and tinted by border-primary; this preserves its existing light/dark values while allowing live theme changes without separate assets. Token generation now keeps numeric radius and font-size extensions strictly numeric and sorted, avoids re-emitting manually owned black/white tokens, classifies letter-spacing tokens, and resolves the generated-block drift inherited from the token-foundation change. No page-local dark selectors or duplicate palettes are introduced.

No theme provider, API, or submodule pointer is changed. The generated token reference is refreshed from tokens.css.

Tests:

Unit tests

  • AI sidebar suite — 58 tests passed across 10 suites.
  • Full core-components suite — 135 tests passed across 15 files.

Build and static checks

  • OpenMetadata UI production build passed.
  • Core-components production build passed, including declaration generation.
  • Focused ESLint and Prettier checks passed with zero errors.
  • Tailwind audit on changed TypeScript files — 0 errors, 0 warnings, 0 informational findings.
  • Tailwind deprecation guard passed.
  • Design-token tests — 11 passed plus 28 scanner checks; token generation, duplicate detection, and drift checks passed.
  • git diff --check passed.

The focused app lint reports two existing warnings in ContextCenterSubNavSections.tsx for per-item API requests and a raw title attribute; neither is introduced or changed here.

Visual coverage

  • Existing Components/Alert Storybook stories exercise all Alert variants in light, dark, and side-by-side modes.
  • Sidebar behavior is covered by its focused Jest suite; selected and badge colors are intentionally unchanged until Gate Zero defines their roles.

UI screen recording / screenshots:

Not attached. The Alert output is covered by existing Storybook variants; the sidebar changes replace color sources without changing layout or interaction behavior.

Checklist:

  • I have read the CONTRIBUTING document.
  • The PR references the implementation ticket, Gate Zero contract, and merged token foundation.
  • Alert and sidebar light-mode values remain unchanged.
  • Unresolved Alert, selected-navigation, brand, page, and badge mappings are deferred rather than guessed.
  • TextArea resize-handle theming uses one semantic treatment in both themes.
  • No raw theme-sensitive colors or explicit dark overrides were added.
  • JSON Schema migrations are not applicable.

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

github-actions Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

✅ Playwright Results — workflow succeeded

Validated commit 27cf2b522ea5116379809a950c2885135bddef1b in Playwright run 34819452080, attempt 1.

✅ 4498 passed · ❌ 0 failed · 🟡 8 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) 58m 52s

⏱️ Max setup 4m 50s · max shard execution 21m 39s · max shard-job elapsed before upload 25m 13s · reporting 18s

🌐 218.73 requests/attempt · 2.23 app boots/UI scenario · 39.95% common-shard skew

Optimization targets still in progress:

  • Common shard skew was 39.95% (convergence target: at most 15%).
  • Browser traffic was 218.73 requests per attempt (convergence target: fewer than 200).
  • Application boot ratio was 2.23 per UI scenario (10634 boots / 4759 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 141 0 0 0 0 0
✅ Shard chromium-02 118 0 0 0 0 0
🟡 Shard chromium-03 165 0 1 0 0 0
✅ Shard chromium-04 153 0 0 0 0 0
✅ Shard chromium-05 145 0 0 0 0 0
✅ Shard chromium-06 134 0 0 0 0 0
🟡 Shard chromium-07 145 0 1 0 0 0
✅ Shard chromium-08 157 0 0 0 0 0
✅ Shard chromium-09 203 0 0 0 0 0
✅ Shard chromium-10 166 0 0 0 0 0
🟡 Shard chromium-11 167 0 1 0 0 0
✅ Shard chromium-12 131 0 0 0 0 0
✅ Shard chromium-13 182 0 0 0 0 0
🟡 Shard chromium-14 177 0 1 0 0 0
✅ Shard chromium-15 135 0 0 0 0 0
✅ Shard chromium-16 152 0 0 1 0 0
🟡 Shard chromium-17 183 0 1 0 0 0
✅ Shard chromium-18 154 0 0 0 0 0
🟡 Shard chromium-19 149 0 1 0 0 0
🟡 Shard chromium-20 158 0 1 0 0 0
✅ Shard chromium-21 164 0 0 0 0 0
✅ Shard chromium-22 195 0 0 0 0 0
✅ Shard chromium-23 180 0 0 0 0 0
✅ Shard chromium-24 128 0 0 0 0 0
🟡 Shard chromium-25 158 0 1 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 74 0 0 0 0 0
✅ Shard import-export-02 76 0 0 0 0 0
✅ Shard ingestion-01 41 0 0 0 0 0
✅ Shard ingestion-02 53 0 0 0 0 0
✅ Shard reindex-01 28 0 0 0 0 0
✅ Shard search-01 12 0 0 0 0 0
✅ Shard search-rbac-01 29 0 0 0 0 0
🟡 8 flaky test(s) (passed on retry)
  • Features/Glossary/GlossaryHierarchy.spec.tsshould cancel move operation (shard chromium-03, 1 retry)
  • Pages/ServiceListing.spec.tsshould render the service listing page (shard chromium-07, 1 retry)
  • Flow/AddRoleAndAssignToUser.spec.tsVerify assigned role to new user (shard chromium-11, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.tsverify create lineage for entity - Directory (shard chromium-14, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.tsverify create lineage for entity - Api Endpoint (shard chromium-17, 1 retry)
  • Pages/UserDetails.spec.tsCreate team with domain and verify visibility of inherited domain in user profile after team removal (shard chromium-19, 1 retry)
  • Features/Workflows/WorkflowOssRestrictions.spec.tsevent-type-select is disabled in OSS (shard chromium-20, 1 retry)
  • Features/Glossary/GlossaryAdvancedOperations.spec.tsshould remove individual reference from term (shard chromium-25, 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

@github-actions

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 2 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 2 warning(s) across 1 changed file(s).

Count Rule
1 openmetadata-imports/no-api-calls-in-iteration
1 openmetadata-ui-patterns/no-raw-title-attribute
All findings
Location Rule Message
🟡 src/components/platform/ai-shell/Sidebar/ContextCenterSubNavSections.tsx:127:36 openmetadata-imports/no-api-calls-in-iteration Avoid issuing one API request per item. Fetch at the data owner, use a bulk endpoint, or use useQueries with an intentional concurrency policy.
🟡 src/components/platform/ai-shell/Sidebar/ContextCenterSubNavSections.tsx:180:13 openmetadata-ui-patterns/no-raw-title-attribute Use from @openmetadata/ui-core-components instead of raw title="" attributes for consistent tooltip behavior.

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

@shah-harshit shah-harshit changed the title fix(ui): use semantic alert severity borders fix(ui): apply semantic alert and AI navigation colors Sep 13, 2026
@github-actions

github-actions Bot commented Sep 13, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 72%
72.86% (102472/140632) 57.59% (61987/107632) 58.83% (20352/34589)

@gitar-bot

gitar-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Applies semantic alert and AI navigation colors by replacing numeric utility-palette borders on Alert variants with approved semantic subtle-border roles and migrating AI sidebar surfaces, borders, text, and interaction states to shared semantic tokens. Light-mode values remain unchanged, token generation is repaired to avoid duplication, and comprehensive tests confirm all changes. No issues found.

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

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.

1 participant