2
1
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2023-12-13 21:00:40 +01:00
Ghost/apps/portal/src
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
..
components Wired up pagination to recommendations (#18018) 2023-09-08 12:32:06 +02:00
images Updated Tips & Donations success and error states (#17559) 2023-08-01 19:48:02 +01:00
tests Add ability to specify newsletter in a custom sign-up form (#17956) 2023-09-07 16:31:14 +01:00
utils Wired up pagination to recommendations (#18018) 2023-09-08 12:32:06 +02:00
actions.js Fixed direct subscribe links broken 2023-09-07 10:29:43 +02:00
App.css Moved Portal to apps/ 2023-06-16 13:37:58 +02:00
App.js Wired up pagination to recommendations (#18018) 2023-09-08 12:32:06 +02:00
App.test.js Updated ESLint config for React+Typescript packages 2023-07-27 11:40:31 +02:00
AppContext.js Moved Portal to apps/ 2023-06-16 13:37:58 +02:00
data-attributes.js Add ability to specify newsletter in a custom sign-up form (#17956) 2023-09-07 16:31:14 +01:00
index.css Moved Portal to apps/ 2023-06-16 13:37:58 +02:00
index.js Updated ESLint config for React+Typescript packages 2023-07-27 11:40:31 +02:00
logo.svg Moved Portal to apps/ 2023-06-16 13:37:58 +02:00
pages.js Added basic Recommendations modal (#17877) 2023-08-30 15:24:04 +00:00
setupTests.js Moved Portal to apps/ 2023-06-16 13:37:58 +02:00