Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR updates the post creation and explore/feed UI to resolve “post skeleton” UX issues and improve group selection behavior when submitting posts.
Changes:
- Replace blocking pagination “loading overlay” with a subtle non-blocking loading indicator.
- Fetch real groups via
GROUPS_QUERYfor post submission (removing mock group data) and refresh relevant Apollo cache on successful submit. - Redesign post cards/skeletons and explore filters/layout (including updated date range quick filters and spacing).
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| quotevote-frontend/src/lib/validation/submitPostSchema.ts | Improves group validation messaging and refines group/title checks. |
| quotevote-frontend/src/lib/mock-data.ts | Removes unused mock groups list (keeps mock posts). |
| quotevote-frontend/src/components/common/PaginatedList.tsx | Replaces blocking loading overlay with a thin top loading bar when refetching with existing data. |
| quotevote-frontend/src/components/SubmitPost/SubmitPostForm.tsx | Refactors group creation logic, refetches groups, evicts posts cache, and redirects after submit. |
| quotevote-frontend/src/components/SubmitPost/SubmitPost.tsx | Fetches groups from API and filters them for selection instead of using mock groups. |
| quotevote-frontend/src/components/SearchContainer/DateRangeFilter.tsx | Updates quick ranges, trigger UI, and adds min/max constraints between date inputs. |
| quotevote-frontend/src/components/Post/PostsList.tsx | Adjusts list spacing and passes citationUrl through to PostCard. |
| quotevote-frontend/src/components/Post/PostSkeleton.tsx | Redesigns skeleton to match the new card layout (renders 3 skeleton cards). |
| quotevote-frontend/src/components/Post/PostCard.tsx | Major UI/layout changes for post cards (interaction summary, new header/footer, formatted date). |
| quotevote-frontend/src/components/Post/PaginatedPostsList.tsx | Passes citationUrl, updates loading rendering to rely on new skeleton behavior, adjusts spacing. |
| quotevote-frontend/src/app/dashboard/explore/ExploreContent.tsx | Restructures explore UI (new sticky search + icon filters, selected-user card, result count). |
| quotevote-frontend/src/tests/components/PaginatedList.test.tsx | Updates loading-with-data test to reflect removal of blocking overlay text. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| } | ||
| }} | ||
| tabIndex={0} | ||
| role="article" |
There was a problem hiding this comment.
This element is keyboard-focusable (tabIndex={0}) and triggers navigation on Enter/Space, but it still declares role="article". That role doesn't convey “interactive” to assistive tech; consider using a semantic link/button (or role="link"/role="button" with appropriate aria attributes) to match the behavior.
| role="article" | |
| role="link" |
| COMMENTED: '#fdd835', | ||
| UPVOTED: '#52b274', | ||
| DOWNVOTED: '#ff6060', | ||
| LIKED: '#56b3ff', |
There was a problem hiding this comment.
ACTIVITY_BORDER includes both QOUTED and QUOTED. Since QOUTED looks like a typo, consider removing it or adding a clarifying comment/normalization if the backend can actually emit the misspelled value.
| LIKED: '#56b3ff', | |
| LIKED: '#56b3ff', | |
| // Keep both keys for compatibility because the backend may emit the legacy misspelled value. |
| className="bg-card rounded-[7px] border border-border/60 overflow-hidden animate-pulse" | ||
| style={{ borderBottom: '10px solid #e2e8f0' }} |
There was a problem hiding this comment.
PostSkeleton hard-codes a light-mode border color (#e2e8f0) via inline styles. This is not theme-aware (e.g., dark mode) and bypasses Tailwind/design tokens; prefer a class-based border color using existing CSS variables/utilities.
| className="bg-card rounded-[7px] border border-border/60 overflow-hidden animate-pulse" | |
| style={{ borderBottom: '10px solid #e2e8f0' }} | |
| className="bg-card rounded-[7px] border border-border/60 border-b-[10px] border-b-border/60 overflow-hidden animate-pulse" |
Fix: post skeleton issues are resolved.
CI: test, lint and type-check all green