From cba136ba5ca50eafefe13d5fdc0426cbd7896482 Mon Sep 17 00:00:00 2001 From: Rohit0301 Date: Fri, 4 Dec 2026 12:38:10 +0530 Subject: [PATCH] Fix auto-classification tag text unreadable in dark mode 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. --- .../application/tag/auto-classification-tag.test.tsx | 9 +++++++++ .../application/tag/auto-classification-tag.tsx | 3 ++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/openmetadata-ui-core-components/src/main/resources/ui/src/components/application/tag/auto-classification-tag.test.tsx b/openmetadata-ui-core-components/src/main/resources/ui/src/components/application/tag/auto-classification-tag.test.tsx index cc1ac1c8eede..dbdce6b539eb 100644 --- a/openmetadata-ui-core-components/src/main/resources/ui/src/components/application/tag/auto-classification-tag.test.tsx +++ b/openmetadata-ui-core-components/src/main/resources/ui/src/components/application/tag/auto-classification-tag.test.tsx @@ -33,6 +33,15 @@ describe('AutoClassificationTag', () => { expect(container.querySelector('svg')).toBeInTheDocument(); }); + it('should mark the label and icon with tag-color-text so the dark-mode lift applies', () => { + const { container } = render( + + ); + + expect(screen.getByText('PII.Sensitive')).toHaveClass('tag-color-text'); + expect(container.querySelector('svg')).toHaveClass('tag-color-text'); + }); + it('should not render a redirect link when no href is passed', () => { render(); diff --git a/openmetadata-ui-core-components/src/main/resources/ui/src/components/application/tag/auto-classification-tag.tsx b/openmetadata-ui-core-components/src/main/resources/ui/src/components/application/tag/auto-classification-tag.tsx index b51e308d1246..bbb097df0c6c 100644 --- a/openmetadata-ui-core-components/src/main/resources/ui/src/components/application/tag/auto-classification-tag.tsx +++ b/openmetadata-ui-core-components/src/main/resources/ui/src/components/application/tag/auto-classification-tag.tsx @@ -57,13 +57,14 @@ export const AutoClassificationTag: FC< } iconSize={ICON_PX[size]} label={label} + labelClassName="tag-color-text" maxWidth={maxWidth} /> );