tvolk131 / fdr-finder

0 stars 0 forks source link

Paginate search results #15

Closed tvolk131 closed 3 years ago

tvolk131 commented 3 years ago

Right now, if a very common tag/phrase is used to search, this can result in hundreds of results being rendered at once, causing the browser to run very slowly. Let's paginate the results so the user can sift through them without causing browser slowdowns. A few things should be added for this:

  1. If there are more items than could fit on one page, display tab-changing buttons so the user can go from page to page.
  2. Regardless of whether there is more than one page, display the total number of results for the search. If there is more than one page, display something like "51-100 of 235".
  3. Add a drop-down menu to select how results are sorted. Include ascending/descending options to sort by date or alphabetically.
  4. Add ability to do a client-side filter on results by title text
tvolk131 commented 3 years ago

The first two points were addressed in this commit: https://github.com/tvolk131/fdr-finder/commit/2fb22f7ba2787fa1e684237e0e7d72515f96d481

tvolk131 commented 3 years ago

The third point was addressed here: https://github.com/tvolk131/fdr-finder/commit/41b40447e1f962bf869dee0509b1000ffc624ed5

After thinking about it more, the fourth point would probably not be all that useful so I've decided to skip it