Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

fix(ui): make tooltips non-hoverable by default so dense lists stay reachable (MUL-9998) (#11338)

Jiayuan Zhange8d88805be2f
diff --git a/packages/ui/components/ui/__tests__/tooltip.test.tsx b/packages/ui/components/ui/__tests__/tooltip.test.tsx
index 2a5586250e..60f1407489 100644
--- a/packages/ui/components/ui/__tests__/tooltip.test.tsx
+++ b/packages/ui/components/ui/__tests__/tooltip.test.tsx
@@ -28,4 +28,26 @@ describe("TooltipContent", () => {
it("has no CSS transitions for the unmount to wait on", () => {
expect(popupClasses()).toContain("transition-none");
});
+
+ it("disables hoverable popup by default so dense vertical triggers stay reachable", () => {
+ render(
+ <Tooltip open>
+ <TooltipTrigger>Trigger</TooltipTrigger>
+ <TooltipContent>Tip</TooltipContent>
+ </Tooltip>,
+ );
+ const popup = screen.getByText("Tip").closest("[data-slot='tooltip-content']");
+ expect(popup?.parentElement).toHaveStyle({ pointerEvents: "none" });
+ });
+
+ it("allows callers to opt back into a hoverable popup", () => {
+ render(
+ <Tooltip open disableHoverablePopup={false}>
+ <TooltipTrigger>Trigger</TooltipTrigger>
+ <TooltipContent>Tip</TooltipContent>
+ </Tooltip>,
+ );
+ const popup = screen.getByText("Tip").closest("[data-slot='tooltip-content']");
+ expect(popup?.parentElement).not.toHaveStyle({ pointerEvents: "none" });
+ });
});
diff --git a/packages/ui/components/ui/tooltip.tsx b/packages/ui/components/ui/tooltip.tsx
index 6406678602..3953b592a8 100644
--- a/packages/ui/components/ui/tooltip.tsx
+++ b/packages/ui/components/ui/tooltip.tsx
@@ -55,8 +55,25 @@ function TooltipProvider({
)
}
-function Tooltip({ ...props }: TooltipPrimitive.Root.Props) {
- return <TooltipPrimitive.Root data-slot="tooltip" {...props} />
+// Tooltips in Multica carry non-interactive labels, shortcuts, and timestamps
+// (hover-interactive previews use HoverCard). Disabling the hoverable popup by
+// default puts `pointer-events: none` on the positioner and skips Base UI's
+// safe-polygon bridge, so moving upward across a dense column of triggers
+// (Activity timestamps, sidebar rows, inbox actions) switches to the row above
+// instead of getting caught on the previous tooltip's popup. Callers can still
+// pass `disableHoverablePopup={false}` when a tooltip needs to stay open while
+// hovered.
+function Tooltip({
+ disableHoverablePopup = true,
+ ...props
+}: TooltipPrimitive.Root.Props) {
+ return (
+ <TooltipPrimitive.Root
+ data-slot="tooltip"
+ disableHoverablePopup={disableHoverablePopup}
+ {...props}
+ />
+ )
}
function TooltipTrigger({ ...props }: TooltipPrimitive.Trigger.Props) {