diff --git a/.claude/rules/frontend-styling.md b/.claude/rules/frontend-styling.md index a66aaf1bf15f..f48069a35e88 100644 --- a/.claude/rules/frontend-styling.md +++ b/.claude/rules/frontend-styling.md @@ -57,6 +57,9 @@ Light mode is frozen: reach dark with tokens that adapt, never by changing light [`docs/colors.md`](../../openmetadata-ui/src/main/resources/ui/docs/colors.md); dark values live under `.dark-mode` in `globals.css`. +- **Scope:** dark mode is AI mode on core/Tailwind surfaces only. Classic mode gets no dark theme + and antd-only surfaces (`.ant-*`) are not themed for dark — migrate them to core instead + (ADR:2026-10-12-dark-mode-targets-ai-mode-core-surfaces-only). - **Surfaces:** page → `tw:bg-page`; card/panel → core `` or `tw:bg-surface`; popover, dropdown, select, modal, drawer → `tw:bg-overlay-surface`. `tw:bg-primary` is the page colour in dark (invisible card); `Box` is layout only — give it no background. Wrappers/grid frames stay transparent diff --git a/docs/decisions/2026-10-12-dark-mode-targets-ai-mode-core-surfaces-only.md b/docs/decisions/2026-10-12-dark-mode-targets-ai-mode-core-surfaces-only.md new file mode 100644 index 000000000000..1fe23199cab9 --- /dev/null +++ b/docs/decisions/2026-10-12-dark-mode-targets-ai-mode-core-surfaces-only.md @@ -0,0 +1,31 @@ +# Dark mode targets AI mode and core/Tailwind surfaces only + +- **Status:** Accepted +- **Revisions:** v1 2026-10-12 (initial) +- **Deciders:** Harshit Shah +- **Guard:** reviewer +- **Related:** ADR:2026-10-11-migrated-antd-components-adopt-core-styling, open-metadata/openmetadata-collate#7317, open-metadata/OpenMetadata#35271 + +## Context +Dark-mode sweeps keep finding light edges and fills on antd components (`.ant-modal-header`, +`.ant-dropdown-menu`, `.ant-select-selector`, `.ant-collapse-item`) and on classic-mode chrome +such as the classic navbar search. Antd is being removed from the codebase component by component, +and classic (non-AI) mode is not going to ship a dark theme. Dark-mode work spent on either is +deleted by the migration that follows it. + +## Decision +Classic (non-AI) mode does not support dark mode, and antd-only surfaces are not themed for dark. +Dark-mode fixes target AI mode, rendered through `@openmetadata/ui-core-components` and Tailwind +(`tw:`) surfaces, plus non-antd legacy markup that AI mode renders. + +- Do not add `.dark-mode` overrides, dark token swaps or `tw:dark:*` variants whose only effect is + on an `.ant-*` selector or an antd component. +- Do not fix classic-only chrome for dark mode. +- A shared legacy LESS variable (for example `@grey-15`) may be bridged for dark when non-antd + surfaces in AI mode use it, even though antd consumers pick the change up too. +- An antd surface that looks wrong in dark is fixed by migrating it to its core equivalent. + +## Consequences +Antd screens and classic mode can look unfinished in dark until they migrate; that is accepted. +Dark-mode PRs stay small and their fixes survive the antd removal. Revisit if classic mode is +kept and given a dark theme, or if the antd removal stops before the remaining surfaces are migrated. diff --git a/openmetadata-ui-core-components/src/main/resources/ui/src/styles/globals.css b/openmetadata-ui-core-components/src/main/resources/ui/src/styles/globals.css index 736eb7dcc225..d189603012ef 100644 --- a/openmetadata-ui-core-components/src/main/resources/ui/src/styles/globals.css +++ b/openmetadata-ui-core-components/src/main/resources/ui/src/styles/globals.css @@ -1226,12 +1226,12 @@ --color-text-disabled: theme(--color-gray-500); /* Brand text = blue-300 link tone in dark (palette guideline + Collate #6491 --ai-link); regular text stays on the gray ramp. */ - --color-text-brand-primary: theme(--color-brand-300); - --color-text-brand-secondary: theme(--color-brand-300); + --color-text-brand-primary: theme(--color-brand-400); + --color-text-brand-secondary: theme(--color-brand-400); --color-text-brand-tertiary: theme(--color-gray-400); --color-text-placeholder: theme(--color-gray-400); --color-text-placeholder_subtle: theme(--color-gray-700); - --color-text-link: theme(--color-brand-300); + --color-text-link: theme(--color-brand-400); --color-text-link-hover: theme(--color-brand-200); --color-text-primary_on-brand: theme(--color-gray-50); --color-text-secondary_on-brand: theme(--color-gray-300); @@ -1282,10 +1282,10 @@ --color-fg-disabled_subtle: theme(--color-gray-600); /* Brand foreground (icons, tab underline, active accents) = blue-300 link tone in dark (palette guideline + Collate #6491 --ai-link). */ - --color-fg-brand-primary: theme(--color-brand-300); - --color-fg-brand-secondary: theme(--color-brand-300); - --color-fg-brand-primary_alt: theme(--color-brand-300); - --color-fg-brand-secondary_alt: theme(--color-brand-300); + --color-fg-brand-primary: theme(--color-brand-400); + --color-fg-brand-secondary: theme(--color-brand-400); + --color-fg-brand-primary_alt: theme(--color-brand-400); + --color-fg-brand-secondary_alt: theme(--color-brand-400); --color-fg-brand-secondary_hover: theme(--color-brand-200); /* BACKGROUND COLORS */ @@ -1350,7 +1350,7 @@ --color-avatar-styles-bg-neutral: rgb(224 224 224 / 1); --color-button-destructive-primary-icon: theme(--color-error-300); --color-button-destructive-primary-icon_hover: theme(--color-error-200); - --color-button-primary-icon: theme(--color-brand-300); + --color-button-primary-icon: theme(--color-brand-400); --color-button-primary-icon_hover: theme(--color-brand-200); --color-featured-icon-light-fg-brand: theme(--color-brand-200); --color-featured-icon-light-fg-error: theme(--color-error-200); diff --git a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/FeedEditor/feed-editor.less b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/FeedEditor/feed-editor.less index 6344c0c92835..462b36bce87c 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/FeedEditor/feed-editor.less +++ b/openmetadata-ui/src/main/resources/ui/src/components/ActivityFeed/FeedEditor/feed-editor.less @@ -999,7 +999,7 @@ margin: var(--om-space-6); } .ql-toolbar.ql-snow { - border-color: var(--om-legacy-color-dde3ea); + border-color: var(--tw-border-color-secondary); border-top-left-radius: var(--om-radius-md); border-top-right-radius: var(--om-radius-md); display: flex; @@ -1009,7 +1009,7 @@ width: 100%; } .ql-container.ql-snow { - border-color: var(--om-legacy-color-dde3ea); + border-color: var(--tw-border-color-secondary); border-bottom-left-radius: var(--om-radius-md); border-bottom-right-radius: var(--om-radius-md); width: 100%; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Database/ColumnDetailPanel/ColumnDetailPanel.less b/openmetadata-ui/src/main/resources/ui/src/components/Database/ColumnDetailPanel/ColumnDetailPanel.less index 0b6bece50ec5..26e1437d7e18 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Database/ColumnDetailPanel/ColumnDetailPanel.less +++ b/openmetadata-ui/src/main/resources/ui/src/components/Database/ColumnDetailPanel/ColumnDetailPanel.less @@ -91,7 +91,6 @@ overflow: hidden; text-overflow: ellipsis; white-space: nowrap; - max-width: 95%; } } diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Database/ColumnDetailPanel/KeyProfileMetrics/KeyProfileMetrics.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Database/ColumnDetailPanel/KeyProfileMetrics/KeyProfileMetrics.component.tsx index 60ed5c5f055c..d30a840f8fe6 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Database/ColumnDetailPanel/KeyProfileMetrics/KeyProfileMetrics.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Database/ColumnDetailPanel/KeyProfileMetrics/KeyProfileMetrics.component.tsx @@ -29,8 +29,8 @@ export const KeyProfileMetrics = ({ profile }: KeyProfileMetricsProps) => { ); const sectionClassName = - 'tw:border-b-[0.6px] tw:border-tertiary tw:-mt-2 tw:pb-4 tw:px-4'; - const titleClassName = 'tw:text-sm tw:font-semibold tw:mb-1.5'; + 'tw:border-b-[0.6px] tw:border-secondary tw:pb-4 tw:px-3.5'; + const titleClassName = 'tw:text-sm tw:font-semibold tw:mb-3'; return (
diff --git a/openmetadata-ui/src/main/resources/ui/src/components/Database/RetentionPeriod/RetentionPeriod.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/Database/RetentionPeriod/RetentionPeriod.component.tsx index af240f9f4428..f898c7fc1978 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/Database/RetentionPeriod/RetentionPeriod.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/Database/RetentionPeriod/RetentionPeriod.component.tsx @@ -145,7 +145,7 @@ const RetentionPeriod = ({ width={520}> - +