0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-27 22:49:56 -05:00
ghost/apps/admin-x-settings/src/utils
Simon Backx 669be72673
Wired up pagination to recommendations (#18018)
fixes https://github.com/TryGhost/Product/issues/3822
fixes https://github.com/TryGhost/Product/issues/3838

This PR became a bit big because it affected multiple parts of Ghost
that needed to be updated to prevent breaking anything.

### Backend
- Added pagination to the recommendations API's
- Updated BookshelfRepository template implementation to handle
pagination
- Allow to pass `page` and `limit` options to Models `findAll`, to allow
fetching a page without also fetching the count/metadata (=> in the
repository pattern we prefer to fetch the count explicitly if we need
pagination metadata)
- Added E2E tests for public recommendations API (content API)
- Extended E2E tests of admin recommendations API

### Portal
- Corrected recommendations always loaded in Portal. Instead they are
now only fetched when the recommendations page is opened.

### Admin-X
- Added `usePagination` hook: internally used in the new
`usePaginatedQuery` hook. This automatically adds working pagination to
a query that can be used to display in a table by passing the
`pagination` and `isLoading` results to the `<Table>`
- Added placeholder `<LoadingIndicator>` component
- Added a loading indicator to `<Table>`. This remembers the previous
height of the table, to avoid layout jumps when going to the next page.
2023-09-08 12:32:06 +02:00
..
apiRequests.ts Wired up pagination to recommendations (#18018) 2023-09-08 12:32:06 +02:00
currency.ts Wired up AdminX Tips & Donations (#17846) 2023-08-30 09:08:31 +00:00
debounce.ts Added debounce to design modal on Admin X (#17793) 2023-08-23 13:59:43 +02:00
escapeHtml.ts Wired up embeddable signup form to Admin X (#18010) 2023-09-08 09:21:05 +00:00
generateEmbedCode.ts Wired up embeddable signup form to Admin X (#18010) 2023-09-08 09:21:05 +00:00
helpers.ts Wired up AdminX Labs settings (#17844) 2023-08-28 16:24:03 +01:00
modals.tsx Wired up basic settings in AdminX portal settings (#17191) 2023-07-04 15:47:55 +12:00
search.ts Updated AdminX search to use centralised configuration (#17106) 2023-06-27 08:09:12 +12:00