Make tooltip links inside dialogs clickable#1255
Conversation
✅ Deploy Preview for antenna-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
✅ Deploy Preview for antenna-ssec ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
📝 WalkthroughWalkthroughModified the Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
ui/src/design-system/components/info-tooltip.tsx (1)
21-23: Scope the portal bypass instead of changing everyInfoTooltip.This fixes the dialog case, but removing
Tooltip.Portalglobally changes positioning/clipping behavior for allInfoTooltipusages, whilez-[51]now makes these tooltips out-rank dialog/popover layers that usez-index: 50(dialog.module.scss:8-13,popover.module.scss:4-10). Prefer scoping the non-portaled behavior to dialog usage, or portal into the dialog container if Nova’s Tooltip API supports that.Please verify against Nova UI Kit
Tooltipbehavior and test both cases:
- tooltip link inside a dialog remains clickable;
- tooltip outside a dialog does not render above an active dialog/popover or get clipped by overflow containers.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@ui/src/design-system/components/info-tooltip.tsx` around lines 21 - 23, The change removed Tooltip.Portal and added a global z-[51], which forces all InfoTooltip instances above dialogs/popovers; instead, restore Tooltip.Portal in info-tooltip.tsx and remove the global z-[51], and add a scoped API to Info (or InfoTooltip) to allow non-portaled rendering or a portal container: e.g., add props like portalContainer?: HTMLElement | null or usePortal?: boolean, keep default behavior using Tooltip.Portal, and when used inside the dialog pass a container (or usePortal=false) from the dialog wrapper so that only dialog-scoped tooltips bypass the portal; verify with Nova UI Kit Tooltip API whether Tooltip.Portal accepts a container prop and update usage in the dialog to pass the dialog element so that tooltip links remain clickable inside dialogs and tooltips outside dialogs still respect dialog z-index and clipping.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@ui/src/design-system/components/info-tooltip.tsx`:
- Around line 21-23: The change removed Tooltip.Portal and added a global
z-[51], which forces all InfoTooltip instances above dialogs/popovers; instead,
restore Tooltip.Portal in info-tooltip.tsx and remove the global z-[51], and add
a scoped API to Info (or InfoTooltip) to allow non-portaled rendering or a
portal container: e.g., add props like portalContainer?: HTMLElement | null or
usePortal?: boolean, keep default behavior using Tooltip.Portal, and when used
inside the dialog pass a container (or usePortal=false) from the dialog wrapper
so that only dialog-scoped tooltips bypass the portal; verify with Nova UI Kit
Tooltip API whether Tooltip.Portal accepts a container prop and update usage in
the dialog to pass the dialog element so that tooltip links remain clickable
inside dialogs and tooltips outside dialogs still respect dialog z-index and
clipping.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 56e12f21-bc2e-42c2-bdc0-ebdd909d9f9d
📒 Files selected for processing (1)
ui/src/design-system/components/info-tooltip.tsx

We had a problem where tooltip links were not clickable, but only when used inside dialogs. We fix the problem by skipping the portal.
Summary by CodeRabbit