Skip to content

feat(ui): tooltips - #19870

Open
annadoesdesign wants to merge 4 commits into
masterfrom
ae--fix-tooltips
Open

annadoesdesign wants to merge 4 commits into
masterfrom
ae--fix-tooltips

Conversation

@annadoesdesign

@annadoesdesign annadoesdesign commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor
Screenshot 2026-09-18 at 1 36 45 PM Screenshot 2026-09-18 at 1 31 31 PM

Summary by cubic

Replaces the remaining antd Tooltip and Popover usages with a new FloatingOverlay built on @floating-ui/react-dom, and unifies all entity hover cards into a single EntityHoverCard. This fixes dark-mode overlays and makes tooltips, popovers, and hover cards render consistently across the app.

Migrating overlays

  • Tooltip and Popover now come from @components and are backed by FloatingOverlay; antd-specific props like overlayInnerStyle and popupVisible are no longer passed through.
  • Overlay surfaces now use the new bgOverlay theme token instead of bg/bgTooltip, and dark-mode shadows were rewritten so overlays remain visible on near-black backgrounds.
  • Overlay styling overrides moved from .ant-tooltip-inner / .ant-popover-inner-content to .alchemy-floating-overlay-inner (a few .less and styled-component selectors were updated).
  • Tooltips now open on focus as well as hover, and work on disabled controls by listening on a wrapper element.

Hover cards

  • Removed PreviewType.HOVER_CARD, HoverEntityTooltipContext, and per-entity hover card previews; callers render the shared EntityHoverCard directly, removing the old mix of widths, paddings, and overrides.
  • Entity icons in hover cards are now consistent tiles: colored rounded squares for domains, terms, tags, and data products; circular surfaces for platform logos.
  • Propagation attribution parsing moved to a shared parsePropagationContext helper so sections reserve space only when content will render.
  • Removed the hover-card-only “view related” links from business attribute and glossary term previews.

Adds @floating-ui/react-dom to package.json and adds unit tests for the new Tooltip and Popover behavior.

Written for commit 3da88b6. Summary will update on new commits.

Review in cubic

annadoesdesign and others added 4 commits September 18, 2026 09:50
bgTooltip is an inverted dark surface in light mode, so pointing dropdowns,
selects, popovers, and tooltips at it rendered their text dark-on-dark.
bgOverlay matches the canvas in light mode and lifts above it in dark mode.

Co-authored-by: Cursor <cursoragent@cursor.com>
bgOverlay now matches bg in both themes; the borders added to menus, dropdowns,
popovers, and tooltips are removed so elevation comes from the shadow alone.
Dark shadows were translucent against a near-black canvas and read as nothing,
so they go opaque black, wider, and layered.

Co-authored-by: Cursor <cursoragent@cursor.com>
Introduce FloatingOverlay, a headless Floating UI primitive, and rebuild
Tooltip and Popover on top of it so no overlay depends on antd.

Collapse the per-entity hover card previews into a single EntityHoverCard
composed of HoverCardHeader/Section/EntityRow. Callers now render the
component directly and pass no styling, so every surface gets the same
card instead of the previous mix of widths, paddings and overrides.

Other changes:
- Render entity icons as consistent tiles: colored rounded squares for
  domains, terms, tags and data products, circular surfaces for platform
  logos, with the glyph inset rather than filling its container.
- Use semantic theme tokens throughout so overlays read correctly in dark
  mode, and move the propagation icon to Phosphor.
- Keep overlays working on disabled controls. React suppresses mouse
  events there, so the listeners move to a wrapper element, matching the
  behaviour antd provided.
- Remove PreviewType.HOVER_CARD and the code it kept alive, including
  HoverEntityTooltipContext and the hover-card-only "view related" links.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the product PR or Issue related to the DataHub UI/UX label Sep 18, 2026
@cursor

cursor Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

PR Summary

Overview
Replaces Ant Design Tooltip and Popover in the Alchemy design system with a shared FloatingOverlay built on @floating-ui/react-dom, then migrates most app call sites to @components Tooltip/Popover. Overlays now use theme tokens (bgOverlay, shadowMd), support hover/focus/click triggers, disabled-control wrappers, and optional line clamping for plain-text tooltips.

Entity hovers are redesigned: PreviewType.HOVER_CARD and the old preview-card hover path are removed in favor of EntityHoverCard (documentation, owners, tags, terms, domain, propagation) shown via HoverEntityTooltip as a popover. Owner rows and related previews switch to that card; search/preview cards lose hover-specific layout and “view related” suffixes.

Supporting changes include ColoredEntityIcon for consistent tag/glossary/domain icons in autocomplete, stronger dark-mode elevation shadows, a Beta pill on dark mode in settings, propagation icon/styling tweaks, and updated tests/CSS selectors (.alchemy-floating-overlay-inner instead of .ant-tooltip-inner / .ant-popover-inner).

Reviewed by Cursor Bugbot for commit 3da88b6. Bugbot is set up for automated code reviews on this repo. Configure here.

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using high effort and found 3 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 3da88b6. Configure here.

);

if (!child) return <>{children}</>;
if (!hasContent(content)) return child;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Childless overlays never render

High Severity

FloatingOverlay bails out when children is not a single valid element, so the portal never mounts. Chart Popovers in BarChart and LineChart are always-open, childless chrome inside visx tooltips; antd previously synthesized a trigger, but these series hover cards now render nothing.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3da88b6. Configure here.

...floatingStyles,
display: isOpen ? overlayStyle?.display : 'none',
zIndex: overlayStyle?.zIndex ?? zIndex,
}}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overlay style loses position

High Severity

Inline overlayStyle position values such as left are spread before floatingStyles, so Floating UI overwrites them. View Select still passes left: 0 and width: 100% and dropped the old left: 0 !important CSS, so the views menu no longer pins across the navbar and can overflow the viewport.

Additional Locations (2)
Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3da88b6. Configure here.

onBlur: (event: React.FocusEvent<HTMLElement>) => {
forwardTo?.onBlur?.(event);
if (triggers.includes('focus') || triggers.includes('hover')) setOpen(false);
},

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Blur closes hover overlays

Medium Severity

Focus and blur always open or close the overlay when hover is in trigger, and blur does not check relatedTarget. Callers that pass trigger="hover" still get focus behavior, and a focused trigger (links, buttons) closes the overlay immediately when focus or a click moves into the portal, including HoverEntityTooltip cards.

Fix in Cursor Fix in Web

Reviewed by Cursor Bugbot for commit 3da88b6. Configure here.

@maggiehays maggiehays added the needs-review Label for PRs that need review from a maintainer. label Sep 19, 2026
@annadoesdesign annadoesdesign changed the title Ae fix tooltips feat(ui): tooltips Sep 23, 2026

This branch was successfully deployed

1 active deployment
Preview — 3da88b64 Deployed Sep 18, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-review Label for PRs that need review from a maintainer. product PR or Issue related to the DataHub UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants