mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
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. |
||
---|---|---|
.. | ||
.storybook | ||
public | ||
src | ||
test | ||
.eslintrc.cjs | ||
.yarnrc | ||
index.html | ||
package.json | ||
playwright.config.ts | ||
postcss.config.cjs | ||
README.md | ||
tailwind.config.cjs | ||
tsconfig.json | ||
tsconfig.node.json | ||
vite.config.ts |
Admin X Settings
Experimental re-write of Ghost Admin Settings in React
Development
Pre-requisites
- Run
yarn
in Ghost monorepo root - Run
yarn
in this directory
Running the development version
Run yarn dev
to start the development server to test/develop the settings standalone. This will generate a demo site from the index.html
file which renders the app and makes it available on http://localhost:5173
Running inside Admin
Run yarn dev
from the top-level repo with --adminX
Develop
This is a monorepo package.
Follow the instructions for the top-level repo.
git clone
this repo &cd
into it as usual- Run
yarn
to install top-level dependencies.
Test
yarn lint
run just eslintyarn test
run lint and tests