fix(#674): paginate pools list with Load More + search/filter - #701
Open
oluwaseyi1996-netizen wants to merge 1 commit into
Open
fix(#674): paginate pools list with Load More + search/filter#701oluwaseyi1996-netizen wants to merge 1 commit into
oluwaseyi1996-netizen wants to merge 1 commit into
Conversation
- Add POOLS_PER_PAGE=20 client-side pagination to PoolIntegration - Add search input + status filter pills (All/Active/Settled) that paginate the filtered list (issue chunks-labz#674 acceptance criteria) - Add "Load More" button that is disabled once every filtered pool is visible, with role="status" live region announcing the count - Refresh now resets pagination to page 1 of fresh data - Use useId() for stable label/input association - Add 7 tests covering initial page size, Load More click, disable at exhaustion, no-button on small lists, status + text-search filter interaction, and refresh resetting to page 1
|
@oluwaseyi1996-netizen 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! 🚀 |
Contributor
|
This pull request has been inactive for 21 days. It will be closed in 7 days unless there is further activity. Please rebase, address review comments, or leave a note if you need more time. |
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.
Closes #674
Summary
Adds client-side Load More pagination to the pools list on
PoolIntegration, plus a lightweight search input and status pill filter so the pagination is demonstrably compatible with search and filter features as required by the issue.Acceptance criteria from #674
POOLS_PER_PAGE = 20Changes
web/app/components/PoolIntegration.tsxPOOLS_PER_PAGE = 20constantuseId,sr-onlylabel,role="group"witharia-label<button type="button">Load More</button>gated onfilteredPools.length > POOLS_PER_PAGEso we do not render a noisy disabled button on small listsaria-labelwith dynamic remaining count and arole="status" aria-live="polite"line announcing Showing X of Y poolsweb/tests/components/PoolIntegration.test.tsxSettledtext edge case (status pill + pool-card badge) is handled viagetAllByTextTesting
node_modules/.bin/vitest run tests/components/PoolIntegration.test.tsx→ 23/23 passnode_modules/.bin/eslint app/components/PoolIntegration.tsx tests/components/PoolIntegration.test.tsx→ cleannode_modules/.bin/tsc --noEmit app/components/PoolIntegration.tsx→ cleantests/lib/formatting.test.ts,tests/lib/analytics.test.ts,tests/lib/disputes/feature-flag.test.tsx,tests/integration/navbar-auth.integration.test.tsx,tests/routes/smoke.test.tsxwere confirmed pre-existing onmainviagit stash+vitest run(these are unrelated to this change)Risks and follow-ups
enhanced-stacks-api.fetchAllPoolswhich already acceptspage/pageSize.Closes #674