Skip to content

Add animation to SkeletonField component#2184

Merged
rmn-snpk merged 1 commit intomainfrom
feat/animate-skeleton
Mar 31, 2026
Merged

Add animation to SkeletonField component#2184
rmn-snpk merged 1 commit intomainfrom
feat/animate-skeleton

Conversation

@rmn-snpk
Copy link
Copy Markdown

@rmn-snpk rmn-snpk commented Mar 31, 2026

Fixes OPS-4043

@linear
Copy link
Copy Markdown

linear Bot commented Mar 31, 2026

@sonarqubecloud
Copy link
Copy Markdown

@rmn-snpk rmn-snpk marked this pull request as ready for review March 31, 2026 13:48
Copilot AI review requested due to automatic review settings March 31, 2026 13:48
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a shimmer animation to the SkeletonField loading placeholder to provide a more dynamic skeleton UI, and updates Storybook/Chromatic settings to stabilize snapshots.

Changes:

  • Added shimmer keyframes + animate-shimmer animation to the shared Tailwind config.
  • Updated SkeletonField to render a gradient shimmer style when show is true.
  • Adjusted the SkeletonField Storybook story to pause animations for Chromatic.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
packages/ui-components/tailwind.base.config.cjs Introduces shimmer keyframes and shimmer animation utility for Tailwind.
packages/ui-components/src/components/skeleton/skeleton-field.tsx Switches the skeleton placeholder styling to use the new shimmer animation + gradient background sizing.
packages/ui-components/src/stories/skeleton/skeleton-field.stories.tsx Sets Chromatic to pause animations to reduce visual regression flakiness.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

className={cn(
'w-full h-full rounded-xl',
'bg-gradient-to-r from-muted to-border',
'animate-shimmer bg-gradient-to-l from-muted via-border to-muted bg-[length:200%_100%]',
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SkeletonField now always uses an infinite shimmer animation when show is true. This doesn’t respect users who have prefers-reduced-motion enabled. Consider gating the animation behind Tailwind’s motion-safe: variant (or disabling it with motion-reduce:animate-none) so the skeleton renders as a static gradient for reduced-motion users.

Suggested change
'animate-shimmer bg-gradient-to-l from-muted via-border to-muted bg-[length:200%_100%]',
'motion-safe:animate-shimmer motion-reduce:animate-none bg-gradient-to-l from-muted via-border to-muted bg-[length:200%_100%]',

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we never add it, don't think it's relevant

@rmn-snpk rmn-snpk merged commit 1c85342 into main Mar 31, 2026
29 checks passed
@rmn-snpk rmn-snpk deleted the feat/animate-skeleton branch March 31, 2026 14:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants