feat: add skeleton loading placeholders for dashboard stats cards#142
feat: add skeleton loading placeholders for dashboard stats cards#142grishabhatia wants to merge 2 commits into
Conversation
|
@grishabhatia is attempting to deploy a commit to the Kunal Verma's projects Team on Vercel. A member of the Team first needs to authorize it. |
🚀 PR Received SuccessfullyHello @grishabhatia, Thank you for taking the initiative to contribute to this project. Please ensure that your PR follows all project guidelines properly before requesting review.
|
📝 WalkthroughWalkthroughThis PR adds skeleton loading placeholders to the DashboardPage to improve perceived performance. A new SkeletonCard component renders animated skeleton UI that displays on initial page load, then transitions to real metrics cards after 3 seconds via a timed state change. ChangesSkeleton Loading Feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@frontend/src/components/ui/SkeletonCard.jsx`:
- Around line 1-16: The container div in the SkeletonCard component is missing
the explicit Brutalist corner rule; update the className on the root div in
SkeletonCard to include "rounded-none" (e.g., add rounded-none to the existing
className string that currently contains "border-4 border-black bg-white p-6
sm:p-8 shadow-[8px_8px_0_0_rgba(0,0,0,1)]") so the card explicitly enforces
sharp corners regardless of base styles.
In `@frontend/src/pages/DashboardPage.jsx`:
- Around line 36-41: The skeleton hide timer currently starts on mount
regardless of auth state; update the useEffect that controls
setIsSkeletonLoading so it depends on the auth `loading` flag in DashboardPage:
only start the 3s timer when `loading` transitions to false (and the component
is rendering the skeletons), cancel/clear the timer if `loading` becomes true or
the component unmounts, and avoid starting the timer while `loading` is true;
modify the effect signature to include `loading` and add appropriate guards
around creating/clearing the timer so LoaderSwitcher and setIsSkeletonLoading
behave correctly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 9ffac51b-6356-42ff-af84-964b6f34716d
📒 Files selected for processing (2)
frontend/src/components/ui/SkeletonCard.jsxfrontend/src/pages/DashboardPage.jsx
|
@kunalverma2512 PR is ready for review and merge. Labels to be added on PR (not on issue):
Summary:
Please merge when possible. Thanks! |
|
@coderabbitai please check whether this PR os ready to merge |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Get PR details
gh pr view 142 --json title,body,state,mergeable,mergeStateStatus,reviewDecision,statusCheckRollup,labels,assignees,reviewRequests
echo "---COMMENTS---"
gh pr view 142 --json comments --jq '.comments[] | {author: .author.login, body: .body[:200]}'
echo "---REVIEWS---"
gh pr view 142 --json reviews --jq '.reviews[] | {author: .author.login, state: .state, body: .body[:200]}'Length of output: 9112 🏁 Script executed: #!/bin/bash
# Read the two changed files
echo "===SkeletonCard.jsx==="
cat frontend/src/components/ui/SkeletonCard.jsx
echo "===DashboardPage.jsx==="
cat frontend/src/pages/DashboardPage.jsxLength of output: 10023
❌ Merge Blockers1. Vercel Deployment FailingThe Vercel check has a FAILURE status — a team member needs to authorize the deployment from the Vercel dashboard before this can be considered stable. 2. No Approved Review
3. Open CodeRabbit Review CommentsThe automated review posted 2 actionable comments that haven't been addressed. The author should resolve those before requesting a merge.
|
| Issue | Detail |
|---|---|
| Duplicate sections | "Type of Change", "Testing", and "Checklist" appear twice in the body |
| All checkboxes unchecked | Every [ ] item is empty — the author should check applicable ones |
| No screenshots | Placeholder text [Attach screenshot here...] was never replaced with actual images |
| AI sign-off text left in | The line "Copy-paste this into your PR description on GitHub! 🚀" is visible at the bottom — this should be removed |
| "Changes Made" not bulleted | Reads as a block of plain text instead of a list |
| No labels applied | The author requested labels (enhancement, Frontend, GSSoC26, etc.) in a comment, but they haven't been added to the PR |
✅ What's Good
- Correct Brutalist design constraints applied (
border-4 border-black,shadow-[8px_8px_0_0_rgba(0,0,0,1)],rounded-none) aria-hidden="true"present on skeletons ✓motion-reduce:animate-nonefor reduced-motion preference ✓clearTimeoutcleanup inuseEffect✓- Issue
#110linked viaCloses[UI/UX]: Add loading skeleton placeholders for DashboardPage stats cards to improve perceived performance #110`` ✓ - No backend changes required ✓
📝 Recommended Actions Before Merge
- Fix the
md:grid-cols-2breakpoint - Authorize the Vercel deployment
- Address the 2 open CodeRabbit review comments
- Clean up the PR description (remove duplicates, placeholder text, AI sign-off line, check applicable checkboxes, add screenshots)
- Add the requested labels to the PR
- Request a formal review from a maintainer
|
@grishabhatia I think your PR description is not following the PR template |
|
@kunalverma2512 PR description updated. Please review and merge. |
|
@grishabhatia attach a loom video plus screenshot |
|
@kunalverma2512 Unable to attach video due to local backend setup issues. The skeleton loading functionality has been tested and works as expected. Please refer to the code changes. |
|
@grishabhatia its required that you must run complete project |
|
@grishabhatia join this new medium for communication : https://matrix.to/#/#codelensx:matrix.org |
|
@grishabhatia you can put your issues in this new communication channel https://matrix.to/#/#codelensx:matrix.org |
|
@kunalverma2512 Local signup not working, so can't take live screenshot. But CodeRabbit approved the code. Please review PR #142 and merge if it looks good. |
|
@grishabhatia its not like if coderabbit approves then its ready for merge I would prefer to delete completely your fork and disconnect it and again fork it and run it locally No PRs can be merged if contributor has not run locally I would prefer some issue that currently I want to get handled so you can choose from these |
|
@kunalverma2512 I cannot run the project locally because signup/login is not working. So I cannot work on other issues either. Since I cannot test anything locally, I cannot contribute further. PR #142 code is correct and CodeRabbit has already approved it. If you want me to work on other issues, please first help me set up the project properly so it runs locally. Otherwise, feel free to close PR #142. You decide. |
I already told you in communication channel and coming up with only saying error in sign and login cant be used to help you further make sure you atleast try to write what actual error is coming and have you created .env successfully or not ? I would say to disconnect you fork, delete it and again setup the repository and then again come up |
🔗 Related Issue
Closes #110
📝 Description
Added skeleton loading placeholders to dashboard stats cards (GitHub, Codeforces, Focus Quality) to improve perceived performance and user experience.
Changes Made
SkeletonCard.jsxreusable component with Brutalist designaria-hidden,prefers-reduced-motion)md:grid-cols-2breakpoint🚀 Type of Change
🧪 Testing
✅ Checklist