Repository navigation
fix(themes): hold the pack welcome image still under reduced motion - #31440
Conversation
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Nothing blocks. The fix reuses the reduced-motion mechanism that already exists, What this change shipsInventory (4 items) — 4 justifiedIntent: People who turn on reduced motion want a theme pack's animated welcome image to stay still on new chats. This is a FIX (closes #23841, and the new test fails on base).
[FIRST-PRINCIPLES-REVIEWED] 414c285 Description read[DESCRIPTION-READ] fce923c628ad7ed1866c8dd7bec59de6c6da00a9e802e13e110007f4886c34b4 That sha256 names the PR description this verdict read. Recompute it with |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks. No control is added or changed. The existing welcome image now stops on its first frame under reduced motion, and a still screenshot can't show that difference, as the author says. [UX-REVIEWED] 414c285 Description read[DESCRIPTION-READ] cb6a82f16379cdb02bf28ffe0f92971ec8c4ca9e4fe577e7d027534b799eeff8 That sha256 names everything this verdict read: the PR description, plus the 3 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change reuses Notes
[DESIGN-REVIEWED] 414c285 Description read[DESCRIPTION-READ] 69bceb04857b177cb7a64def9cd3bb970c435a1e943fd14f13b817f5d3e30928 That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
93c857c to
56f1857
Compare
56f1857 to
6e1165d
Compare
|
Rebased: main moved in [operator: bolichen97] |
A theme pack's welcome image (branding/welcome.*) rendered as a plain <img>, so an animated GIF, WebP or SVG kept playing when the user asked for reduced motion: the global rule stops the page's own animations, not an image's frames. The welcome screen now renders it through PackLoaderImage, which already paints loader art once onto a canvas under reduced motion. The welcome hero is hidden on a short viewport, so a still painted while hidden now takes its size from the canvas's CSS box instead of the 14px carousel fallback and stays sharp when the hero shows. The themes spec, theming contract and feature map say so. Closes #23841
6e1165d to
414c285
Compare
|
Rebased: main moved in [operator: bolichen97] |
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Approved for the on-call. Review lanes pass on 414c285, no conflict, no open change request.
…31440) A theme pack's welcome image (branding/welcome.*) rendered as a plain <img>, so an animated GIF, WebP or SVG kept playing when the user asked for reduced motion: the global rule stops the page's own animations, not an image's frames. The welcome screen now renders it through PackLoaderImage, which already paints loader art once onto a canvas under reduced motion. The welcome hero is hidden on a short viewport, so a still painted while hidden now takes its size from the canvas's CSS box instead of the 14px carousel fallback and stays sharp when the hero shows. The themes spec, theming contract and feature map say so. Closes #23841 (cherry picked from commit 1674b1f) Co-author on main: Bolin Chen
…31440) A theme pack's welcome image (branding/welcome.*) rendered as a plain <img>, so an animated GIF, WebP or SVG kept playing when the user asked for reduced motion: the global rule stops the page's own animations, not an image's frames. The welcome screen now renders it through PackLoaderImage, which already paints loader art once onto a canvas under reduced motion. The welcome hero is hidden on a short viewport, so a still painted while hidden now takes its size from the canvas's CSS box instead of the 14px carousel fallback and stays sharp when the hero shows. The themes spec, theming contract and feature map say so. Closes #23841 (cherry picked from commit 1674b1f) Co-author on main: Bolin Chen
…31440) A theme pack's welcome image (branding/welcome.*) rendered as a plain <img>, so an animated GIF, WebP or SVG kept playing when the user asked for reduced motion: the global rule stops the page's own animations, not an image's frames. The welcome screen now renders it through PackLoaderImage, which already paints loader art once onto a canvas under reduced motion. The welcome hero is hidden on a short viewport, so a still painted while hidden now takes its size from the canvas's CSS box instead of the 14px carousel fallback and stays sharp when the hero shows. The themes spec, theming contract and feature map say so. Closes #23841 (cherry picked from commit 1674b1f) Co-author on main: Bolin Chen
Problem / Motivation
Goal: A theme pack's animated welcome image holds still on its first frame when the user asks for reduced motion.
A pack's welcome image (
branding/welcome.*) can be an animated GIF, WebP or SVG. The welcome screen of a new chat rendered it as a plain<img>, so it kept playing withprefers-reduced-motion: reduceon. The page's global reduced-motion rule stops the page's own animations, not the frames inside an image.Why it matters
People who turn on reduced motion do so because motion bothers them, sometimes physically. An installed pack's animated welcome image ignored that setting on every new chat. The pack's loader art already honours it since #23552.
Not a goal
What changed (motivation → approach → change)
Under reduced motion the welcome image now stops on its first frame. With motion allowed it plays as before.
The cause was the plain
<img>: nothing on the page can pause an image's own animation.PackLoaderImagealready solves this for loader art. Under reduced motion it paints the image once onto a<canvas>, which never repaints, and it follows the setting live.components/WelcomeView.tsxnow renders its brand image throughPackLoaderImage, with the samesrcand classes. The welcome hero is hidden on a short viewport, so a still painted while hidden takes its size from the canvas's CSS box instead of the 14px carousel fallback, and stays sharp when the hero shows. The themes spec, the theming contract, the feature map andPackLoaderImage's header comment say the welcome image holds its first frame under reduced motion.Backwards compatibility
Compatible: with motion allowed the welcome image is still an
<img>with the same source, classes,alt=""andaria-hidden; it only gainsdraggable={false}, as the loader art has. Only reduced motion renders differently; a visible loader canvas in the chat footer keeps its laid-out size, so the footer is unchanged.Removes nothing: the precedence of compiled branding, pack welcome image, pack logo and stock ghost is unchanged.
Tests
WelcomeView.brandMark.test.tsxaddsholds an animated welcome image on a still canvas under reduced motion: withprefers-reduced-motion: reduce, a pack's welcome GIF renders a<canvas>, and the only<img>is the hidden decode copy. It fails onorigin/main(the image is a visible<img>) and passes with the fix. The existing brand-mark tests keep the motion-allowed<img>, itsalt=""andaria-hidden, and the precedence order.PackLoaderImage.test.tsxaddssizes a canvas under a hidden ancestor from its CSS box, not the 14px slot edge: a canvas with no layout box and a 48px CSS size is painted at 48px. It fails without the sizing change (14px) and passes with it.WelcomeView.test.tsxunder--sequence.shuffle --sequence.seed=23841.Proof: not provable -- frontend test (prove.py runs Python only)
Manual verification
N/A — unit coverage sufficient: the canvas still-frame path is the one
PackLoaderImage.test.tsxalready covers for loader art, and the new test proves the welcome screen takes it.Screenshots / video
Why no screenshot: with motion allowed the welcome image is the same
<img>as before, and under reduced motion it shows the image's first frame, which a still capture cannot tell apart from the old image.Related Issues
Closes #23841
Sibling sweep
Swept: git grep -nE "brandWelcome|brandLogo|src={avatar}|loaderImages" -- website/src
Sibling: website/src/pages/chat/ChatFooter.tsx -- not affected -- already renders pack loader art through PackLoaderImage
Sibling: website/src/shell/nav/railChrome.tsx:40 -- tracked in #31362
Sibling: website/src/shell/topbar/shellHeader.tsx:77 -- tracked in #31362
Pattern harvest
Rule candidate: review-prompt
Pattern: pack-supplied image that may animate (GIF, WebP, APNG, SVG) rendered as a plain
<img>instead of throughPackLoaderImage, so it ignores reduced motionChecklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.