From 9ce87d8742ea44918e73625cc79a0fc184b4597c Mon Sep 17 00:00:00 2001 From: Adam Soltys Date: Tue, 13 Oct 2026 23:36:16 +0000 Subject: Pager swipes: follow the finger sooner, page on a shorter swipe, glide faster, no step back - The glide was timed from now, but a frame's time can be a little earlier: its first frame stepped back (72px -> 58) before going on, the choppy 'reset' on letting go. Timed from its first frame now. - Slides follow the finger after 10px (was 30: a dead zone, then a jump). A touch that comes and goes within 24px and 350ms is still a tap. - On letting go: on to the next past a tenth of the width across, an eighth of the height down, or a flick of 24px at 0.2px/ms (was a fifth, 48px, 0.3). - Glide at most 130ms (was 170). Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01KPw21NEpWeTGu6swVASmBt --- tools/pager-tap-slop-test.js | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'tools') diff --git a/tools/pager-tap-slop-test.js b/tools/pager-tap-slop-test.js index bcc790c..09f761a 100644 --- a/tools/pager-tap-slop-test.js +++ b/tools/pager-tap-slop-test.js @@ -99,9 +99,9 @@ try { await drag(195, 420, 6, 14); s = await st(); check('14px down and a little across: a tap — it plays on, still there', s.paused === false && s.on === 'tall.webm', JSON.stringify(s)); - await drag(195, 420, 0, -25, 1); + await drag(195, 420, 0, -20, 1); s = await st(); - check('a quick 25px flick: still a tap — paused, not paged', s.paused === true && s.on === 'tall.webm', JSON.stringify(s)); + check('a quick 20px flick: still a tap — paused, not paged', s.paused === true && s.on === 'tall.webm', JSON.stringify(s)); await drag(195, 420, 0, 0, 1); s = await st(); check('a still tap plays it again', s.paused === false && s.on === 'tall.webm', JSON.stringify(s)); @@ -123,6 +123,16 @@ try { await drag(195, 500, 0, -80, 2); s = await st(); check('a quick 80px flick up: the next post', s.on === was, JSON.stringify(s)); + await drag(195, 500, 0, 300, 8); + await drag(195, 500, 0, -40, 2); + s = await st(); + check('a quick 40px flick up: the next post too', s.on === was, JSON.stringify(s)); + await drag(195, 500, 0, 300, 8); + await page.touchscreen.touchStart(195, 500); + for (let i = 1; i <= 12; i++) { await page.touchscreen.touchMove(195, 500 - 9 * i); await sleep(30); } + await page.touchscreen.touchEnd(); await sleep(900); + s = await st(); + check('a steady 108px drag up (an eighth of the screen): the next post', s.on === was, JSON.stringify(s)); console.log('\n[snappy: let go, and it lands at once]'); await drag(195, 500, 0, 300, 8); -- cgit v1.2.3