feat: add shimmer skeleton loaders for dashboard (closes #48)#72
feat: add shimmer skeleton loaders for dashboard (closes #48)#72arcgod-design wants to merge 2 commits into
Conversation
- New Skeleton.tsx: Reusable skeleton components (FarmCard, CropCard, Weather, MarketPrice, Map) - New Skeleton.module.css: Shimmer animation with prefers-reduced-motion support - Dashboard.tsx: Replace spinners with FarmCardSkeleton, CropCardSkeleton, MapSkeleton - WeatherBlock.tsx: Replace spinner with WeatherSkeleton - MarketPriceWidget.tsx: Add loading state with MarketPriceSkeleton - Dashboard.module.css: Add cropListSkeleton class
|
Someone is attempting to deploy a commit to the karan3431's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
🎉 Thanks for your contribution, @arcgod-design! Please make sure CI passes and the checklist in the PR template is complete. A maintainer will review this soon. — The AgroNavis team |
|
Warning Review limit reached
More reviews will be available in 10 minutes and 23 seconds. Learn how PR review limits work. Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable the review add-on in the billing tab to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file). ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based credits. 🚦 How do rate limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan refill rate. For paid Pro and Pro+ PR reviews, CodeRabbit uses rolling per-developer review limits. Reviews become available again as older review attempts age out of the rolling limit window. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughIntroduces a new ChangesSkeleton Loading System
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 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: 4
🤖 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/MarketPriceWidget.tsx`:
- Around line 12-21: The useEffect hook in the MarketPriceWidget component
unconditionally sets a 800ms timer delay before transitioning from the skeleton
state, adding unnecessary latency regardless of when actual data is available.
Remove the setTimeout that creates this artificial delay and instead tie the
loading state directly to actual data fetching operations. The skeleton should
only display while data is genuinely being loaded, not for a fixed duration.
In `@frontend/src/styles/Dashboard.module.css`:
- Line 1072: The CSS selector `.cropListSkeleton` in Dashboard.module.css
violates the stylelint selector-class-pattern rule which requires kebab-case
naming. Rename the class selector `.cropListSkeleton` to `.crop-list-skeleton`
in the CSS file, and then update all corresponding references to this class in
the Dashboard.tsx component (or any other component files) that use this class
name to use the new kebab-case format to maintain consistency with the enforced
style rules.
In `@frontend/src/styles/Skeleton.module.css`:
- Around line 32-39: The CSS class selectors in Skeleton.module.css are using
camelCase naming (such as `.farmCardSkeleton` and `.farmCardImageSkeleton`)
which violates the configured `selector-class-pattern` stylelint rule that
requires kebab-case. Convert all class selectors in this file from camelCase to
kebab-case format (for example, change `.farmCardSkeleton` to
`.farm-card-skeleton`, `.farmCardImageSkeleton` to `.farm-card-image-skeleton`,
and apply the same pattern to all other selectors listed in the comment). Then
update all corresponding references in Skeleton.tsx where these styles are
accessed through the imported `styles` object to use the new kebab-case names
instead of camelCase.
- Around line 10-13: The Skeleton.module.css file contains stylelint violations
that need to be fixed. Replace the longhand inset property declarations (top,
left, right, bottom all set to 0) with the shorthand inset property (inset: 0).
Additionally, review all color function declarations and alpha value notations
throughout the file (including the locations at lines 15-21, 36, 49-52, 54-60,
90, and 102) to ensure they comply with the project's stylelint rules for
color-function format and alpha-value-notation. Convert rgba() functions and
decimal alpha values to the format expected by your stylelint configuration
(likely modern CSS color syntax with space-separated values and percentage-based
alpha).
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 157d2bba-9a41-47d4-a899-515a1ac879bc
📒 Files selected for processing (6)
frontend/src/components/Dashboard.tsxfrontend/src/components/MarketPriceWidget.tsxfrontend/src/components/Skeleton.tsxfrontend/src/components/WeatherBlock.tsxfrontend/src/styles/Dashboard.module.cssfrontend/src/styles/Skeleton.module.css
…lay, modern CSS syntax
Summary
Replaces standard spinners and 'Loading...' text with modern shimmer skeleton loaders for farm cards, weather widget, market prices, and map — making the UI feel faster and more premium.
Changes
New Files
Modified Files
Before / After
Features
Closes #48
Summary by CodeRabbit