Make the "pager" usable when browsing search results
Shared by a shy user through a private email:
BTW, I just ran into the pager on Vulnerable Code, this could be improved:
https://public.vulnerablecode.io/packages/search?page=2&search=sudo
If you want to go to page 45 of results, you have to visit each and every single page before it by pressing next 44 times...
We should have better widgets for next/previous pagination... and also:
- [ ] #1618
This is related to:
- https://github.com/aboutcode-org/vulnerablecode/issues/1616
In my approach for solving this issue
the following improvements to our pagination functionality are recommended:
-
Direct Page Navigation: Implement an input field allowing users to specify and navigate directly to a desired page number.
-
Enhanced Page Number Display: Implement a more comprehensive page number display system, showing a wider range of page numbers (e.g., 1, 2, 3, ... 10, 11, 12, ... 98, 99, 100) to facilitate easier navigation across the result set.
-
Alternative Content Loading Methods: Consider implementing either infinite scrolling or a "Load More" button as an alternative to traditional pagination.
-
Adjustable Items Per Page: Provide users with the option to increase the number of items displayed per page, thereby reducing the total number of pages.
-
Keyboard Navigation: Implement keyboard shortcuts to enable efficient navigation through search results using keyboard inputs.
Please Do let me know if you have some other ideas...
and here is some private feedback I received:
I think 2 is the bare minimum, and 4 is obvious.
All other options cater to specific usage patterns, but depend on scripting.
One more option (also requires scripting) is to filter as you type (showing only the subset of results containing the string you've typed). So that if I type "main" or "armhf" I only see those.
Based on this starting with 2. using a standard Bulma would be best IMHO. And we can expand later
Ok I'll Start scripting with the 2 and 4.