dspace-angular
dspace-angular copied to clipboard
The pagination component lists explicitly all the pages
The pagination component lists explicitly all the pages this mean that you can easily get hundreds pages making the component not usable. The current implementation should list only the previous, next and first, last page (ie when you are looking at the 4th page you should have: << < 4 > >>) or eventually using elapsing 1 .... 3 4 5 .... last
I prefer the first form as it is not possible for angular to know the REST url for the 2nd page looking only to the information provided in the response of the call for the 4h page. To do that the angular client needs to hardcode some pagination logic
Actually the maximum number of pages to display for the pagination component is not setted, but we could set a default value. However both the implementation you've proposed can be obtain by changing the pagination component options. I think It's only to decide which one should be the better solution.
reviewed today: the current behavior has been improved as only a limited number of pages are listed. The current implementation show an "architectural" issue as angular should be NOT able to create a link to a page other than for the current, previous, next, first & last using the HAL links. This mean that the angular component has hardcoded in someway the URL structure used for the pagination. That said, in terms of UX it is for sure better to give a "bit more range" around the current page than just the ones visible via HAL links. If we accept the "architectural issue" the current implementation could be improved to use a sliding range of page so that when you are viewing the page 10 the following will be shown (current page is in the middle of the range) 1 ... 5 6 7 8 9 10 11 12 13 14 ... last