Skip to content

Lift dark-mode overlays onto a floating surface with an overlay shadow in core - #37235

Merged
shah-harshit merged 7 commits into
mainfrom
shah-harshit/core-ui-storybook-changes
Nov 6, 2026
Merged

shah-harshit merged 7 commits into
mainfrom
shah-harshit/core-ui-storybook-changes

Conversation

@shah-harshit

@shah-harshit shah-harshit commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes open-metadata/openmetadata-collate#7322

In AI-mode dark, popovers, menus and selects used bg-overlay-surface (gray-800), the same surface as drawers and modals, and their shadow (8% near-black) is invisible on dark and faint on white. A menu opened from a drawer (e.g. Classification › Add Tag) blended into it. The earlier caller-side override was reverted, so this fixes it in core.

Floating overlays now share one treatment: a new bg-floating surface + the overlay shadow (shadow-raised) in both themes + the secondary_alt edge. Values follow design review:

Light Dark
bg-floating (new token) white (unchanged) #2b2f37 (gray-800 + 4% white), a subtle step above the gray-800 drawer/modal
shadow-raised (overlay shadow, used only by floating overlays) 0 12px 16px -4px / 0 4px 6px -2px / 0 2px 2px -1px near-black at 14 / 8 / 6% same geometry, black at 50 / 30 / 30%

Modals and slideouts keep bg-overlay-surface + shadow-overlay. bg-floating is separate from bg-raised because bg-raised is also the dark hover fill of secondary buttons and lineage nodes; a Cancel button inside an overlay hovers to gray-700, which stays distinct from the #2b2f37 panel.

Core components

Component Change
Popover bg-overlay-surface → bg-floating; shadow-lg → shadow-raised; arrow fill-bg-primary (gray-950, mismatched in dark) → fill-bg-floating; dark:text-primary
Dropdown menu; select Popover (Select, ComboBox, MultiSelect, TagSelect, Autocomplete); TreeSelect / FilterSelect via Dropdown.Popover → bg-floating
HoverCard → bg-floating (body + arrow); shadow-lg → shadow-raised; dark:text-primary
DatePicker / DateRangePicker → bg-floating; shadow-xl / shadow-raised → shadow-raised. No outline (it leaked past the rounded corners, #36707)
FieldDocPopover (default) → bg-floating; shadow-lg → shadow-raised; keeps its border-secondary
ConfirmPopover arrow → bg-floating (body is Popover)

Popover / HoverCard portal to body, which sets no text colour, so inherited copy (a Typography paragraph) rendered black on the dark surface. They now set dark:text-primary; light keeps inheriting.

Tailwind inlines shadow values into the utility, so the dark shadow is applied by .dark-mode .tw\:shadow-raised in globals.css; the light value is the token.

App menus

Menu Change
Explore search suggestions (ExploreSearchInput.tsx) Already core SelectPopover; removed the classes that re-applied the old surface/shadow/edge over it. Keeps its size and padding.
Table column filter (TableV2.tsx) Raw react-aria Popover + Dialog → core Popover (aria-label="filter", offset={8} keeps its position). Inner filter-dropdown keeps its testid, 264px cap, scroll and min-width. Corners follow core (rounded-xl).
Comment @/# mention list (CommentComposer.constants.ts) Colour only → bg-floating (list is built by quill-mention, so it cannot be a core component).
Editor slash and mention menus (block-editor.less) Colour only → var(--tw-background-color-floating) (tiptap/tippy keep focus and keyboard in the editor).
Activity Feed comment @ mention list (feed-editor.less) Bug fix: legacy tokens kept it white with a light-blue selection in dark (near-white names on white). Dark-only override → bg-floating, text-secondary, primary_hover selection.

The product-tour tooltip stays on bg-overlay-surface (a one-off guide drawn by react-tour).

Decision record: docs/decisions/2026-11-06-floating-overlays-sit-on-bg-floating.md. .claude/rules/frontend-styling.md, docs/colors.md and specs/foundations/color.md map popover/menu/select → bg-floating. Added a SlideoutMenu / WithSelect story for the drawer case.

Type of change:

  • Bug fix

Screenshots — app (before = main, after = this branch)

Local stack, OSS UI from this branch against the local server. Each screen in Classic light, AI light and AI dark.

Core overlays on product screens

Classification › Add Tag drawer › Owners search (the issue's case)
Mode Before (main) After
Classic light
AI light
AI dark
Classification › Add Tag drawer › Icon picker
Mode Before (main) After
Classic light
AI light
AI dark
Table › Owners popover
Mode Before (main) After
Classic light
AI light
AI dark
Table › Tier dropdown
Mode Before (main) After
Classic light
AI light
AI dark
Table › ⋮ manage menu
Mode Before (main) After
Classic light
AI light
AI dark
Table › page-size dropdown
Mode Before (main) After
Classic light
AI light
AI dark
Explore › Owners filter
Mode Before (main) After
Classic light
AI light
AI dark
Home (no overlay, background check)
Mode Before (main) After
Classic light
AI light
AI dark

App menus

Table › column filter (now core Popover)
Mode Before (main) After
Classic light
AI light
AI dark
Explore › search suggestions
Mode Before (main) After
Classic light
AI light
AI dark
Edit Description › @ mention (editor)
Mode Before (main) After
Classic light
AI light
AI dark
Inbox › task comment › @ mention (AI mode only)
Mode Before (main) After
AI light
AI dark
Table › Activity Feeds › comment @ mention (FeedEditor)
Mode Before (main) After
Classic light
AI light
AI dark

Screenshots — Storybook, every affected component

Story Before (main) After
SlideoutMenu / WithSelect (dark)
SlideoutMenu / WithSelect (light)
Popover / WithArrow (dark)
Popover / WithArrow (light)
Dropdown (dark)
Dropdown (light)
Select (dark)
Select (light)
ComboBox (dark)
ComboBox (light)
Autocomplete (dark)
Autocomplete (light)
TagSelect (dark)
TagSelect (light)
FilterSelect (dark)
FilterSelect (light)
DatePicker (dark)
DatePicker (light)
HoverCard (dark)
HoverCard (light)
ConfirmPopover (dark)
ConfirmPopover (light)
FieldDoc popover (dark)
FieldDoc popover (light)

Not affected elsewhere

  • Page, card, drawer and modal backgrounds are unchanged in every mode; only overlay surfaces and overlay shadows change.
  • Light: overlay surfaces stay white; overlays get the slightly deeper overlay shadow (the visible light diff in the screenshots). The column filter also takes core's corner radius.
  • bg-raised, bg-overlay-surface and shadow-overlay are unchanged. shadow-raised is used only by floating overlays (no other core or app usages).

Tests:

Unit tests

  • popover.test.tsx (new): Popover sits on bg-floating with dark:text-primary, shadow-raised and the secondary_alt outline, not bg-overlay-surface. Fails without the fix.
  • dropdown.theme.test.tsx: menu is bg-floating + shadow-raised, not bg-overlay-surface.
  • field-doc-popover.test.tsx: default variant uses bg-floating + shadow-raised.
  • Core vitest src/components: 753 pass. The 6 failures in application/tag/* tooltip tests also fail on main (unrelated).
  • Jest for TableV2 (incl. the column-filter parity suite), ExploreSearchInput, CommentComposer, BlockEditor and FeedEditor: 41 suites, 458 tests pass.
  • make ui-checkstyle-changed: clean.

Manual testing

  1. Storybook: switch the theme toolbar to Dark and open the stories above.
  2. App, AI mode, dark: Governance › Classification › PII › Add Tag, then open Owners. The list sits a step above the drawer with a visible shadow.
  3. Light: the same list is white with a visible shadow.

Checklist:

  • I have read the CONTRIBUTING document.
  • I have commented on my code, particularly in hard-to-understand areas.
  • I have added tests that prove my fix is effective.

🤖 Generated with Claude Code

Popover, dropdown, select, date picker, hover card, confirm popover and
field-doc popover now use bg-raised (gray-700 in dark, white in light)
instead of bg-overlay-surface, which they shared with modal and slideout
panels. A menu opened from a drawer now stands apart from it. Light mode
is unchanged. Adds a SlideoutMenu WithSelect story for the drawer case.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@shah-harshit
shah-harshit requested a review from a team as a code owner November 6, 2026 06:13
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Nov 6, 2026
@shah-harshit shah-harshit self-assigned this Nov 6, 2026
Popover, hover card, date pickers and the field-doc popover now use
shadow-raised with the secondary_alt outline, matching dropdown and
select menus. Date pickers keep no outline (it leaked past the rounded
corners, see #36707). In dark mode shadow-raised is deepened to black
50%/30% so overlays read as lifted; Tailwind inlines shadow values, so
the override targets the utility under .dark-mode.
@shah-harshit shah-harshit changed the title Raise dark-mode popover and menu surfaces above drawer panels in core Raise dark-mode overlay surfaces and shadows above drawers and pages in core Nov 6, 2026
@github-actions

github-actions Bot commented Nov 6, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 81%
81.6% (141361/173225) 69.01% (51704/74921) 71.98% (28972/40245)

Popover and HoverCard set dark:text-primary: they portal to body, which
sets no text colour, so Typography copy was black on the dark surface.
Secondary Button/ButtonUtility hover to bg-raised in dark, which now
equals the overlay; inside a shadow-raised overlay the hover steps one
lighter. DatePicker keeps shadow-xl in light and FieldDocPopover keeps
its border, so light is pixel-identical. Records the overlay surface
decision in an ADR and points the styling rule at bg-raised.
Explore search suggestions drop the classes that re-applied the old
surface over the core SelectPopover. The table column filter uses the
core Popover (offset 8 keeps its position). The comment mention list and
the editor slash/mention menus cannot be core components (quill-mention
and tiptap own them), so they switch colour only to bg-raised.
@github-actions

github-actions Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

⚠️ UI Checkstyle passed — lint findings in changed files

🔍 ESLint findings in this PR's files — 0 error(s), 2 warning(s)

Errors block the build. Warnings do not yet — they are rules whose backlog is still
being worked down, listed so this PR does not add to it. See docs/ui-code-quality-gate.md.

0 error(s), 2 warning(s) across 2 changed file(s).

Count Rule
2 openmetadata-ui-patterns/deprecated-om-tokens
All findings
Location Rule Message
🟡 src/components/common/CommentComposer/CommentComposer.constants.ts:89:3 openmetadata-ui-patterns/deprecated-om-tokens Legacy token "--om-shadow-lg" is deprecated. Use tw: utilities or --tw-* theme variables. Migrate existing references when editing them; do not add new referenc
🟡 src/components/common/Table/TableV2.tsx:1895:21 openmetadata-ui-patterns/deprecated-om-tokens Legacy token "--om-color-bg-secondary" is deprecated. Use tw: utilities or --tw-* theme variables. Migrate existing references when editing them; do not add new

Fix locally (fast - only checks files changed in this branch):

make ui-checkstyle-changed

The FeedEditor mention list used legacy tokens that stay white with a
light-blue selection in dark, leaving near-white names on white. A
dark-only override puts it on bg-raised with secondary text and the
primary_hover selection, matching the other floating menus. Light is
unchanged.
Design review found gray-700 too large a step. Floating overlays now sit
on a new bg-floating token: white in light, #2b2f37 in dark (gray-800
plus 4% white). shadow-raised, used only by floating overlays, becomes
the overlay shadow in both themes: near-black 14/8/6% in light, black
50/30/30% in dark. bg-raised keeps its other roles, so the overlay-only
button hover rule is no longer needed. App menus that cannot be core
components follow by colour. The decision record is renamed to match.
@shah-harshit shah-harshit changed the title Raise dark-mode overlay surfaces and shadows above drawers and pages in core Lift dark-mode overlays onto a floating surface with an overlay shadow in core Nov 6, 2026
The light overlay shadow is a deliberate design-review change, not a
regression: the theme-contract test now pins bg-floating in both themes,
the light shadow-raised values and the dark override, and the elevation
spec and decision record state the light-mode exception.
@gitar-bot

gitar-bot Bot commented Nov 6, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 3 closed / 3 findings

🟡 Medium risk · Changing shared overlay surfaces and shadows across core menus and app mentions could reduce contrast or obscure controls in affected themes.

Lifts popovers, menus, selects, hover cards and date pickers onto a new bg-floating surface with a dedicated shadow-raised overlay shadow in both themes, so they no longer blend into dark-mode drawers and modals. Styling rule that routed popovers and menus to bg-overlay-surface was updated and secondary button hover now matches the popover surface in dark. No open findings remain.

✅ 3 closed
✅ Quality: Styling rule still sends popovers and menus to bg-overlay-surface

📄 openmetadata-ui-core-components/src/main/resources/ui/src/styles/globals.css:1344-1347 📄 openmetadata-ui-core-components/src/main/resources/ui/src/components/base/dropdown/dropdown.tsx:201
.claude/rules/frontend-styling.md:81 still says popover/dropdown/select/modal/drawer → tw:bg-overlay-surface. This PR moves floating overlays in core to tw:bg-raised and keeps bg-overlay-surface for modal/slideout panels only. Because the rule file was not updated, agents and reviewers following it will put new popovers back on bg-overlay-surface or flag this PR's pattern as wrong. The fix is to update the rule line to say: "Popover, dropdown, menu, select and date-picker overlays → tw:bg-raised; modal and drawer panels → tw:bg-overlay-surface, so an overlay opened from a panel sits one step above it." This matches ui/docs/colors.md and specs/foundations/color.md.

✅ Bug: Secondary button hover now matches the popover surface in dark

📄 openmetadata-ui-core-components/src/main/resources/ui/src/components/application/date-picker/date-picker.tsx:144 📄 openmetadata-ui-core-components/src/main/resources/ui/src/components/application/date-picker/date-range-picker.tsx:186 📄 openmetadata-ui-core-components/src/main/resources/ui/src/components/application/popover/popover.tsx:80 📄 openmetadata-ui-core-components/src/main/resources/ui/src/components/application/confirm-popover/confirm-popover.tsx:253
Secondary Button hovers to tw:dark:hover:bg-raised (button.tsx:135), and ButtonUtility does the same (button-utility.tsx:28). This PR makes the DatePicker, DateRangePicker and ConfirmPopover surfaces bg-raised (gray-700) as well. Their Cancel and secondary-action buttons (date-picker.tsx:151, date-range-picker.tsx:224, confirm-popover.tsx:198/208) are gray-800 at rest. On hover they turn the same gray-700 as the panel, so only the outline is left and the hover looks like the button lost its fill. The styling rule says contrast must be checked against the parent, including hover. The fix is to give secondary/utility buttons a hover step that stays distinct on bg-raised. One option is the translucent bg-primary_hover (white 6%) in dark, which lightens any parent; another is a hover token one step above raised.

Closed: Bug: Light --shadow-raised changed: breaks theme-contract test and frozen light

📄 openmetadata-ui-core-components/src/main/resources/ui/src/styles/globals.css:93-96 📄 docs/decisions/2026-11-06-floating-overlays-sit-on-bg-floating.md:28-29 📄 docs/decisions/2026-11-06-floating-overlays-sit-on-bg-floating.md:40
This commit replaces the light --shadow-raised: theme(--shadow-lg) with custom 14/8/6% values. That breaks two things.

  1. scripts/design-tokens/theme-contract.test.js ("aliases semantic elevation roles to the existing shadow scale") still asserts light.get('--shadow-raised') === 'theme(--shadow-lg)', so the test will fail.
  2. The styling rule says "Light mode is frozen. Reach dark with adaptive tokens, never by changing light values", and the PR says light stays pixel-identical. Every core overlay, plus legacy --om-shadow-raised users through tokens.css, now gets a deeper shadow in light. The new ADR admits this in its Consequences section, but no Accepted record overrides the light-frozen rule.

Fix: keep the light value at theme(--shadow-lg) and deepen only through the existing .dark-mode .tw\:shadow-raised override. If the deeper light shadow is intended, update the contract test and specs/foundations/elevation.md, and record that light elevation is allowed to change.

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

@shah-harshit
shah-harshit enabled auto-merge (squash) November 6, 2026 10:59
@shah-harshit
shah-harshit merged commit 611df09 into main Nov 6, 2026
70 checks passed
@shah-harshit
shah-harshit deleted the shah-harshit/core-ui-storybook-changes branch November 6, 2026 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants