fix(editor): boost findings-tree slide to be perceptible on mobile

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) <noreply@anthropic.com>
This commit is contained in:
Bastien ChanotandClaude Opus 4.7 committed 2026-05-21 07:28:28 +02:00
1 parent 5093418950
commit 4dd6432ed6
1 file changed
+3 -2
@@ -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 ? (