From 1c7e1cefeca352765dba6b772c6b45a20440b8c2 Mon Sep 17 00:00:00 2001 From: Antonio Ereiz Date: Mon, 27 Oct 2025 19:14:19 +0100 Subject: [PATCH 1/2] revert viewBox back on DependencyGraph and add allowFullscreen prop to EntityRelationsGraph Signed-off-by: Antonio Ereiz --- .changeset/real-trains-visit.md | 6 ++++++ .../src/components/DependencyGraph/DependencyGraph.tsx | 2 +- plugins/catalog-graph/report.api.md | 1 + .../EntityRelationsGraph/EntityRelationsGraph.tsx | 3 +++ 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 .changeset/real-trains-visit.md diff --git a/.changeset/real-trains-visit.md b/.changeset/real-trains-visit.md new file mode 100644 index 0000000000..ea62189631 --- /dev/null +++ b/.changeset/real-trains-visit.md @@ -0,0 +1,6 @@ +--- +'@backstage/core-components': patch +'@backstage/plugin-catalog-graph': patch +--- + +Reverted back viewbox to old values. Also, added fullScreen prop to EntityCatalogGraphCard diff --git a/packages/core-components/src/components/DependencyGraph/DependencyGraph.tsx b/packages/core-components/src/components/DependencyGraph/DependencyGraph.tsx index 4b99402c3a..db22a2951b 100644 --- a/packages/core-components/src/components/DependencyGraph/DependencyGraph.tsx +++ b/packages/core-components/src/components/DependencyGraph/DependencyGraph.tsx @@ -533,7 +533,7 @@ export function DependencyGraph( height={graphHeight} y={maxHeight / 2 - graphHeight / 2} x={maxWidth / 2 - graphWidth / 2} - viewBox={`-25 -25 ${graphWidth + 50} ${graphHeight + 50}`} + viewBox={`0 0 ${graphWidth} ${graphHeight}`} > {graphEdges.map(e => { const edge = graph.current.edge(e) as GraphEdge; diff --git a/plugins/catalog-graph/report.api.md b/plugins/catalog-graph/report.api.md index b7621d05ef..23c131659a 100644 --- a/plugins/catalog-graph/report.api.md +++ b/plugins/catalog-graph/report.api.md @@ -182,6 +182,7 @@ export type EntityRelationsGraphProps = { renderEdge?: DependencyGraphTypes.RenderEdgeFunction; curve?: 'curveStepBefore' | 'curveMonotoneX'; showArrowHeads?: boolean; + allowFullscreen?: boolean; }; // @public diff --git a/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.tsx b/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.tsx index e71f928c15..b1443e8292 100644 --- a/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.tsx +++ b/plugins/catalog-graph/src/components/EntityRelationsGraph/EntityRelationsGraph.tsx @@ -92,6 +92,7 @@ export type EntityRelationsGraphProps = { renderEdge?: DependencyGraphTypes.RenderEdgeFunction; curve?: 'curveStepBefore' | 'curveMonotoneX'; showArrowHeads?: boolean; + allowFullscreen?: boolean; }; /** @@ -118,6 +119,7 @@ export const EntityRelationsGraph = (props: EntityRelationsGraphProps) => { renderEdge, curve, showArrowHeads, + allowFullscreen, } = props; const theme = useTheme(); @@ -169,6 +171,7 @@ export const EntityRelationsGraph = (props: EntityRelationsGraphProps) => { zoom={zoom} curve={curve} showArrowHeads={showArrowHeads} + allowFullscreen={allowFullscreen} /> )} From 36be7d8753806771d416a7f1ef5082282e1a6902 Mon Sep 17 00:00:00 2001 From: Ben Lambert Date: Tue, 11 Nov 2025 10:24:23 -0500 Subject: [PATCH 2/2] Revert viewbox changes and add fullScreen prop Signed-off-by: Ben Lambert --- .changeset/real-trains-visit.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.changeset/real-trains-visit.md b/.changeset/real-trains-visit.md index ea62189631..c229562ec4 100644 --- a/.changeset/real-trains-visit.md +++ b/.changeset/real-trains-visit.md @@ -3,4 +3,5 @@ '@backstage/plugin-catalog-graph': patch --- -Reverted back viewbox to old values. Also, added fullScreen prop to EntityCatalogGraphCard +- Revert `viewbox` back to old values. +- Added `fullScreen` prop to `EntityCatalogGraphCard`