From 14b06510207a87fbfcb7a1e978397fcdc7b334fe Mon Sep 17 00:00:00 2001 From: benjdlambert Date: Mon, 14 Jul 2025 16:16:48 +0200 Subject: [PATCH 1/3] chore: added the ability to configure the pagination settings Signed-off-by: benjdlambert --- plugins/catalog/src/alpha/pages.tsx | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/plugins/catalog/src/alpha/pages.tsx b/plugins/catalog/src/alpha/pages.tsx index c1f5b55341..81ec0c5cb9 100644 --- a/plugins/catalog/src/alpha/pages.tsx +++ b/plugins/catalog/src/alpha/pages.tsx @@ -41,7 +41,22 @@ export const catalogPage = PageBlueprint.makeWithOverrides({ inputs: { filters: createExtensionInput([coreExtensionData.reactElement]), }, - factory(originalFactory, { inputs }) { + config: { + schema: { + pagination: z => + z + .union([ + z.boolean(), + z.object({ + mode: z.enum(['cursor', 'offset']), + limit: z.number().optional(), + offset: z.number().optional(), + }), + ]) + .default(true), + }, + }, + factory(originalFactory, { inputs, config }) { return originalFactory({ defaultPath: '/catalog', routeRef: convertLegacyRouteRef(rootRouteRef), @@ -50,7 +65,12 @@ export const catalogPage = PageBlueprint.makeWithOverrides({ const filters = inputs.filters.map(filter => filter.get(coreExtensionData.reactElement), ); - return compatWrapper({filters}} />); + return compatWrapper( + {filters}} + pagination={config.pagination} + />, + ); }, }); }, From 6991dab36f0f41312be7dd213f92412e4cb60c97 Mon Sep 17 00:00:00 2001 From: benjdlambert Date: Mon, 14 Jul 2025 16:17:30 +0200 Subject: [PATCH 2/3] chore: added changeset Signed-off-by: benjdlambert --- .changeset/lucky-foxes-hide.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/lucky-foxes-hide.md diff --git a/.changeset/lucky-foxes-hide.md b/.changeset/lucky-foxes-hide.md new file mode 100644 index 0000000000..4d42a2854c --- /dev/null +++ b/.changeset/lucky-foxes-hide.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': patch +--- + +Turn on `pagination` by default in new frontend system, and also make configurable From c1483c2da254cc44152fa325e697b9db695c9b9b Mon Sep 17 00:00:00 2001 From: benjdlambert Date: Tue, 15 Jul 2025 10:22:24 +0200 Subject: [PATCH 3/3] chore: updating api-reports Signed-off-by: benjdlambert --- plugins/catalog/report-alpha.api.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/plugins/catalog/report-alpha.api.md b/plugins/catalog/report-alpha.api.md index 4be914a69d..4e00a5185e 100644 --- a/plugins/catalog/report-alpha.api.md +++ b/plugins/catalog/report-alpha.api.md @@ -1012,9 +1012,26 @@ const _default: FrontendPlugin< }>; 'page:catalog': ExtensionDefinition<{ config: { + pagination: + | boolean + | { + mode: 'offset' | 'cursor'; + offset?: number | undefined; + limit?: number | undefined; + }; + } & { path: string | undefined; }; configInput: { + pagination?: + | boolean + | { + mode: 'offset' | 'cursor'; + offset?: number | undefined; + limit?: number | undefined; + } + | undefined; + } & { path?: string | undefined; }; output: