diff --git a/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx b/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx index fa753e7e4a..f18ce1b193 100644 --- a/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx +++ b/plugins/catalog/src/alpha/DefaultEntityContentLayout.tsx @@ -32,6 +32,9 @@ import { } from '../components/EntityProcessingErrorsPanel'; import { HorizontalScrollGrid } from '@backstage/core-components'; +// Module-level flag to ensure deprecation warning is only logged once +let hasLoggedSummaryWarning = false; + const useStyles = makeStyles< Theme, { infoCards: boolean; summaryCards: boolean; contentCards: boolean } @@ -144,7 +147,8 @@ export function DefaultEntityContentLayout(props: EntityContentLayoutProps) { card => !card.type || card.type === 'content', ); - if (summaryCards.length > 0) { + if (summaryCards.length > 0 && !hasLoggedSummaryWarning) { + hasLoggedSummaryWarning = true; // eslint-disable-next-line no-console console.warn( "The 'summary' entity card type has been removed. Please update your cards to use 'content' or 'info' types instead.",