Repository navigation
Fixes 6035: Tokenize shared color constants - #32917
Conversation
❌ 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 |
✅ Playwright Results — workflow succeededValidated commit ✅ 4535 passed · ❌ 0 failed · 🟡 9 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) 53m 21s ⏱️ Max setup 6m 3s · max shard execution 22m 4s · max shard-job elapsed before upload 25m 10s · reporting 23s 🌐 224.72 requests/attempt · 2.23 app boots/UI scenario · 39.20% common-shard skew Optimization targets still in progress:
🟡 9 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 |
|
Confirmed — checked Withdrawing this finding — no code change needed here. |
…tants-theme # Conflicts: # openmetadata-ui-core-components/src/main/resources/ui/src/colors/entityPalette.ts # openmetadata-ui-core-components/src/main/resources/ui/src/components/application/form-field/fields/icon-picker-field.tsx # openmetadata-ui/src/main/resources/ui/scripts/design-tokens/gen-token-reference.js # openmetadata-ui/src/main/resources/ui/specs/tokens/token-reference.md
Color.constants tokenization (this PR) changed the chart's bar fills from raw hex to var(--om-color-*) tokens (GREEN_4/RED_3/YELLOW_3/BLUE_1). Update the 'correct colors for bars' assertions from #039855/#f24822/#f79009/#175cd3 to the matching visualization/warning/brand tokens. Fixes the failing Run Coverage step. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
entityPalette redefinition (this PR) replaced the old palette values, so the color picker no longer renders swatches for #B93815/#067647/#C11574. E2E tests that click 'Select color <hex>' for those removed values timed out. Point them at current palette hexes (#1470EF/#05A580/#F14C75) in the glossary and tag style-color flows.
Code Review ✅ No issues found 2 closed / 2 findings🟡 Medium risk · Shared UI color tokens change theme rendering across pickers and charts. Tokenizes shared color constants to follow the active theme, with entity palette colors rendered through tokens while remaining concrete in storage. The default icon-picker background color changed from blue to amber, which was addressed in a follow-up commit. ✅ 2 closed✅ Bug: Default icon-picker background color silently changed blue→amber
Closed: Bug: var() color constants break in SVG presentation attributes
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:
Fixes https://github.com/open-metadata/openmetadata-collate/issues/6035
This replaces raw presentation colors in
Color.constants.tswith project token references and adds token-backed presentation values for the shared entity palette. Fixed visualization and entity hues retain their existing values, while semantic text, surface, and status colors now follow the active light or dark theme.Persisted entity colors remain concrete hex values. Color and icon pickers translate known stored values to presentation tokens only while rendering, so theme changes cannot rewrite metadata. Concrete canvas button colors also remain unchanged because Canvas APIs require resolver fallbacks.
Type of change:
High-level design:
The core color layer now owns stable entity-palette and visualization tokens. The application exposes these through
--om-*aliases with concrete fallbacks, and theme-aware status colors use utility tokens whose lightness reverses in dark mode.ENTITY_PALETTE_HEXremains the storage-compatible API.ENTITY_PALETTEandgetEntityPalettePresentationColorprovide the rendering path used by the color and icon pickers.The generated token reference now classifies utility colors as semantic tokens and includes a regression test for that contract.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Not included; this change updates shared token primitives and preserves the existing categorical hues.
Checklist:
Fixes <issue-number>: <short explanation>.The PR appears safe to merge; no outstanding correctness, security, or repository-rule violations were identified.
Summary
This PR moves shared presentation colors onto the project token cascade while keeping persisted entity colors and Canvas fallbacks concrete.
Diagram
%%{init: {'theme': 'neutral'}}%% flowchart LR Stored[Persisted entity hex value] --> Match{Known palette value?} Match -->|Yes| Token[Entity presentation token] Match -->|No| Custom[Original custom color] Token --> Cascade[Active theme cascade] Cascade --> Picker[Color and icon picker rendering] Custom --> Picker Picker --> Save[Emit concrete hex value]Reviews (4) · Last reviewed commit: "test(ui): use current entity-palette hex..."