diff options
| author | Adam Soltys <[email protected]> | 2026-10-16 22:55:25 -0700 |
|---|---|---|
| committer | Adam Soltys <[email protected]> | 2026-10-16 22:55:25 -0700 |
| commit | 8deede7162ae195934cdee6074d1443c5af3c803 (patch) | |
| tree | 1d1efddcff5f24ede16792d66724dcd563f52369 /src/features | |
| parent | ebaec4226a49628ea0ce6e08e4b41480bb9327a7 (diff) | |
| download | coinosv3-8deede7162ae195934cdee6074d1443c5af3c803.tar.gz coinosv3-8deede7162ae195934cdee6074d1443c5af3c803.zip | |
The video pager's seek bar shows only on the clip square on the screen: none while the pager is in motion.
The bar sits in the clip's slide, so a glide to the next clip carried it up the screen, a white line sliding out while the next slid in (Adam, 2026-10-16: "i don't want to see the seek bar while i'm transitioning to the next video"). The pager's frame loop now marks the pager `moving` whenever the clip on screen's slide is off its mark by more than 2px — under a finger, in a glide or a flight, snapping back — and under that mark no seek bar shows at all; it fades back in (180 ms) once the clip has landed. Bars on slides other than the one on screen stay hidden too (a slide seen before kept its bar ready).
pager-seek-hide-test: at rest one bar, on the clip on screen; through a glide to the next clip every frame between the two has the pager marked moving and no bar to be seen; the landed clip's bar fades in and the one before shows none; a finger holding the slides 100px off their mark hides it, letting go brings it back. pager-controls, pager-no-poster and pager-swipe-fly still pass (feed-video-pager-test's two failures are on clean HEAD too).
Co-Authored-By: Claude Fable 5.1 <[email protected]>
Diffstat (limited to 'src/features')
| -rw-r--r-- | src/features/messages.js | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/src/features/messages.js b/src/features/messages.js index 44450ea..1371b04 100644 --- a/src/features/messages.js +++ b/src/features/messages.js @@ -13349,10 +13349,23 @@ export function messagesFeature(ctx) { pager.anchor = first; // the slide meant to be on screen, from the first moment pager.screenH = scroller.clientHeight; pagerLoadAhead(); - // the clip on screen's seek bar, every frame (timeupdate comes a few times a second) + // the clip on screen's seek bar, every frame (timeupdate comes a few + // times a second). While the pager is in motion — under a finger, in a + // glide or a flight, snapping back — no seek bar shows at all: the + // clip's slide is off its mark, and the bar rode along with it, a + // white line sliding up the screen (Adam, 2026-10-16: "i don't want to + // see the seek bar while i'm transitioning to the next video"). It + // fades back in once the clip is square on the screen. if (video) { const p = pager; - const frame = () => { if (pager !== p) return; p.cur?.querySelector('.mp-seek')?._paint?.(); p.raf = requestAnimationFrame(frame); }; + const frame = () => { + if (pager !== p) return; + const bar = p.cur?.querySelector('.mp-seek'); + if (bar) bar._paint(); + const r = p.cur && p.cur.getBoundingClientRect(); + p.el.classList.toggle('moving', !!r && (Math.abs(r.top) > 2 || Math.abs(r.left) > 2)); + p.raf = requestAnimationFrame(frame); + }; p.raf = requestAnimationFrame(frame); } // turned on its side (or back), the slides change height: stay on this one |
