Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pagination #483

Open
mohsenkhosroanjam opened this issue Jan 4, 2025 · 5 comments
Open

Add pagination #483

mohsenkhosroanjam opened this issue Jan 4, 2025 · 5 comments
Labels
enhancement 🥇 New feature or request

Comments

@mohsenkhosroanjam
Copy link

The feature

As a user, I would be happy if I could go to the next page to continue seeing the other agencies instead of scrolling the page.
For example, see the below URL. There are many agencies on the list and scrolling the page is annoying.
https://www.govdirectory.org/netherlands/
Adding pagination could satisfy the user about seeing the agencies on the list page by page.

Why?

1- Pagination is more user-friendly when you want to show the user many lines of data.
2- The user can see a specific number of agencies at a glance because they do not have to scroll the page.
3- When you have pagination, the user can remember from which page to which page they have seen the agencies in the list.
4- It improves user experience and backend performance.

Examples and inspiration

https://wpdatatables.com/documentation/table-examples/travel-agency-offers-wordpress-table/
https://wpdatatables.com/documentation/table-examples/catalog-of-books/

@mohsenkhosroanjam mohsenkhosroanjam added the enhancement 🥇 New feature or request label Jan 4, 2025
@RVA2869
Copy link
Collaborator

RVA2869 commented Jan 4, 2025

Related issue: #421

@Ainali
Copy link
Member

Ainali commented Jan 5, 2025

Thanks for a well-written issue @mohsenkhosroanjam. Personally, I like scrolling in lists, so if we should change to pagination I would appreciate that the claims that it improves the UX are supported by authoritative sources so that we can learn (and later defend the change).

Regarding 3. that will only be true if the lists are static so that an organization cannot change page. But that is not true for public organizations (for example, we saw a bunch of changes on 1 January).

For 4, I am curious about what the improvement in the backend would be. It is not a bottleneck right now as far as I know, but perhaps you could enlighten me on that.

@mohsenkhosroanjam
Copy link
Author

@Ainali Thanks a bunch for providing your great points.
for 1, I just found some useful websites on pagination and UX:

Right now I feel, user behaviors and needs should be considered for deciding between long scroll and pagination.

For 4, I meant that pagination reduces the content loaded on a single page. As a result, it reduces the volume of content retrieved from databases or similar. But this might not be challenging as you mentioned it is not bottleneck right now.

Share your thoughts and let me know if you want me to do a more deeper research on pagination.

@Ainali
Copy link
Member

Ainali commented Jan 5, 2025

Thanks for sharing the resources, I'll take a look at them.

Still, regarding 4, we are not retrieving anything from databases or similar on the country pages. They are static pre-rendered HTML files. So in essence, it would be more back end work to split them.

@mohsenkhosroanjam
Copy link
Author

@Ainali You are right. For 4, pagination will not help backend from performance view point in this case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 🥇 New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants