Skip to content

feat: Implement pagination logic on the dashboard (#163) - #164

Open
Dev1822 wants to merge 1 commit into
sharmavaibhav31:mainfrom
Dev1822:fix-pagination
Open

feat: Implement pagination logic on the dashboard (#163)#164
Dev1822 wants to merge 1 commit into
sharmavaibhav31:mainfrom
Dev1822:fix-pagination

Conversation

@Dev1822

@Dev1822 Dev1822 commented Jul 18, 2026

Copy link
Copy Markdown

Description

This PR resolves #163 by implementing proper Next/Previous pagination in the frontend dashboard.

Previously, the dashboard.html used a "Load More" strategy that continuously appended newly fetched jobs and contacts to the DOM. Over time, rendering thousands of elements simultaneously caused severe browser lag and performance issues.

Changes Made

  • Refactored loadJobs & loadContacts: Replaced the "Load More" appending behavior with strict page replacement (state.jobs and state.contacts now only store the items for the current page).
  • Added Pagination Controls: Introduced "Previous" and "Next" buttons at the bottom of the Jobs grid and the Contacts table.
  • Added Pagination Counters: Added a dynamic X-Y of Total indicator to clearly show the user their current offset context within the entire dataset.
  • Backend Verification: Leveraged the existing limit and offset query parameters powered by asyncpg in the API gateway.

Testing Instructions

  1. Load the dashboard and verify that only 50 jobs/contacts are rendered on the initial load.
  2. Click the "Next" button and verify that the view cleanly replaces the previous items with the new page.
  3. Verify that the "X-Y of Total" counter accurately reflects your current position.
  4. Verify that "Previous" is disabled on the first page and "Next" is disabled on the final page.

@vercel

vercel Bot commented Jul 18, 2026

Copy link
Copy Markdown

@Dev1822 is attempting to deploy a commit to the Vaibhav Sharma's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Dev1822

Dev1822 commented Jul 24, 2026

Copy link
Copy Markdown
Author

@sharmavaibhav31 , kindly suggest me any changes if needed for this pr. If not kindly merge this pr with gssoc and elusoc labels.

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.

Frontend / UX: Lack of Pagination on the Dashboard

1 participant