feat(design): loading skeletons and async state patterns#135
Open
johnsmccain wants to merge 1 commit intoPredictify-org:mainfrom
Open
feat(design): loading skeletons and async state patterns#135johnsmccain wants to merge 1 commit intoPredictify-org:mainfrom
johnsmccain wants to merge 1 commit intoPredictify-org:mainfrom
Conversation
- Add MarketCardSkeleton / MarketsListSkeleton for markets widget - Add EventDetailSkeleton for event detail page - EventsTableSkeleton already existed; wired via loading.tsx - Add AsyncButton: inline spinner + loading text, no layout shift - Add ErrorBanner: destructive alert with optional Retry action - Wire EventDetailSkeleton + ErrorBanner into event-page/page.tsx - Wire ErrorBanner + retry into EventsSection (events-store error state) - Add /loading-patterns demo page covering all 3 core surfaces
|
@johnsmccain is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@johnsmccain 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.
feat(design): loading skeletons and async state patterns
📝 Description
Implements loading skeletons for the three core surfaces (markets list, event detail, events table), inline async loading states for buttons/forms, and error + retry banners for network failures. All patterns are layout-shift-free.
🎯 Type of Change
🔗 Related Issues
Closes #120
📋 Changes Made
New Files
components/skeletons/markets-skeleton.tsxMarketCardSkeleton+MarketsListSkeleton— mirrors market card layout exactlycomponents/skeletons/event-detail-skeleton.tsxEventDetailSkeleton— covers badges, title, stat grid, options, formcomponents/ui/async-button.tsxAsyncButton— inline spinner + loading text, auto-disablescomponents/ui/error-banner.tsxErrorBanner— destructive alert with optional Retry actionapp/(dashboard)/loading-patterns/page.tsxModified Files
app/(dashboard)/events/event-page/page.tsxisLoading/fetchErrorstates; renders skeleton on load, error banner on failure; replaced manualLoader2button withAsyncButtoncomponents/events/events-section.tsxerrorfrom events store; rendersErrorBannerwithloadEventsas retry callbackKey Design Decisions
h-*/w-*sizes matching real content — no layout shift on reveal.AsyncButtonwraps the existingButtonprimitive; zero API surface change for callers.ErrorBanneris a thin wrapper over the existingAlertcomponent — consistent with the design system.events-storeerror+loadEvents— no new state needed.🧪 Testing
pnpm tsc --noEmit— zero new errors)loading.tsx✅ Pre-submission Checklist
AsyncButtonis backwards-compatible withButtonprops🔧 Additional Notes
activity-timeline-demo/page.tsx,typography-example.tsx) are unrelated to this PR./loading-patternsdemo page can be removed before merging tomainif not needed in production.