opendata.cern.ch icon indicating copy to clipboard operation
opendata.cern.ch copied to clipboard

search: unnecessary paginator

Open tiborsimko opened this issue 4 years ago • 1 comments

Current behavioun

When a search returns low numbers of results, such as 3, we are still showing the pagination element:

search-pages

This is not necessary.

Expected behaviour

  • When there are less than N hits, where N is the wanted number of results per page set by the user, the pagination element can stay hidden.

  • On a similar cosmetic tune, 3 result(s) found reads a bit hard. Can we do a quick if to detect singular/plural and display 1 result found, or N results found if N is greater than 1?

tiborsimko avatar Feb 19 '21 16:02 tiborsimko

While investigating, there are two different components Pagination and ResultsPerPage which shows the pagination bar in the bottom and X result per page respectively. The issue requires to access one prop of ResultsPerPage component i.e currentSize just outside the Pagination. Tried with state hook and passing of currentQueryState but no success so far.

ParthS007 avatar Aug 09 '21 07:08 ParthS007

This is a tricky one. I am not convinced that the user experience is improved by removing the pagination filters. I've briefly discussed this with our invenio colleagues, and they don't like the idea of removing it.

In my opinion, this one needs more discussion before proceeding to implement anything

psaiz avatar Dec 08 '23 09:12 psaiz

For the time being, let's stay with the default behaviour from indico.

psaiz avatar Dec 12 '23 10:12 psaiz