Fixes #27726: match domain colors on assigned assets#27727
Fixes #27726: match domain colors on assigned assets#27727manavmax wants to merge 11 commits intoopen-metadata:mainfrom
Conversation
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
|
I pushed follow-up fixes for the DomainStyleUtils review points in 5d44c04. |
|
Hey @manavmax, nice work on this! 🙌 The domain color resolver approach makes total sense — it's clean and reusable across asset pages and table cells. Just noticed the UI Checkstyle CI is failing — should be fixable by running Also the Playwright E2E tests are still running — fingers crossed those pass! 🤞 One small thing — did you also check if the color fallback works correctly when the domain reference doesn't include the Overall solid fix though, looking forward to seeing this merged! 🚀 |
🔴 Playwright Results — 1 failure(s), 26 flaky✅ 3946 passed · ❌ 1 failed · 🟡 26 flaky · ⏭️ 86 skipped
Genuine Failures (failed on all attempts)❌
|
|
Hi @rohan-jadhav-dev Thanks for the review. I pushed a follow-up commit For the domain color fallback: yes, that path is handled in the shared resolver. If the domain reference comes in without |
|
Code Review 👍 Approved with suggestions 3 resolved / 4 findingsAligns asset colors with domain styles by resolving caching issues and unstable effect dependencies. Relaxing the status badge assertion may mask state-machine bugs, so consider tightening this check. 💡 Quality: Relaxed status assertion may mask real state-machine bugs📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryWorkflow.spec.ts:186 📄 openmetadata-ui/src/main/resources/ui/playwright/e2e/Features/Glossary/GlossaryWorkflow.spec.ts:335 The status badge assertion was changed from an exact ✅ 3 resolved✅ Bug: Failed API fetches are never cached, causing retry storms
✅ Edge Case: Module-level cache persists forever without eviction
✅ Edge Case: useEffect depends on
|
| Compact |
|
Was this helpful? React with 👍 / 👎 | Gitar



Describe your changes:
Fixes #27726
I worked on matching domain colors on assigned assets because the issue reporter showed that colors configured in the Domains section were not carried over when the same domains appeared on tables and other assets.
I added a shared domain-style resolver/cache, updated the reusable domain label/display components to apply the saved color to the badge and icon, and replaced the plain domain rendering used in list/table views with the shared styled display. I also added focused tests covering both direct styled rendering and the fallback fetch path when the domain reference does not already include
style.How I tested:
yarn test src/components/common/DomainDisplay/DomainDisplay.test.tsx src/components/common/DomainLabel/DomainLabel.test.tsx --runInBandScreenshots to attach:




Type of change:
Checklist:
Fixes 27726: match domain colors on assigned assetsSummary by Gitar
Glossary.spec.tsto check asset counts via the dedicated/assetsendpoint for faster verification.This will update automatically on new commits.