Skip to content

Add invite code pagination#830

Open
mohiuddinshahrukh wants to merge 2 commits into
devfrom
fix-46-invite-code-pagination
Open

Add invite code pagination#830
mohiuddinshahrukh wants to merge 2 commits into
devfrom
fix-46-invite-code-pagination

Conversation

@mohiuddinshahrukh
Copy link
Copy Markdown
Collaborator

Description

The Invite Codes table could hang or crash when a study has a large number of invite codes because the Designer loaded the full invite list at once.

Fix

This adds server-side pagination for invite codes in the Designer Recruit page. Invite codes are now fetched from Supabase in batches of 50 instead of loading the entire invite array into memory.

The table also shows page navigation controls with previous/next buttons and the current page number.

Acceptance Criteria

  • Invite codes are fetched in batches instead of loading the full list
  • Batch size is 50 invite codes per page
  • Previous / Next controls are available
  • Page number is shown
  • New invite codes appear immediately after saving

Testing

  • Ran flutter analyze in designer_v2
  • Tested the Recruit page locally
  • Created a new invite code and confirmed it appeared immediately without refreshing
  • Checked that pagination controls stayed on Page 1 for a small invite list

Example images, where the pagination size was kept to 10 only for showing how it looks.
image

image

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 6, 2026

Visit the preview URL for this PR (updated for commit e625042):

(expires Wed, 13 May 2026 12:58:27 GMT)

🔥 via Firebase Hosting GitHub Action 🌎

Sign: 2149dad49ed83535217e50d5c18c0c8c90da629b

@ibrahimozkn
Copy link
Copy Markdown
Contributor

Are we following the material guidelines on pagination widgets? Also for design consistency of the designer could you please check if we ever used fully rounded circular buttons? Or maybe rather than pagination we could switch to infinite scrolling? What do you think @johannesvedder

@mohiuddinshahrukh
Copy link
Copy Markdown
Collaborator Author

Thank you for for reviewing @ibrahimozkn

I'll adjust the UI accordingly.
Regarding the decision on infinte scroll or pagination: Depends what we are trying to achieve

Pagination:
For finding items quickly.
Seeing how many items might exist.
Not really oriented to capture attention and keep user engaged.
more functionality oriented.

Infinite scroll:
Easier on the eyes.
Not for quick finding and searching.
Not functionality-first oriented.
Oriented to caputre user attention and keep them engaged.

My two cents: Pagination is better here.

@johannesvedder

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants