Skip to content

feat(#246): cursor-based Pagination component and usePagination hook#429

Merged
devEunicee merged 1 commit into
devEunicee:mainfrom
unixfundz:feat/246-pagination-ui
Jun 27, 2026
Merged

feat(#246): cursor-based Pagination component and usePagination hook#429
devEunicee merged 1 commit into
devEunicee:mainfrom
unixfundz:feat/246-pagination-ui

Conversation

@unixfundz

Copy link
Copy Markdown
Contributor

Summary

Closes #246

Implements a reusable cursor-based Pagination component and a companion usePagination hook that manages the cursor stack.

Component: frontend/src/components/Pagination/

Features

  • Cursor-based navigation — works directly with next_cursor from the Soroban contract's PaymentPage response; no offset arithmetic
  • usePagination hook — maintains a stack of previous cursors, page number, and exposes goNext / goPrev / goFirst / reset actions
  • First / Prev / Next buttons with aria-label, aria-disabled, and disabled attributes
  • <nav aria-label="Pagination"> landmark for screen reader navigation
  • aria-live="polite" on the page indicator — screen readers announce page changes automatically
  • Focus-visible CSS outlines on all interactive elements
  • Mobile-optimised layout (compact button padding at ≤ 480 px)

Acceptance Criteria

  • Previous/Next navigation buttons
  • Current page indicator
  • Cursor-based navigation (not offset)
  • Keyboard accessibility for pagination controls
  • Mobile-optimized layout

…tion hook

- Pagination component: Prev/Next/First buttons with aria-label, aria-disabled,
  and disabled attributes for full keyboard accessibility
- aria-live='polite' on the page number indicator for screen reader announcements
- Wrapped in <nav aria-label='Pagination'> for landmark navigation
- Buttons have focus-visible outlines; disabled state styled with opacity
- usePagination hook: manages cursor stack, page number, goNext/goPrev/goFirst/reset
- Mobile-responsive CSS (compact layout at <480px)
- Tests cover all navigation actions, disabled states, and hook state transitions

Closes devEunicee#246
@drips-wave

drips-wave Bot commented Jun 26, 2026

Copy link
Copy Markdown

@unixfundz 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

@devEunicee devEunicee merged commit 5ed1593 into devEunicee:main Jun 27, 2026
4 of 9 checks passed
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.

#246 - Implement Page Pagination UI

2 participants