Skip to content

feat(projects): add ProjectsResults grid component with loading, empt… - #361

Open
TheFaith-Code wants to merge 2 commits into
boundlessfi:mainfrom
TheFaith-Code:feat/350-projects-grid-results
Open

feat(projects): add ProjectsResults grid component with loading, empt…#361
TheFaith-Code wants to merge 2 commits into
boundlessfi:mainfrom
TheFaith-Code:feat/350-projects-grid-results

Conversation

@TheFaith-Code

@TheFaith-Code TheFaith-Code commented Jul 29, 2026

Copy link
Copy Markdown
  • 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

closes #350

Summary by CodeRabbit

  • Bug Fixes
    • Pagination is now hidden when there are no project results, providing a cleaner empty-state experience.

…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
@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

@TheFaith-Code is attempting to deploy a commit to the Threadflow Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 29, 2026

Copy link
Copy Markdown

@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! 🚀

Learn more about application limits

@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 3b32484c-1b67-4c0a-95e4-50c65427f564

📥 Commits

Reviewing files that changed from the base of the PR and between 0257a1a and 8752d65.

📒 Files selected for processing (1)
  • components/discover/projects-grid.tsx

📝 Walkthrough

Walkthrough

ProjectsGrid now renders pagination controls only when the project result contains at least one item.

Changes

Projects pagination visibility

Layer / File(s) Summary
Conditional pagination rendering
components/discover/projects-grid.tsx
Pagination renders only when data.pagination.total > 0. Empty results no longer show pagination controls.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Suggested reviewers: michaelkingsdev

Poem

A rabbit hops through rows of green,
No empty pages now are seen.
When projects bloom, controls appear,
When none remain, the path is clear.
Soft paws approve this tidy scene.

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (2 warnings)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title claims a new results component with loading and empty states, but the summary shows only a pagination visibility change. Rename the pull request to describe the actual change, such as "fix(projects): hide pagination when no results".
Linked Issues check ⚠️ Warning The summary shows only conditional pagination rendering and does not evidence the required grid, states, mapper, result count, or pagination implementation for [#350]. Include the required results-grid implementation and verify the mapper, states, result count, pagination, lint, and build requirements.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Out of Scope Changes check ✅ Passed The pagination visibility change is within the linked issue's results-grid and pagination scope [#350].
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 3e28446 and 0257a1a.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (3)
  • components/discover/projects-grid.tsx
  • components/discover/projects-results.tsx
  • components/discover/projects-view.tsx

Comment thread components/discover/projects-results.tsx Outdated
Comment thread components/discover/projects-results.tsx Outdated

@Benjtalkshow Benjtalkshow left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. Remove pnpm-lock.yaml and run npm install (this repo uses npm).
  2. Revert projects-results.tsx, projects-grid.tsx, and projects-view.tsx to main (the grid already exists there).
  3. Add one small win to the existing projects-grid.tsx: hide the pagination when pagination.total is 0.

That keeps it small and mergeable. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[projects-page][Grid] Results grid + pagination + states

2 participants