OpenMetadata icon indicating copy to clipboard operation
OpenMetadata copied to clipboard

Fixed the colors for context center

Open Rohit0301 opened this issue 5 months ago โ€ข 5 comments

Describe your changes:

Fixes #

I worked on ... because ...

Type of change:

  • [ ] Bug fix
  • [ ] Improvement
  • [ ] New feature
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] Documentation

High-level design:

N/A โ€” small change.

Tests:

Use cases covered

Unit tests

Backend integration tests

Ingestion integration tests

Playwright (UI) tests

Manual testing performed

UI screen recording / screenshots:

Not applicable.

Checklist:

  • [x] I have read the CONTRIBUTING document.
  • [ ] My PR title is Fixes <issue-number>: <short explanation>
  • [ ] My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • [ ] I have commented on my code, particularly in hard-to-understand areas.
  • [ ] For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • [ ] For UI changes: I attached a screen recording and/or screenshots above.
  • [ ] I have added tests (unit / integration / Playwright as applicable) and listed them above.

Greptile Summary

This PR migrates raw Tailwind color tokens across 15 Context Center and Knowledge Center UI components to semantic design-system tokens โ€” replacing e.g. bg-gray-100 with bg-tertiary, text-gray-500 with text-quaternary, text-error-600 with text-error-primary, and raw blue/brand shades with their utility-* equivalents.

  • ~50 color-class substitutions across archive, memories, documents, knowledge cards, modals, and hierarchy components; the vast majority follow the correct gray-500 โ†’ quaternary / error-600 โ†’ error-primary / blue-50 โ†’ utility-blue-50 mapping pattern.
  • Two spots deviate: the Clock icon in MemoriesView.component.tsx and the File06 icon in KnowledgePagesHierarchy.tsx both map text-gray-500 to text-utility-gray-500 instead of text-quaternary, leaving those icons at a different shade than their sibling text elements.

Confidence Score: 4/5

Safe to merge after correcting two icon color tokens that diverge from the established mapping pattern.

The Clock icon in MemoriesView and the File06 icon in KnowledgePagesHierarchy use tw:text-utility-gray-500, while every other gray-500 element in the PR (including Typography nodes immediately adjacent to these icons) is migrated to tw:text-quaternary. At runtime the icons will render at a visibly different shade than the surrounding text.

MemoriesView/MemoriesView.component.tsx (line 274) and KnowledgePagesHierarchy/KnowledgePagesHierarchy.tsx (line 567) โ€” both use tw:text-utility-gray-500 where tw:text-quaternary was intended.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/MemoriesView/MemoriesView.component.tsx Color token migration; Clock icon at line 274 incorrectly uses tw:text-utility-gray-500 while the immediately adjacent Typography uses tw:text-quaternary (the consistent mapping for gray-500 across the entire PR).
openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgePagesHierarchy/KnowledgePagesHierarchy.tsx Color token migration; File06 icon at line 567 uses tw:text-utility-gray-500 instead of tw:text-quaternary โ€” inconsistent with every other gray-500 migration in this PR.
openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ArticleDetailHeader/ArticleDetailHeader.component.tsx Replaces bg-gray-100, text-gray-500/400/600, text-brand-600, fill-blue-500, text-error-600, text-primary-900 with semantic tokens; mapping is consistent throughout.
openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/CreateMemoryModal/CreateMemoryModal.component.tsx Wide-ranging color token migration (bg-gray-50/100/200, text-gray-400/500, border-gray-100/200, bg-blue-50, border-indigo-100, text-brand-600/700, text-error-600); all substitutions are self-consistent.
openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/DocumentsView/DocumentsView.component.tsx Migrates text-gray-400/500, bg-blue-50/100, text-blue-700, text-error-600, bg-gray-25 to semantic tokens; all mappings are consistent.
openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/DocumentsView/DocumentPreviewPanel.component.tsx Replaces text-gray-500 with text-quaternary and text-error-600 with text-error-primary throughout; consistent.
openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/ExtractedMemoriesCard/ExtractedMemoriesCard.component.tsx Migrates text-gray-500/400/900 and bg-gray-50 to semantic tokens; text-gray-500 correctly maps to text-quaternary in all instances here.
openmetadata-ui/src/main/resources/ui/src/pages/ContextCenterPage/ContextCenterMemoriesPage/ContextCenterMemoriesPage.tsx Updates filter-button active state colors and dropdown typography from raw brand/blue/gray tokens to utility equivalents; consistent with the rest of the PR.
openmetadata-ui/src/main/resources/ui/src/pages/ContextCenterPage/ContextCenterArchivePage/ContextCenterArchivePage.tsx Migrates active/inactive tab border and background tokens from raw brand/gray values to utility equivalents; consistent with pattern.
openmetadata-ui/src/main/resources/ui/src/components/KnowledgeCenter/KnowledgeCard/KnowledgeCard.tsx Migrates text-gray-500/400, hover border color, and Dot text color to semantic tokens; all mappings are consistent.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[Raw Tailwind token] --> B{Token type}
    B -->|text-gray-500| C[tw:text-quaternary]
    B -->|text-gray-400| D[tw:text-utility-gray-400]
    B -->|bg-gray-100| E[tw:bg-tertiary]
    B -->|bg-gray-50 hover| F[tw:bg-secondary]
    B -->|bg-blue-50| G[tw:bg-utility-blue-50]
    B -->|text-brand-600| H[tw:text-fg-brand-primary]
    B -->|text-brand-700 icon| I[tw:text-utility-brand-700]
    B -->|text-error-600| J[tw:text-error-primary]
    B -->|border-gray-100| K[tw:border-tertiary]
    C -->|โŒ Clock & File06 icons| L[tw:text-utility-gray-500 โ€” incorrect]
    C -->|โœ… All other gray-500| M[tw:text-quaternary โ€” correct]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
    A[Raw Tailwind token] --> B{Token type}
    B -->|text-gray-500| C[tw:text-quaternary]
    B -->|text-gray-400| D[tw:text-utility-gray-400]
    B -->|bg-gray-100| E[tw:bg-tertiary]
    B -->|bg-gray-50 hover| F[tw:bg-secondary]
    B -->|bg-blue-50| G[tw:bg-utility-blue-50]
    B -->|text-brand-600| H[tw:text-fg-brand-primary]
    B -->|text-brand-700 icon| I[tw:text-utility-brand-700]
    B -->|text-error-600| J[tw:text-error-primary]
    B -->|border-gray-100| K[tw:border-tertiary]
    C -->|โŒ Clock & File06 icons| L[tw:text-utility-gray-500 โ€” incorrect]
    C -->|โœ… All other gray-500| M[tw:text-quaternary โ€” correct]

Reviews (4): Last reviewed commit: "fixed colors" | Re-trigger Greptile

Rohit0301 avatar Jun 18 '26 17:06 Rohit0301

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.47% (69437/109385) 45.73% (39681/86764) 47.66% (12081/25344)

github-actions[bot] avatar Jun 18 '26 18:06 github-actions[bot]

๐ŸŸก Playwright Results โ€” all passed (13 flaky)

โœ… 4386 passed ยท โŒ 0 failed ยท ๐ŸŸก 13 flaky ยท โญ๏ธ 88 skipped

Shard Passed Failed Flaky Skipped
๐ŸŸก Shard 1 324 0 1 4
๐ŸŸก Shard 2 820 0 4 9
๐ŸŸก Shard 3 824 0 1 8
โœ… Shard 4 881 0 0 12
โœ… Shard 5 745 0 0 47
๐ŸŸก Shard 6 792 0 7 8
๐ŸŸก 13 flaky test(s) (passed on retry)
  • Flow/SearchRBAC.spec.ts โ€บ a fully denied user sees neither asset type when browsing (shard 1, 2 retries)
  • Features/Announcements/AnnouncementEntity.spec.ts โ€บ creates an announcement on a domain (shard 2, 1 retry)
  • Features/DataQuality/DataQualityDashboard.spec.ts โ€บ Entity Health pie chart segment click redirects to Test Cases with correct status (shard 2, 1 retry)
  • Features/DomainTierCertificationVoting.spec.ts โ€บ Domain - Certification assign, update, and remove (shard 2, 1 retry)
  • Features/Glossary/GlossaryHierarchy.spec.ts โ€บ should cancel move operation (shard 2, 1 retry)
  • Features/KnowledgeCenterList.spec.ts โ€บ Knowledge Center List - Verify Recently Viewed widget (shard 3, 1 retry)
  • Pages/GlossaryImportExport.spec.ts โ€บ Export maintains hierarchy structure in CSV (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts โ€บ Column lineage for dashboard -> dashboardDataModel (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts โ€บ Column lineage for searchIndex -> table (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts โ€บ Verify lineage schema filter selection (shard 6, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts โ€บ Verify custom properties tab IS visible for supported type: searchIndex (shard 6, 1 retry)
  • Pages/Lineage/PlatformLineage.spec.ts โ€บ Verify domain platform view (shard 6, 1 retry)
  • Pages/Tags.spec.ts โ€บ Classification Page (shard 6, 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[bot] avatar Jun 18 '26 21:06 github-actions[bot]

Code Review โœ… Approved

Updates the color palette for the context center component to ensure proper visual consistency. No issues found.

Options

Display: compact โ†’ Showing less information.

Comment with these commands to change:

Compact
gitar display:verbose         

Was this helpful? React with ๐Ÿ‘ / ๐Ÿ‘Ž | Gitar

gitar-bot avatar Jun 25 '26 08:06 gitar-bot