Repository navigation
refactor(site/src): add hover InfoTooltip and shared tooltip delay - #28903
Conversation
ee51a19 to
f923192
Compare
| <TooltipTrigger asChild> | ||
| <button |
There was a problem hiding this comment.
why is this asChild on a native button instead of just inheriting the default TooltipTrigger?
There was a problem hiding this comment.
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.
| {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> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
fed5550 to
7efa233
Compare
7efa233 to
34ba1fb
Compare
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.
34ba1fb to
179530b
Compare
Part 1 of 2 of the tooltip cleanup (split for review). This PR adds the reusable piece; the follow-up migrates call sites.
Makes
InfoTooltipa hover tooltip built on the sharedTooltipinstead of the click-basedHelpPopover, and consolidates hover timing:type(info/warning) andsize(small/medium) propsside="right",align="center")size="sm"links spaced from the body textTOOLTIP_DELAY_DURATION(100ms) shared by the app-wide provider andInfoTooltip, so info tooltips no longer inherit Radix's 700ms defaultNo call sites change here beyond the existing
InfoTooltipconsumers 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
InfoTooltipcomponent + shared delay.HelpPopoverinfo affordances across pages/modules to this component.🤖 Generated with Coder Agents on behalf of @chrifro.