From 0cde1b882396af8a32f06d67c9254a8a577d2538 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 31 Mar 2025 00:28:00 +0200 Subject: [PATCH 1/4] catalog: add overview content group Signed-off-by: Patrik Oldsberg --- plugins/catalog-react/report-alpha.api.md | 1 + plugins/catalog-react/src/alpha/blueprints/extensionData.tsx | 1 + plugins/catalog/src/alpha/entityContents.tsx | 1 + 3 files changed, 3 insertions(+) diff --git a/plugins/catalog-react/report-alpha.api.md b/plugins/catalog-react/report-alpha.api.md index b9a064043c..d5f85b7836 100644 --- a/plugins/catalog-react/report-alpha.api.md +++ b/plugins/catalog-react/report-alpha.api.md @@ -110,6 +110,7 @@ export function convertLegacyEntityContentExtension( // @alpha export const defaultEntityContentGroups: { + overview: string; documentation: string; development: string; deployment: string; diff --git a/plugins/catalog-react/src/alpha/blueprints/extensionData.tsx b/plugins/catalog-react/src/alpha/blueprints/extensionData.tsx index b5092d99b7..0a52ce2c5c 100644 --- a/plugins/catalog-react/src/alpha/blueprints/extensionData.tsx +++ b/plugins/catalog-react/src/alpha/blueprints/extensionData.tsx @@ -38,6 +38,7 @@ export const entityFilterExpressionDataRef = * Default entity content groups. */ export const defaultEntityContentGroups = { + overview: 'Overview', documentation: 'Documentation', development: 'Development', deployment: 'Deployment', diff --git a/plugins/catalog/src/alpha/entityContents.tsx b/plugins/catalog/src/alpha/entityContents.tsx index 8be3608b82..165ed33e04 100644 --- a/plugins/catalog/src/alpha/entityContents.tsx +++ b/plugins/catalog/src/alpha/entityContents.tsx @@ -49,6 +49,7 @@ export const catalogOverviewEntityContent = return originalFactory({ defaultPath: '/', defaultTitle: 'Overview', + defaultGroup: 'overview', loader: async () => { const LazyDefaultLayoutComponent = reactLazy(() => import('./DefaultEntityContentLayout').then(m => ({ From 3b2a02d82503246ae3fc4197530e66b5595dfb84 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 31 Mar 2025 00:28:28 +0200 Subject: [PATCH 2/4] catalog: add info card types Signed-off-by: Patrik Oldsberg --- plugins/catalog/src/alpha/entityCards.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/catalog/src/alpha/entityCards.tsx b/plugins/catalog/src/alpha/entityCards.tsx index 98921958ad..8662518d30 100644 --- a/plugins/catalog/src/alpha/entityCards.tsx +++ b/plugins/catalog/src/alpha/entityCards.tsx @@ -20,6 +20,7 @@ import { compatWrapper } from '@backstage/core-compat-api'; export const catalogAboutEntityCard = EntityCardBlueprint.make({ name: 'about', params: { + type: 'info', loader: async () => import('../components/AboutCard').then(m => compatWrapper(), @@ -30,6 +31,7 @@ export const catalogAboutEntityCard = EntityCardBlueprint.make({ export const catalogLinksEntityCard = EntityCardBlueprint.make({ name: 'links', params: { + type: 'info', filter: 'has:links', loader: async () => import('../components/EntityLinksCard').then(m => @@ -41,6 +43,7 @@ export const catalogLinksEntityCard = EntityCardBlueprint.make({ export const catalogLabelsEntityCard = EntityCardBlueprint.make({ name: 'labels', params: { + type: 'info', filter: 'has:labels', loader: async () => import('../components/EntityLabelsCard').then(m => From f23f06d8ebfff50edb0f7b02fd940da46cf897eb Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Mon, 31 Mar 2025 12:18:44 +0200 Subject: [PATCH 3/4] catalog: fix summary card layout Signed-off-by: Patrik Oldsberg --- plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx b/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx index badfaf6d72..21276f424a 100644 --- a/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx +++ b/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx @@ -56,6 +56,7 @@ const useStyles = makeStyles< minWidth: 0, }, summaryArea: { + minWidth: 0, margin: theme.spacing(1.5), // To counteract MUI negative grid margin }, summaryCard: { @@ -145,7 +146,7 @@ export function DefaultEntityContentLayout(props: EntityContentLayoutProps) { ) : null} {summaryCards.length > 0 ? (
- + {summaryCards.map(card => (
{card.element}
))} From 3f7e4f1527a69d25daaa453fcb4f368eac9a79b9 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Thu, 10 Apr 2025 19:04:42 +0200 Subject: [PATCH 4/4] changesets: added changesets for catalog NFS polish Signed-off-by: Patrik Oldsberg --- .changeset/brown-pans-guess.md | 5 +++++ .changeset/kind-pianos-fold.md | 5 +++++ .changeset/rare-olives-lay.md | 5 +++++ .changeset/wet-towns-laugh.md | 5 +++++ 4 files changed, 20 insertions(+) create mode 100644 .changeset/brown-pans-guess.md create mode 100644 .changeset/kind-pianos-fold.md create mode 100644 .changeset/rare-olives-lay.md create mode 100644 .changeset/wet-towns-laugh.md diff --git a/.changeset/brown-pans-guess.md b/.changeset/brown-pans-guess.md new file mode 100644 index 0000000000..e6ba4ee465 --- /dev/null +++ b/.changeset/brown-pans-guess.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': patch +--- + +Fixed the layout of summary cards in the new frontend system, ensuring that the horizontal scroll grid doesn't grow too large as well as tweaked its scrolling parameters. diff --git a/.changeset/kind-pianos-fold.md b/.changeset/kind-pianos-fold.md new file mode 100644 index 0000000000..a0c2bf39bc --- /dev/null +++ b/.changeset/kind-pianos-fold.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': patch +--- + +The about, links, and labels card now all have the `info` card type by default in the new frontend system. diff --git a/.changeset/rare-olives-lay.md b/.changeset/rare-olives-lay.md new file mode 100644 index 0000000000..0807e244ac --- /dev/null +++ b/.changeset/rare-olives-lay.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog-react': patch +--- + +Added a new `overview` entity content group for the new frontend system. diff --git a/.changeset/wet-towns-laugh.md b/.changeset/wet-towns-laugh.md new file mode 100644 index 0000000000..1e16e0b6d8 --- /dev/null +++ b/.changeset/wet-towns-laugh.md @@ -0,0 +1,5 @@ +--- +'@backstage/plugin-catalog': patch +--- + +The overview content is now part of the overview group by default in the new frontend system.