mirror of
https://github.com/storytold/artcraft.git
synced 2026-11-04 17:38:10 +00:00
Pagination of our frontend was implemented "naively" due to previous time constraints; now, it's "correct" to reflect server responses exactly. More precisely: - the Pagination component (frontend) is updated to understand that there are more fetch-able pages (backend) and it shows a "More ..." button when the user have reached the last page on the frontend. - this sub-feature of the Pagination module, the "More ..." button, is implemented on the character sub-tab only (for now) - the character sub-tab looks at the set of characters that it is displaying (ie featured vs mine), and pass the correct fetch-more-pages function to the Pagination component - the underlying hooks to managed fetch feature objects and user objects, their api invoker utilities, and the api classes are all updated to deal with pagination properly small issue: - pagination of featured items uses "infinite pagination" to prevent competitors from knowing how much data we have in our system, which means, there will always be a "cursor to the next page", and we would only know we have reached the end when we request a next page with a cursor but a response of no results returns. so, for featured items, when the user reached the last page, the "More ..." button will show up once, if you clicked it and it goes away, there are no more items in the server. This extra "More ..." button is the current "correct" behaviour. --------- Co-authored-by: wil <wil@storyteller.ai>