Repository navigation
fix(website): respect reduced motion and add posters on the Nvidia VFX page - #20955
Conversation
…X page - VideoCompareSlider only autoplays its two clips after mount and when the visitor has not asked for reduced motion; otherwise both stay paused on their first frame. Binding autoplay after mount keeps the server markup free of the attribute, so hydration cannot leave it set. - Before/after tabs accept beforePosterSrc/afterPosterSrc, bound as poster with preload="none" like the gallery videos. The Nvidia tabs use first-frame JPGs extracted from their clips. - A full-span gallery image fits inside its card below md instead of being cropped by aspect-video + object-cover (the 2400x817 pipeline image lost about 40% of its width on phones). md and up is unchanged. Follow-up to #19664.
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
🧩 Custom Nodes Ecosystem Matrix: 🟡 Withheld — could not measureExecutes the frontend JS of every registry pack that ships any, against this change, in both renderers. The eight This candidate changes nothing the matrix measures, so every expensive stage was skipped. Reproduce locally# build one shard's fixture, then run it
python3 scripts/registry-census/build_matrix.py --shard 1/4
MATRIX_RENDERER=vue MATRIX_VUE=1 \
npx vitest run --config vitest.matrix.config.mts
Full docs: scripts/registry-census/README.md 🌾 Fallow: ✅ PassedFallow audits the diff for duplication, complexity and dead code. It gates on new findings only, so when the audit completes, a red is something this PR introduced or moved — never inherited backlog. A red can also mean the audit itself did not finish; the details below say which happened. No new findings in the changed files. Reproduce locally# the base the gate compared against
npx fallow audit --root . --quiet --format json \
--changed-since 99d57a26d17a98186dfb79fba211d1e7dbd210c4
Full docs: ADR-DEVEX-LINT-0015 🌐 Website E2ETip All tests passed.
🔗 Website PreviewWebsite Preview: https://comfy-website-preview-pr-20955.vercel.app Models is built and gated by PostHog (workshop-enabled), using staging Cloud. This commit: https://website-frontend-e9maqev6z-comfyui.vercel.app Last updated: 2026-10-14T00:01:48Z for |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #20955 +/- ##
==========================================
- Coverage 86.38% 86.27% -0.12%
==========================================
Files 3672 3567 -105
Lines 175225 171991 -3234
Branches 48353 47253 -1100
==========================================
- Hits 151364 148378 -2986
+ Misses 21817 21727 -90
+ Partials 2044 1886 -158
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 107 files with indirect coverage changes 🚀 New features to boost your workflow:
|
…ia.comfy.org Media belongs on media.comfy.org, not in git. Remove the six first-frame JPGs and their beforePosterSrc/afterPosterSrc entries; the optional poster fields and the binding stay so the URLs can be added once uploaded. Add a unit test for ModelLaunchGalleryCardMedia covering the full-span image, regular image and full-span video paths.
Swarmhost agentic reviewThe detailed evaluation is available to employees in the internal Slack review thread. Evaluation failed to run ( Evaluation budget remaining for this pull request: 99 automatic and 99 manual. Updated by Swarmhost's agentic review process. |
🐑 The six posters all resolve — that's the check nothing in CI does. Holding the queue for @webreviewer-bot.This fixes the exact findings that were weighed and accepted on #19664, which is the right way for them to come back. What I verified myself, because a CDN path that 404s is green in CI and ships as an empty box:
All six live, all sensibly sized, and the hero poster at Gates at Why I'm not queueing yet. @webreviewer-bot is labelled and hasn't posted. After #20683 — where I armed That's worth the wait specifically on this PR: the three fixes are reduced motion, poster frames and a mobile crop, which are rendered behaviours. My poster check is a network result, not a rendering one, and @webreviewer-bot measures painted pixels with idle-vs-idle controls. If the reduced-motion gate or the Scope-wise this is squarely mine — 7 files, +126/−10, and 88 of the 126 added lines are tests. I'll queue on its verdict. |
Requested by June · Slack thread
Summary
Follow-up to #19664, fixing three review findings on /nvidia-vfx.
Before: the before/after comparison clips autoplayed and looped even for visitors who ask for reduced motion, and showed an empty dark box until the clips arrived. On phones the full-width workflow screenshot in the gallery was cropped to its middle, losing about 40% of the image.
After: with reduced motion the comparison stays paused on its first frame. Each tab shows a poster frame while its clips load. On phones the workflow screenshot fits inside its card in full (pinned to the top so the caption sits below it); tablet and desktop are unchanged.
How:
VideoCompareSliderbindsautoplayonly after mount and only whenprefersReducedMotion()is false (the helperScrollCarouseluses), so the server markup never carries the attribute. Before/after tabs gain optionalbeforePosterSrc/afterPosterSrc, bound asposterwithpreload="none"as inModelLaunchGalleryCardMedia. The six first-frame posters (extracted from the Nvidia clips) live on media.comfy.org next to the clips (https://media.comfy.org/website/nvidia-rtx/nvidia-vfx-<tab>-{before,after}.jpg), not in git, and each tab'sbeforePosterSrc/afterPosterSrcpoints at them. Aspan: 'full'image card usesobject-contain object-topbelowmdand the existingobject-coverfrommdup; /nvidia-vfx is the only page with a full-span card. No zh-CN copy changed. The HDR caption is left for a separate copy decision.Verification
VideoCompareSlider.test.ts: new table test for autoplay with and without reduced motion (fails on the old staticautoplay), and a poster test.ModelLaunchGalleryCardMedia.test.ts: covers the full-span image, regular image and full-span video paths.pnpm exec oxlint,pnpm exec eslint apps/website,pnpm --filter @comfyorg/website format:check,pnpm typecheck:website, and websitepnpm test:unitall pass locally.image/jpeg).