Commit Graph

2 Commits

Author SHA1 Message Date
Ilia Denisov de11ae46a2 UI: enable the back-swipe inside Telegram (fix lost swipe-back)
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / ui (pull_request) Successful in 41s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 57s
The gesture was disabled inside Telegram on the mistaken assumption it would
fight a Telegram horizontal close gesture — but Telegram's only close/minimise
gesture is vertical (disableVerticalSwipes, Bot API 7.7+). Disabling it there,
together with dropping the old left-edge swipe, removed every swipe-back in
Telegram (which that edge-swipe — deliberately enabled in TG, commit 7e34897 —
had provided).

Make shouldArm Telegram-agnostic (drop the insideTelegram guard + its now-unused
import); the gesture works in Telegram too, alongside the native BackButton.
Drop the redundant overscroll-behavior-x on .router (body already sets
overscroll-behavior: none). Regression: an e2e drives the swipe under an
injected Telegram WebApp stub and asserts it navigates back.
2026-06-11 16:57:34 +02:00
Ilia Denisov 6d263ff7c6 UI: interactive back-swipe (left-band, snapshot backdrop)
CI / changes (pull_request) Successful in 2s
CI / unit (pull_request) Has been skipped
CI / integration (pull_request) Has been skipped
CI / ui (pull_request) Successful in 41s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 57s
Replace the 24px edge-swipe with a router-level interactive back gesture: a
rightward drag in the left ~38% band tracks the finger while a cheap themed
backdrop parallaxes in, and on release commits the back-navigation (past ~40%
of the width or a rightward flick) or snaps back. The live parent mounts only
on commit, which suppresses that one route slide for a seamless hand-off.

Pure decision logic (shouldArm/lockAxis/decideCommit + the per-gesture
controller) lives in lib/backswipe.ts with unit tests; the DOM wiring, hit-test
and settle animation in lib/backswipe.svelte.ts. The gesture yields to native
vertical scroll, skips the rack / draggable pending tiles / text inputs / the
board while zoomed-in, and is disabled inside Telegram (native BackButton owns
it). parentPath in App.svelte is now the single source for both the Telegram
button and the swipe.

Tests: backswipe unit (13) + e2e (3; Chromium+WebKit: commit, zoomed-in skip,
vertical scroll). Docs: UI_DESIGN.md Back bullet.
2026-06-11 16:41:36 +02:00