Skip to content

Fix auto-classification tag text unreadable in dark mode - #39760

Merged
Rohit0301 merged 1 commit into
mainfrom
Rohit0301/auto-classification-dark-mode-fix
Dec 4, 2026
Merged

Rohit0301 merged 1 commit into
mainfrom
Rohit0301/auto-classification-dark-mode-fix

Conversation

@Rohit0301

Copy link
Copy Markdown
Contributor

Describe your changes:

In dark mode the auto-classification tag kept its dark brand-700 label and icon colour, which is hard to read on the dark background.

All the other tag chips (Classification, Glossary, Domain, Data Product, Metric) put tag-color-text on their label and icon. The dark-mode rule in globals.css (.dark-mode .tag-tinted .tag-color-text) lightens that class toward white. AutoClassificationTag left the class off, so the rule never matched. This PR adds the class to its icon and label. Light mode looks the same as before.

Type of change:

  • Bug fix

Tests:

Which test layer and why

Vitest unit test in core-components. The change is a class on a leaf component.

Unit tests

  • auto-classification-tag.test.tsx: checks that the label and icon carry tag-color-text. 13/13 pass.

Manual testing performed

Checked the Application/EntityTags → Variants Storybook story in light and dark themes.

Screenshots:

Light Dark
Light Dark

UI screen recording:

Not applicable: styling fix, see the screenshots above.

Checklist:

  • I have read CONTRIBUTING.md and the contributor docs.
  • I have added tests and listed them above.
  • I have added a test that covers the exact scenario we are fixing.

🤖 Generated with Claude Code

AutoClassificationTag did not apply tag-color-text to its label and icon,
so the dark-mode lift rule never matched and the text stayed brand-700.
@Rohit0301
Rohit0301 requested a review from a team as a code owner December 4, 2026 07:08
@Rohit0301
Rohit0301 requested review from shah-harshit and removed request for a team December 4, 2026 07:08
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@gitar-bot

gitar-bot Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Code Review ✅ Approved 🟢 Low risk

Adding the color class to the auto-classification tag’s label and icon only changes dark-mode styling; executable behavior remains otherwise unchanged.

Adds the tag-color-text class to the icon and label of AutoClassificationTag so the existing dark-mode rule in globals.css applies, fixing unreadable tag text on dark backgrounds. Light mode is unchanged. No issues found.

Verification

Rules No rules evaluated

Functional validation Not enabled

Set up

Auto-approval Not enabled

Set up

For more verification details, comment gitar display:verbose.

Options

Display: compact → Showing compact verification results.

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

@Rohit0301 Rohit0301 added the To release Will cherry-pick this PR into the release branch label Dec 4, 2026
@Rohit0301
Rohit0301 merged commit 24e70d7 into main Dec 4, 2026
28 of 29 checks passed
@Rohit0301
Rohit0301 deleted the Rohit0301/auto-classification-dark-mode-fix branch December 4, 2026 07:19
@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

🤖 Backport to 2.0 is under way. It is built from openmetadata-collate, which holds the credentials needed to open a PR here, and it will comment again with the result — nothing is needed from you unless it reports otherwise.

@github-actions

github-actions Bot commented Dec 4, 2026

Copy link
Copy Markdown
Contributor

🤖 Backport to 2.1 is under way. It is built from openmetadata-collate, which holds the credentials needed to open a PR here, and it will comment again with the result — nothing is needed from you unless it reports otherwise.

@gh-bot-collate

gh-bot-collate Bot commented Dec 4, 2026

Copy link
Copy Markdown

🤖 Backport to 2.1 opened as #39763 (clean cherry-pick). It merges itself once the checks pass.

@gh-bot-collate

gh-bot-collate Bot commented Dec 4, 2026

Copy link
Copy Markdown

🤖 Not backported to 2.0. Claude looked at the conflict and declined to resolve it:

Backport aborted: PR #39760 does not apply to 2.0

Source PR: #39760 — "Fix auto-classification tag text unreadable in dark mode"
Merge commit: 24e70d712b4df9143cefa4a922c443974d861dc4

Reason

PR #39760 fixes a dark-mode styling bug in
AutoClassificationTag
(openmetadata-ui-core-components/.../components/application/tag/auto-classification-tag.tsx).
That component does not exist on 2.0 at all — it, and the rest of the
application/tag/ directory (ClassificationTag, GlossaryTag, DomainTag,
DataProductTag, tag-chip-content.tsx, tag.constants.ts, tag.types.ts,
etc.), was introduced by commit 8f77049235 ("Move
ClassificationTag/GlossaryTag/DomainTag/DataProductTag/AutoClassificationTag
and Icon into openmetadata-ui-core-components", #33366), which first appears
on the 2.1 line of branches (confirmed via git branch -a --contains 8f77049235, and git merge-base --is-ancestor 8f77049235 HEAD returns false
against 2.0).

In other words, 2.0 predates the whole component family this fix touches.
The cherry-pick conflict (DU / deleted-by-us) is a direct symptom of that:
git sees the file modified on the "theirs" side (main, inheriting from
8f77049235) but absent entirely on 2.0.

There is no equivalent/legacy implementation of AutoClassificationTag on
2.0 to apply this dark-mode fix to, so there is nothing coherent to port.

Action taken

None — no files were edited or staged. The repository is left with the
cherry-pick still in progress (unmerged paths for the two conflicting files),
exactly as handed off, pending cleanup by the workflow's next step (e.g.
git cherry-pick --abort).

Recommendation

Do not backport this PR to 2.0. Revisit once/if the underlying
application/tag/ component library (from #33366 and follow-ups) is itself
backported — at that point this fix should be re-evaluated for backport.

resolver run

Rohit0301 added a commit that referenced this pull request Dec 4, 2026
…9763)

AutoClassificationTag did not apply tag-color-text to its label and icon,
so the dark-mode lift rule never matched and the text stayed brand-700.

(cherry picked from commit 24e70d7)

Co-authored-by: Rohit Jain <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

To release Will cherry-pick this PR into the release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants