feat: [UI] Replace Loading Spinner with Skeleton Loading on Authors Page #673
+274
−123
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.
Summary
Replaces the basic loading spinner on the authors page with a modern skeleton loading interface to improve user experience.
Fixes #674
The current authors page shows a centered spinner during data loading, which:
Before for a loading time of about 5 seconds
Solution
Implemented skeleton loading that:
After for the same loading time
20251224_213615_Export.MP4
Key Features
Changes Made -
Added a file
src/components/AuthorCardSkeleton.tsx- Reusable skeleton component with Framer Motion animationsModified
src/pages/AuthorsPage.tsx- Updated renderContent() to show skeletons during loadingsrc/styles/globals.css- Added shimmer keyframe animationTestings -
Tested for slow network (DevTools → Network → Slow 3G)
Skeletons are lightweight, so loading time remains same
Checklist
Code follows project style guidelines
Some future improvements I think can be done after this -
Questions or suggestions? Feel free to suggest changes!