From 631442a5598f12d0452e86a933833fd8ee039699 Mon Sep 17 00:00:00 2001 From: ankitkr104 Date: Mon, 23 Mar 2026 16:48:22 +0530 Subject: [PATCH 1/3] fix(ui): Pattern hover animation drift and flicker - Resolved SVG zooming drift by setting absolute pixel-based transform origins - Eliminated rapid hover flickering by utilizing an invisible static rect hit-area - Upgraded zoom effects with a snappy cubic-bezier bounce curve - Added alternating rotation physics to symbols mimicking a playful 3D effect - Maintained sharp rx constraints per design specs --- src/components/shared/Pattern.jsx | 39 ++++++++++++++++++++----------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/src/components/shared/Pattern.jsx b/src/components/shared/Pattern.jsx index 5be975d2..25c61246 100644 --- a/src/components/shared/Pattern.jsx +++ b/src/components/shared/Pattern.jsx @@ -17,12 +17,12 @@ export function Pattern({ let height = pattern.length * size + (pattern.length - 1) * gapY return ( -
+ ) + } + return ( ) } From 451046068a3338a01770652715c53f80a4c1bcd9 Mon Sep 17 00:00:00 2001 From: ankitkr104 Date: Wed, 25 Mar 2026 19:18:17 +0530 Subject: [PATCH 3/3] feat: respect prefers-reduced-motion in theme toggle animations --- src/components/shared/Header.jsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/components/shared/Header.jsx b/src/components/shared/Header.jsx index b3f5ed4f..f48c5581 100644 --- a/src/components/shared/Header.jsx +++ b/src/components/shared/Header.jsx @@ -6,7 +6,7 @@ import Link from 'next/link' import { usePathname } from 'next/navigation' import { Popover, Transition } from '@headlessui/react' import clsx from 'clsx' -import { motion, AnimatePresence } from 'framer-motion' +import { AnimatePresence, motion, useReducedMotion } from 'framer-motion' import { Container } from '@/components/shared/Container' @@ -185,6 +185,10 @@ function DesktopNavigation(props) { function ModeToggle() { const [mounted, setMounted] = useState(false) const [isDarkMode, setIsDarkMode] = useState(false) + const prefersReducedMotion = useReducedMotion() + const iconTransition = prefersReducedMotion + ? { duration: 0 } + : { duration: 0.5, ease: 'easeInOut' } useEffect(() => { setMounted(true) @@ -243,7 +247,7 @@ function ModeToggle() { initial={{ opacity: 0, rotate: -90, scale: 0.5 }} animate={{ opacity: 1, rotate: 0, scale: 1 }} exit={{ opacity: 0, rotate: 90, scale: 0.5 }} - transition={{ duration: 0.5, ease: 'easeInOut' }} + transition={iconTransition} > @@ -253,7 +257,7 @@ function ModeToggle() { initial={{ opacity: 0, rotate: 90, scale: 0.5 }} animate={{ opacity: 1, rotate: 0, scale: 1 }} exit={{ opacity: 0, rotate: -90, scale: 0.5 }} - transition={{ duration: 0.5, ease: 'easeInOut' }} + transition={iconTransition} >