Grants list pagination largely working, global filter not hooked up
Description
Adding support for server-side pagination, where previously we grabbed all records and did client side paging. For now, I've added some URL query params:
page [integer] : current page to show
pageSize [integer] : number of items per page
filter [string] : global search string to narrow items shown on the page
Currently only over grant.projectName
These query params will be automatically added to the URL and updated as the user uses the pagination controls, but the user can also manually update these parameters in their address bar, if desired
TODO
[x] Connect global search/filter on grants list
Should investigate using an index for this in a separate PR
[x] Add pagination on submissions page
[x] Add pagination to the grant details page
~[ ] Add pagination to the grant selector in the submission workflow~
Look into in a separate ticket, since the UI is different here
~[ ] Debounce requests as needed for the above implementations~
~Need to see about separating debounce of pagination params vs filter (out-of-the-box they are handled with the same mechanism)~
[ ] Try to refactor queries to reduce code duplication?
[x] Need to handle global search strings better (e.g. spaces currently break the query)
Questions
How does the UI respond to invalid or out-of-bounds query params? E.g. setting page=20 when there's only 1 page of results from the backend?
What properties do we search over for the given pagination situations?
Related: We should probably setup indexes in the backend to support these filters/searches
Testing
Manual
You can check any of the above sections. Using pagination controls will update URL query parameters on the page.
Since we don't have a huge amount of test data, you can manually set page size to something small, like pageSize=2 to force the results to render across multiple pages
(Will) Close https://github.com/eclipse-pass/main/issues/547
Changes
Description
Adding support for server-side pagination, where previously we grabbed all records and did client side paging. For now, I've added some URL query params:
page
[integer] : current page to showpageSize
[integer] : number of items per pagefilter
[string] : global search string to narrow items shown on the pagegrant.projectName
These query params will be automatically added to the URL and updated as the user uses the pagination controls, but the user can also manually update these parameters in their address bar, if desired
TODO
_loadDataOnce
which handles debouncing via the Ember runloop. Default is 500msQuestions
page=20
when there's only 1 page of results from the backend?Testing
Manual
You can check any of the above sections. Using pagination controls will update URL query parameters on the page. Since we don't have a huge amount of test data, you can manually set page size to something small, like
pageSize=2
to force the results to render across multiple pages