Skip to content

Commit 7da1b59

Browse files
authored
🤖 refactor: disable Chromatic snapshots for Shimmer animations (#610)
The Shimmer component uses infinite animations (`repeat: Number.POSITIVE_INFINITY`) which cause visual regression test failures in Chromatic. Each snapshot shows the animation at a different point, causing spurious diffs. **Changes:** - Disabled Chromatic snapshots for `ReasoningMessage.stories.tsx` (all stories use Shimmer) - Disabled Chromatic snapshots for `ActiveWorkspaceWithChat` story (includes streaming reasoning messages with Shimmer) **Why `disableSnapshot` instead of other approaches:** - Can't mock animations - Shimmer is an intentional UI feature we want in Storybook - Can't use `pauseAnimationAtEnd` - animation loops infinitely - Stories remain useful for manual testing and Storybook documentation _Generated with `mux`_
1 parent cbb5fbf commit 7da1b59

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/components/ai-elements/shimmer.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ const ShimmerComponent = ({
3333
"[--bg:linear-gradient(90deg,#0000_calc(50%-var(--spread)),var(--color-background),#0000_calc(50%+var(--spread)))] [background-repeat:no-repeat,padding-box]",
3434
className
3535
)}
36+
data-chromatic="ignore"
3637
initial={{ backgroundPosition: "100% center" }}
3738
style={
3839
{

0 commit comments

Comments
 (0)