UI: gesture & history polish — pinch/swipe fix, wider back-swipe, nudge align, history overscroll
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 45s
CI / gate (pull_request) Successful in 0s
CI / deploy (pull_request) Successful in 2m10s

- Stop a two-finger pinch-out from also opening the history: the board wrapper arms its
  open/close pull only while a single pointer is down (a 2nd finger is a pinch, owned by Board).
- Widen the edge-swipe-back activation band to the left half of the viewport (was 20%).
- Align a chat nudge by sender like a bubble — your own to the right, the opponent's to the
  left (only the alignment changes).
- Kill the iOS rubber-band inside the history drawer (overscroll-behavior: none).

e2e: a two-finger pinch does not open the history; a back-swipe from the left half navigates back.
This commit is contained in:
Ilia Denisov
2026-06-11 21:01:43 +02:00
parent 6268b9d2a2
commit a41c35d5f9
5 changed files with 82 additions and 9 deletions
+5 -5
View File
@@ -36,11 +36,11 @@
// Edge-swipe back: a rightward drag begun in the left band returns to `back`, the standard
// mobile gesture (instant on release — the route slide plays the animation). Listened at the
// window in the CAPTURE phase so the board's own pointer handlers (which capture/stop the
// event) can never swallow it; touch/pen only. The band is a fraction of the viewport width
// (EDGE_FRACTION — widen/narrow there). A hit-test keeps the wider band clear of the gestures
// it would otherwise hijack: the rack (tile lift/reorder), a draggable pending tile, a
// zoomed-in board (it pans), and text inputs.
const EDGE_FRACTION = 0.2;
// event) can never swallow it; touch/pen only. The band is the left half of the viewport
// width (EDGE_FRACTION — widen/narrow there). A hit-test keeps the wide band clear of the
// gestures it would otherwise hijack: the rack (tile lift/reorder), a draggable pending tile,
// a zoomed-in board (it pans), and text inputs.
const EDGE_FRACTION = 0.5;
const SWIPE_SKIP = '[data-rack], .cell.pending, .viewport.zoomed, input, textarea, select';
$effect(() => {
function onDown(e: PointerEvent) {