feat(projects): add ProjectsResults grid component with loading, empt… - #361
feat(projects): add ProjectsResults grid component with loading, empt…#361TheFaith-Code wants to merge 2 commits into
Conversation
…y, error, and pagination states (boundlessfi#350) - Create ProjectsResults in components/discover/projects-results.tsx - Map project data to OpportunityCardView using shared toProjectCard mapper - Render responsive grid (1 / 2 / 3 columns) of OpportunityCards - Handle loading skeleton state with OpportunityCardSkeleton - Handle empty and error states with centered muted messages - Integrate pagination component showing page controls and item range summary - Update ProjectsGrid and ProjectsView to leverage ProjectsResults
|
@TheFaith-Code is attempting to deploy a commit to the Threadflow Team on Vercel. A member of the Team first needs to authorize it. |
|
@TheFaith-Code 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! 🚀 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughProjectsGrid now renders pagination controls only when the project result contains at least one item. ChangesProjects pagination visibility
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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 `@components/discover/projects-results.tsx`:
- Around line 53-57: Prevent projects-results from invoking useProjects when
external state is supplied, since ProjectsView owns that fetch. Update the query
setup around useProjects and the externalData/externalIsPending/externalIsError
selection so externally managed mode uses only the provided state, while
standalone mode continues fetching with params and preserves the existing result
behavior.
- Around line 49-60: The destructuring default in ProjectsResults must not force
externalPageSize to 12, because it prevents the pageSize calculation from using
params.limit. Remove that default while preserving the fallback to 12 in the
existing pageSize assignment, so direct-fetch calls honor params.limit when no
external page size is provided.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 9d82e002-ed8e-49a6-859a-5b81a9374aae
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (3)
components/discover/projects-grid.tsxcomponents/discover/projects-results.tsxcomponents/discover/projects-view.tsx
Benjtalkshow
left a comment
There was a problem hiding this comment.
Thanks, and sorry for the mix-up. The results grid already landed in #358 (components/discover/projects-grid.tsx), so this one duplicates it. I do not want to close your PR, so let us reshape it:
- Remove
pnpm-lock.yamland runnpm install(this repo uses npm). - Revert
projects-results.tsx,projects-grid.tsx, andprojects-view.tsxtomain(the grid already exists there). - Add one small win to the existing
projects-grid.tsx: hide the pagination whenpagination.totalis 0.
That keeps it small and mergeable. Thanks!
closes #350
Summary by CodeRabbit