feat(loading-skeleton): CSS micro-animations on mount and pulse stagger - #351
Open
otsimaofficial wants to merge 1 commit into
Open
Conversation
Fade the skeleton in on mount (animate-fade-in) instead of popping in abruptly, and stagger each placeholder bar's pulse animation-delay so the loading state reads as a smooth wave rather than a flat blink. Closes Goldii-locks#278
|
@otsimaofficial Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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.
Problem & Goal
LoadingSkeletonpopped in abruptly and every placeholder bar pulsed in perfect unison, which reads as a flat blink rather than a smooth loading state.Changes
animate-fade-inkeyframe (added in Incorporate CSS micro-animations on create_job_form elements #45) instead of appearing instantly — this is the component's "state change" transition, since it only exists for the duration the parent has it mounted.animate-pulseoff the outer wrapper and onto each individual placeholder bar/row, with staggered[animation-delay:*ms]utility classes (0/75/100/175/250/325/400ms) so the pulse reads as a wave instead of a synchronized blink.data-testids per element (loading-skeleton,loading-skeleton-card,loading-skeleton-stat-0/1/2,loading-skeleton-row-0/1) for test targeting.Testing
__tests__/loading-skeleton-animations.test.tsx(6 tests): fade-in on the root,animate-pulse+ distinct staggered delays on the stat and row placeholders, and that the accessible loading announcement /aria-hiddendecorative markup are preserved.npx tsc --noEmit, the new test file, andnpm run buildall pass locally.Note:
npm run lintcurrently fails on this repo'smaindue to a pre-existing, unrelatedreact-hooks/set-state-in-effecterror inSignatureTimeoutAlert.tsx(visible on the last several merged PRs' CI runs). That's fixed independently in a separate PR and isn't touched here.Closes #278
🤖 Generated with Claude Code