From 3d147dd3def0ca21383b501068140ec76605f6c4 Mon Sep 17 00:00:00 2001 From: vshnosngh Date: Thu, 5 Nov 2026 13:03:19 +0530 Subject: [PATCH] fix(slider): add pointer capture, touch-action none, link isolation, and zero-reflow RAF tracking for ultra-smooth mobile responsiveness --- src/components/magicui/text-animate.tsx | 2 +- .../sections/ShiftableToolsGridSection.tsx | 199 ++++++++++++++---- src/components/ui/CardBeforeAfterSlider.tsx | 135 ++++++------ src/components/ui/Cinematic3DComparison.tsx | 147 ++++++++----- tests/slider.test.tsx | 51 +++++ 5 files changed, 375 insertions(+), 159 deletions(-) create mode 100644 tests/slider.test.tsx diff --git a/src/components/magicui/text-animate.tsx b/src/components/magicui/text-animate.tsx index 6e19bcc..df1703b 100644 --- a/src/components/magicui/text-animate.tsx +++ b/src/components/magicui/text-animate.tsx @@ -28,7 +28,7 @@ interface TextAnimateProps { } // Ultra-smooth Apple-grade exponential easing -const easeOutApple = [0.16, 1, 0.3, 1]; +const easeOutApple = [0.16, 1, 0.3, 1] as const; export function TextAnimate({ children, diff --git a/src/components/sections/ShiftableToolsGridSection.tsx b/src/components/sections/ShiftableToolsGridSection.tsx index 61a6890..fe8f3c5 100644 --- a/src/components/sections/ShiftableToolsGridSection.tsx +++ b/src/components/sections/ShiftableToolsGridSection.tsx @@ -185,31 +185,63 @@ function ShiftableRow({ items }: { items: ToolMediaItem[] }) { className="w-full transition-[flex-grow] duration-1000 ease-[cubic-bezier(0.16,1,0.3,1)] will-change-[flex-grow] flex flex-col min-w-0" > {/* Window Container with strictly locked pixel height & landscape aspect */} - - {/* GPU-Composited Shadow Elevation Layer (Opacity-only transition, zero paint thrash) */} -