aboutsummaryrefslogtreecommitdiffstats
path: root/tools/profile-pager-test.js
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2026-10-15 08:35:59 -0700
committerAdam Soltys <[email protected]>2026-10-15 08:35:59 -0700
commit849e3d172354c87c14991392bd075334dc5f68af (patch)
treeb6ae24bdf7f8abd13f1b44f4915336d6cb60f9b6 /tools/profile-pager-test.js
parentb540d3fab2579da40e0bcdb59581f83b0b742947 (diff)
downloadcoinosv3-849e3d172354c87c14991392bd075334dc5f68af.tar.gz
coinosv3-849e3d172354c87c14991392bd075334dc5f68af.zip
Thread pages: a picture opens in the media pager, over the thread's pictures; a tap brings up the caption and controls wherever the pager was opened from. A picture tapped on a thread page opened alone, full screen, and a tap on it closed it — no caption, no controls, nothing to swipe to (Adam, 2026-10-16: "clicking again dismisses it instead of showing me the caption and controls… let's make it consistent no matter where media is opened from"). Now a thread is a pager source like the feed and a profile page (pageRowOf/pagerSource `thread`, keyed by the thread's root): its slides are the root's pictures and then its replies', in the order the page draws them (threadTree/threadOrder, the tree walk factored out of threadScreen), with nothing more to fetch; closing after moving on brings that post on screen. And in any pager opened from a page, the first tap shows the post's details and the next closes it — the tap on the picture that opened it no longer closes it outright, so the feed and a profile behave the same as the thread. A face or a chat's picture still opens alone. tools/thread-pager-test.js (the thread's pictures only, root first then the reply's; counter 1/2; a tap shows the author and the words; right and down; Escape leaves the thread with the post on screen; a reply's picture; tap, then tap closes); feed-picture-pager and profile-pager tests updated for the tap rule; image-tap, thread-back-scroll pass; thread-reply-test times out on clean HEAD too.
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01J1Kon8bxJoHRpJdSzshCkp
Diffstat (limited to 'tools/profile-pager-test.js')
-rw-r--r--tools/profile-pager-test.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/profile-pager-test.js b/tools/profile-pager-test.js
index 85aee86..29341e7 100644
--- a/tools/profile-pager-test.js
+++ b/tools/profile-pager-test.js
@@ -125,8 +125,10 @@ try {
check('…landed on that post', (await rowTop('one picture')) !== null && (await rowTop('one picture')) < 120 && (await rowTop('one picture')) > -10, 'row top ' + (await rowTop('one picture')));
await openPic('one picture');
check('opened again on the picture it closed on', await resting('b.png'), await curPic());
+ await tapPager(); await sleep(400);
+ check('a tap on the picture that opened it shows its details', await page.evaluate(() => document.querySelector('.media-pager')?.classList.contains('show')));
await tapPager(); await sleep(600);
- check('a tap on the picture that opened it closes it', await waitFor(() => !document.querySelector('.media-pager'), null, 3000));
+ check('…and the next closes it', await waitFor(() => !document.querySelector('.media-pager'), null, 3000));
check('no page errors', errs.length === 0, errs.slice(0, 2).join(' | '));
} catch (e) { console.error(e); ok = false; } finally { await browser.close(); server.stop(true); }
console.log(ok ? '\n✅ a profile\'s pictures page through the pager' : '\n❌ failed');