From a937ec5761321687f44fa13e2ee834b213f3a98c Mon Sep 17 00:00:00 2001 From: rumetsasmaz Date: Sun, 15 Nov 2026 13:37:29 +0300 Subject: [PATCH] Menu band: see-through instead of white; never freezes after a remount - the hover band is now a soft see-through layer with a thin edge, like the open row's frame; the row's own text shows through, so the big number stays readable - reset the pending-frame marker on unmount; after React's dev remount the band otherwise never moved again Co-Authored-By: Claude Opus 5.5 --- web/src/reactbits/FlowingMenu.tsx | 7 ++++++- web/src/reactbits/flowingmenu.css | 9 +++++++-- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/web/src/reactbits/FlowingMenu.tsx b/web/src/reactbits/FlowingMenu.tsx index 90be51f..d539c93 100644 --- a/web/src/reactbits/FlowingMenu.tsx +++ b/web/src/reactbits/FlowingMenu.tsx @@ -220,7 +220,12 @@ export function FlowingMenu({ items, active, label, duration = 0.42, stretch = 0 }, [activeIndex]); useEffect(() => { const l = loop.current; - return () => cancelAnimationFrame(l.raf); + return () => { + // forget the cancelled frame too, or kick() thinks one is still coming and the band freezes + // (React's StrictMode mounts, unmounts and mounts again in development) + cancelAnimationFrame(l.raf); + l.raf = 0; + }; }, []); const onPointerMove = (e: ReactPointerEvent) => { diff --git a/web/src/reactbits/flowingmenu.css b/web/src/reactbits/flowingmenu.css index 7ecf309..99295df 100644 --- a/web/src/reactbits/flowingmenu.css +++ b/web/src/reactbits/flowingmenu.css @@ -207,10 +207,15 @@ z-index: 1; visibility: hidden; pointer-events: none; - background: #e8edf4; - color: #0b1018; + /* see-through, like the open row's frame: the row's own text shows through unchanged */ + background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.035)); + box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); will-change: clip-path; } +/* the copy inside the band is not needed any more: the row underneath stays readable */ +.fm-band > .fm-row { + visibility: hidden; +} .fm-band .fm-index, .fm-band .fm-title svg, .fm-band .fm-sub,