From 1a33366615fc5501bc860b72d3898f4c03e38226 Mon Sep 17 00:00:00 2001 From: jackwener Date: Wed, 24 Jun 2026 21:47:11 +0800 Subject: [PATCH] fix(ui): drop layout-trigger properties from Tooltip transitions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Kenji aesthetic audit reminder 4/6 (msg `6cc0e04d` 2026-06-24, finding #2): Tooltip is a high-frequency hover/focus surface and should use instant positioning + compositor-only popup transitions. Two sites violated: 1. Positioner: `transition-[top,left,right,bottom,transform]` — `top` / `left` / `right` / `bottom` are layout-trigger properties. Every reposition (e.g. anchor moved by scroll, or side flipped on collision) ran through layout + paint instead of GPU compositor. Reduced to `transition-transform` so the transform-based reposition still tweens smoothly; the layout positioning happens instantly off-frame. 2. Popup: `transition-[width,height,scale,opacity]` — `width` / `height` are layout-trigger. Reduced to `transition-[scale,opacity]`, which is what the data-starting-style / data-ending-style scale-98 + opacity-0 actually animate. The popup-width / popup-height CSS vars still set the size; just no longer transitioned. Net behavior: tooltip pops in/out via scale+fade (compositor), repositions via transform (compositor). Layout properties are applied instantly per frame instead of crossfading. Drawer's `transition-[transform,box-shadow,height,background-color]` and Tabs' `transition-[width,translate]` indicator are flagged in kenji's audit but deferred — both interact with swipe gesture / tab sizing logic and need a focused PR with visual smoke verification. Scoped to 2 lines in 1 file to keep merge surface minimal with the in-flight PRs #202 / #204 / #206. --- packages/ui/src/primitives/tooltip.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/ui/src/primitives/tooltip.tsx b/packages/ui/src/primitives/tooltip.tsx index bb0cb4eba2..ec15d72df2 100644 --- a/packages/ui/src/primitives/tooltip.tsx +++ b/packages/ui/src/primitives/tooltip.tsx @@ -39,14 +39,14 @@ export function TooltipPopup({