Skip to content

feat(landing): swipe the screenshot slider on phones - #230

Merged
gnacho merged 1 commit into
mainfrom
fix/229-mobile-slider-swipe
Oct 28, 2026
Merged

gnacho merged 1 commit into
mainfrom
fix/229-mobile-slider-swipe

Conversation

@gnacho

@gnacho gnacho commented Oct 28, 2026

Copy link
Copy Markdown
Owner

Problem

The screenshots slider only answered to the arrows, the thumbnails and the keyboard. On a phone swiping the image, the expected gesture in a carousel, did nothing.

Measured at 360 and 390 px: viewport 312x209 and 342x229, arrows 46x46 sitting on top of the app UI at 30 px from each edge (92 px of 312 covered), two thumbnails of 72x49 that fit the row with no overflow, and no touch handlers in the slider code.

Changes

  • Pointer-based swipe on the slider viewport: horizontal drags move the image with the finger, a drag past 18% of the width (capped at 70 px) changes the slide, and vertical drags are left to the page scroll (touch-action: pan-y).
  • Slide swap animates with a short slide plus fade, and is instant when prefers-reduced-motion: reduce is set. Inline styles are cleared afterwards so no transform is left behind.
  • A drag no longer opens the lightbox, a plain tap still does.
  • The floating arrows are hidden below 861 px: with swipe and the two thumbnails right underneath they only covered the screenshot. Desktop keeps them and also gains mouse dragging.
  • The caption gets aria-live="polite" and the image draggable="false". Cache-bust bumped to ?v=5.

Verification

Playwright suite: 48/48 checks locally and 48/48 against https://nextsync.cloudless.club/.

  • Phones: swipe left and right change slide, caption and selected thumbnail; short drag returns to the same slide; vertical drag keeps the slide; tap opens the lightbox and drag does not; tap after a drag opens it again; thumbnails work; arrows hidden; no horizontal overflow; no console errors.
  • Desktop 1280 and 1440: arrows visible and clickable, mouse drag works, sticky header, no overflow, no console errors.
  • Reduced motion: instant swap with no residual transform.

Already deployed and verified in production.

Closes #229

@gnacho
gnacho merged commit ef7767e into main Oct 28, 2026
2 checks passed
@gnacho
gnacho deleted the fix/229-mobile-slider-swipe branch October 28, 2026 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

landing: screenshot slider ignores touch swipes and its arrows cover the image on phones

1 participant