aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/features/messages.js3
-rw-r--r--src/style.css1
-rw-r--r--tools/pager-ready-gate-test.js1
3 files changed, 5 insertions, 0 deletions
diff --git a/src/features/messages.js b/src/features/messages.js
index 654b6d5..1cdbf58 100644
--- a/src/features/messages.js
+++ b/src/features/messages.js
@@ -13220,6 +13220,9 @@ export function messagesFeature(ctx) {
}
const text = (index < 0 ? 0 : index + 1) + ' / ' + groups.length, el = pager.el.querySelector('.mp-position');
if (el.textContent !== text) el.textContent = text;
+ // a video pager shows no count until it can fly: ten clips ready (Adam,
+ // 2026-10-17: "let's also not show the position/total counter until we have 10")
+ pager.el.classList.toggle('few', !pagerCanFly());
}
function buildPager(want) {
diff --git a/src/style.css b/src/style.css
index bbaae88..71c21a6 100644
--- a/src/style.css
+++ b/src/style.css
@@ -1860,3 +1860,4 @@ body::after {
.media-pager.videos .mp-position { animation: mp-position-out .4s 1.2s both; }
.media-pager.videos.moving .mp-position { animation: none; opacity: 1; }
@keyframes mp-position-out { from { opacity: 1; } to { opacity: 0; } }
+.media-pager.few .mp-position { visibility: hidden; }
diff --git a/tools/pager-ready-gate-test.js b/tools/pager-ready-gate-test.js
index 613f7d5..3a4f2be 100644
--- a/tools/pager-ready-gate-test.js
+++ b/tools/pager-ready-gate-test.js
@@ -135,6 +135,7 @@ try {
for (let i = 1; i <= 3; i++) { while (performance.now() < t0 + 80 * i / 3); fire('touchmove', 700 - 600 * i / 3); }
fire('touchend', 100, true);
});
+ check('with ' + ready + ' clips ready, no counter shows', await page.evaluate(() => getComputedStyle(document.querySelector('.mp-position')).visibility === 'hidden'));
check('with ' + ready + ' clips ready, a hard flick from tall2 goes one post, to tall3', ready < 10 && await waitFor(() => { const s = document.querySelector('.mp-slide.mp-cur'); return !!s && /tall3/.test(s.getAttribute('data-k')); }, null, 4000), String(await curClip()));
await page.keyboard.press('ArrowUp');
await waitFor(() => /tall2/.test(document.querySelector('.mp-slide.mp-cur')?.getAttribute('data-k') || ''), null, 4000);