Skip to content

refactor(site/src): add hover InfoTooltip and shared tooltip delay - #28903

Merged
chrifro merged 1 commit into
mainfrom
chrifro/hover-tooltips-foundation
Sep 18, 2026
Merged

chrifro merged 1 commit into
mainfrom
chrifro/hover-tooltips-foundation

Conversation

@chrifro

@chrifro chrifro commented Sep 2, 2026 •

Copy link
Copy Markdown
Collaborator

Part 1 of 2 of the tooltip cleanup (split for review). This PR adds the reusable piece; the follow-up migrates call sites.

Makes InfoTooltip a hover tooltip built on the shared Tooltip instead of the click-based HelpPopover, and consolidates hover timing:

  • type (info / warning) and size (small / medium) props
  • right / center placement (side="right", align="center")
  • size="sm" links spaced from the body text
  • TOOLTIP_DELAY_DURATION (100ms) shared by the app-wide provider and InfoTooltip, so info tooltips no longer inherit Radix's 700ms default

No call sites change here beyond the existing InfoTooltip consumers picking up the new hover behavior automatically.

Before / After

The affordance reveals on hover (was click), uses the info / warning icon (was a ?), opens to the right, and is snappier (100ms vs 700ms).

Stack


🤖 Generated with Coder Agents on behalf of @chrifro.

@chrifro
chrifro force-pushed the chrifro/hover-tooltips-foundation branch from ee51a19 to f923192 Compare September 2, 2026 12:33
@chrifro
chrifro marked this pull request as ready for review September 2, 2026 12:48
@linear-code

linear-code Bot commented Sep 2, 2026

Copy link
Copy Markdown

DES-22111

Comment on lines +49 to +50
<TooltipTrigger asChild>
<button

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

why is this asChild on a native button instead of just inheriting the default TooltipTrigger?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Good call. Removed asChild and now render the default TooltipTrigger (a native <button>) directly, so it inherits the default trigger behavior instead of wrapping our own button.

Posted by Coder Agents on behalf of @chrifro.

Comment on lines +65 to +70
{title && (
<p className="m-0 mb-1 font-semibold text-content-primary">
{title}
</p>
)}
<p className="m-0 text-content-secondary [&_a]:mt-2">{message}</p>

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'd rather export InfoTooltipTitle and InfoTooltipMessage components, and place them here as children, to match how all of our other components like this work.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Done. InfoTooltip no longer takes title/message props; it now accepts children, and I export InfoTooltipTitle and InfoTooltipMessage to compose the content, matching our other components. All call sites (in the stacked migration PR #28875) were updated to the compound form.

Posted by Coder Agents on behalf of @chrifro.

@chrifro
chrifro force-pushed the chrifro/hover-tooltips-foundation branch 3 times, most recently from fed5550 to 7efa233 Compare September 11, 2026 14:03
@chrifro
chrifro requested a review from aslilac September 11, 2026 14:20
Comment thread site/src/components/Tooltip/Tooltip.tsx Resolved
Comment thread site/src/components/Tooltip/Tooltip.tsx Resolved
Comment thread site/src/components/Tooltip/Tooltip.tsx Resolved
Comment thread site/src/components/Tooltip/Tooltip.tsx Resolved
@aslilac
aslilac added this pull request to stack #29439 September 16, 2026 22:58
@chrifro
chrifro force-pushed the chrifro/hover-tooltips-foundation branch from 7efa233 to 34ba1fb Compare September 17, 2026 09:31
Make InfoTooltip a hover tooltip built on the shared Tooltip with info
and warning variants, a size prop, right/center placement, and links
spaced from the body text. Introduce TOOLTIP_DELAY_DURATION and use it
for the app-wide provider and InfoTooltip so hover timing is consistent.

This is the foundation for migrating the click-based HelpPopover info
affordances to hover tooltips.
@chrifro
chrifro force-pushed the chrifro/hover-tooltips-foundation branch from 34ba1fb to 179530b Compare September 17, 2026 10:24
@chrifro
chrifro requested a review from aslilac September 17, 2026 11:45
@chrifro
chrifro merged commit 0fb806e into main Sep 18, 2026
26 checks passed
@chrifro
chrifro deleted the chrifro/hover-tooltips-foundation branch September 18, 2026 09:17
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 18, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants