Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Ported from
SigNoz/signozand adapted to this repo's Storybook.Motiontoolbar global with two values,Still(default) andLive,settleForCapturerun asafterEach(so after a story'splay), and thehtml.sb-stillblock inpreview.css: zero-length single-iteration animations that keep their end state, no transitions, transparent caret.apps/docs/scripts/story-shots.mjs(pnpm -F docs shots) screenshots stories off a running dev server, one PNG per story and theme plus ashots.jsonrecording what each shot is.apps/docs/scripts/story-shots-diff.mjs(pnpm -F docs diff:shots) pairs the PNGs of two runs by relative path and reports what moved, largest first, using Chromatic's comparison (YIQ distance overdiffThreshold, antialiasing-only pixels ignored)..claude/skills/storybook-visual-diffdrives both scripts.Why
A snapshot of a story with a spinner or a caret catches it at whatever frame the capture landed on, so the same story reports a change on every run. Parking animations on their last frame is also where Chromatic parks them, so local shots and Chromatic agree.
Livestays available for watching a transition in the browser.The scripts give a local read on what a change moved before pushing to Chromatic.
How to verify
Run
pnpm dev, open any story with motion (Spinner, Tooltip), and toggle theMotioncontrol in the toolbar:Stillholds the end frame,Liveanimates.From
apps/docs, shoot the same tree twice and diff it; the noise floor should be zero:Needs ImageMagick (
magickorconvert) on PATH. Playwright is already a devDependency ofapps/docs.