From 4dd6432ed606f6f4ffa5bf29a57e2eb2a1c54f39 Mon Sep 17 00:00:00 2001 From: Bastien Chanot Date: Thu, 21 May 2026 07:28:28 +0200 Subject: [PATCH] fix(editor): boost findings-tree slide to be perceptible on mobile MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Previous 16px / 180ms transition was barely visible on a 360-420px wide mobile viewport. Adjustments: - Slide distance 16px → 32px so the off-position is clearly off-axis on small screens. - Duration 180ms → 220ms — slightly longer keeps the slide visible through the iOS/Android touch-event paint cycle. - Hint with willChange: 'transform, opacity' so mobile Safari promotes the ul to its own compositor layer up front, avoiding a first-frame flicker on weaker GPUs. No behavioural change to direction logic; tests still 155/155. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/observation/FindingsTreePicker.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/components/observation/FindingsTreePicker.tsx b/src/components/observation/FindingsTreePicker.tsx index afe483be..0f5b256d 100644 --- a/src/components/observation/FindingsTreePicker.tsx +++ b/src/components/observation/FindingsTreePicker.tsx @@ -10,7 +10,7 @@ import { useT } from '@/i18n/useT' import { useLocaleStore } from '@/state/localeStore' const levelVariants = { - enter: (dir: 1 | -1) => ({ opacity: 0, x: dir * 16 }), + enter: (dir: 1 | -1) => ({ opacity: 0, x: dir * 32 }), center: { opacity: 1, x: 0 }, } @@ -195,7 +195,8 @@ export default function FindingsTreePicker({ variants={levelVariants} initial="enter" animate="center" - transition={{ duration: 0.18, ease: 'easeOut' }} + transition={{ duration: 0.22, ease: 'easeOut' }} + style={{ willChange: 'transform, opacity' }} className="space-y-1.5 max-h-64 overflow-auto pr-1" > {currentNodes.length === 0 ? (