From 77b9252577b40124835e65666f8a0c0563e94f12 Mon Sep 17 00:00:00 2001 From: Maurice Date: Fri, 6 Nov 2026 21:30:27 +0100 Subject: [PATCH] fix(journey): the card under the finger grows while swiping, and the zoom buttons really go on touch screens - The entry carousel draws the card at the centre larger while the swipe is still moving (focusIndex, a transform), and the active card and the map follow 90 ms after it stops instead of 150; the grow takes 200 ms - The journey map's zoom buttons set their display inline, which beat the class that hides them on touch screens; the display is a class now (#3001) - The packing widget data no longer carries a colour literal --- .../components/Journey/JourneyEntryCover.tsx | 2 +- client/src/components/Journey/JourneyMap.tsx | 6 ++- .../components/Journey/MobileMapTimeline.tsx | 4 +- .../Journey/useJourneyCarouselSync.test.ts | 4 +- .../Journey/useJourneyCarouselSync.ts | 38 ++++++++++++++++--- .../mobile/screens/journey/MJourneyDetail.tsx | 4 +- client/src/native/widgetOnline.ts | 3 +- 7 files changed, 46 insertions(+), 15 deletions(-) diff --git a/client/src/components/Journey/JourneyEntryCover.tsx b/client/src/components/Journey/JourneyEntryCover.tsx index 2d23eb7d9..1f5934ff9 100644 --- a/client/src/components/Journey/JourneyEntryCover.tsx +++ b/client/src/components/Journey/JourneyEntryCover.tsx @@ -108,7 +108,7 @@ export default function JourneyEntryCover({ // growing its box moved every card after it once a swipe had landed, and the // snap then pulled the strip again, which read as a jolt (carousels keep the // room for it with their gap and top padding). - className={`relative h-[152px] w-[136px] flex-none origin-bottom overflow-hidden rounded-[18px] text-start transition-[transform,box-shadow] duration-300 ease-[cubic-bezier(.2,.8,.2,1)] motion-reduce:transition-none ${ + className={`relative h-[152px] w-[136px] flex-none origin-bottom overflow-hidden rounded-[18px] text-start transition-[transform,box-shadow] duration-200 ease-[cubic-bezier(.2,.8,.2,1)] motion-reduce:transition-none ${ isActive ? 'z-[1] scale-[1.18] shadow-[0_18px_40px_-16px_rgba(0,0,0,.55)]' : 'scale-100 shadow-[0_10px_24px_-14px_rgba(0,0,0,.5)]' } ${src ? '' : emptyGround} ${isSuggestion ? 'opacity-90' : ''}`} // backgroundImage, not background: the shorthand would drop the opaque colour diff --git a/client/src/components/Journey/JourneyMap.tsx b/client/src/components/Journey/JourneyMap.tsx index 06f088531..c3178c79b 100644 --- a/client/src/components/Journey/JourneyMap.tsx +++ b/client/src/components/Journey/JourneyMap.tsx @@ -693,8 +693,10 @@ function JourneyMap( /> {/* A finger zooms with a pinch, and on a phone these sat under the bottom bar (#3001). */}