From 1dfb1e15340542aec807bd9f24b6f482f02d4ca2 Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Thu, 2 Jul 2026 09:56:59 +0000 Subject: [PATCH] fix(building-passport): portal tooltip content so it isn't trapped by stacking context MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The shadcn TooltipContent rendered inline, missing the Portal that upstream shadcn ships. On the Current Efficiency card the info tooltip lives inside a `relative z-10` div while the Lodged EPC badge is a sibling at `z-20`, so the popup's own `z-50` only competed within the z-10 subtree and the badge painted over it (also latently clipped by the card's `overflow-hidden`). Wrapping TooltipContent in TooltipPrimitive.Portal renders it at , escaping both the stacking context and the overflow clip — fixes all 9 tooltips. Co-Authored-By: Claude Opus 4.8 (1M context) --- src/app/shadcn_components/ui/tooltip.tsx | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/src/app/shadcn_components/ui/tooltip.tsx b/src/app/shadcn_components/ui/tooltip.tsx index 30fc44d9..25576f54 100644 --- a/src/app/shadcn_components/ui/tooltip.tsx +++ b/src/app/shadcn_components/ui/tooltip.tsx @@ -15,15 +15,17 @@ const TooltipContent = React.forwardRef< React.ElementRef, React.ComponentPropsWithoutRef >(({ className, sideOffset = 4, ...props }, ref) => ( - + + + )) TooltipContent.displayName = TooltipPrimitive.Content.displayName