diff --git a/packages/ui/src/components/Visualization/Canvas/__snapshots__/Canvas.test.tsx.snap b/packages/ui/src/components/Visualization/Canvas/__snapshots__/Canvas.test.tsx.snap index 2d1f5cdd5..95efc56b4 100644 --- a/packages/ui/src/components/Visualization/Canvas/__snapshots__/Canvas.test.tsx.snap +++ b/packages/ui/src/components/Visualization/Canvas/__snapshots__/Canvas.test.tsx.snap @@ -61,7 +61,7 @@ exports[`Canvas Catalog button should NOT be present if \`CatalogModalContext\` />
@@ -658,7 +658,7 @@ exports[`Canvas Catalog button should NOT be present if \`CatalogModalContext\` data-id="direct-1234" data-kind="node" data-type="node" - transform="translate(417.5, 770)" + transform="translate(437.5, 795)" /> @@ -955,7 +955,7 @@ exports[`Canvas Catalog button should be present if \`CatalogModalContext\` is p />
@@ -1552,7 +1552,7 @@ exports[`Canvas Catalog button should be present if \`CatalogModalContext\` is p data-id="direct-1234" data-kind="node" data-type="node" - transform="translate(417.5, 770)" + transform="translate(437.5, 795)" /> @@ -2661,7 +2661,7 @@ exports[`Canvas should render correctly 1`] = ` />
@@ -3258,7 +3258,7 @@ exports[`Canvas should render correctly 1`] = ` data-id="direct-1234" data-kind="node" data-type="node" - transform="translate(417.5, 770)" + transform="translate(437.5, 795)" /> @@ -3555,7 +3555,7 @@ exports[`Canvas should render correctly with more routes 1`] = ` />
@@ -4152,7 +4152,7 @@ exports[`Canvas should render correctly with more routes 1`] = ` data-id="direct-1234" data-kind="node" data-type="node" - transform="translate(417.5, 770)" + transform="translate(437.5, 795)" /> diff --git a/packages/ui/src/components/Visualization/Canvas/__snapshots__/flow.service.test.ts.snap b/packages/ui/src/components/Visualization/Canvas/__snapshots__/flow.service.test.ts.snap index 5f040493f..76bf868d4 100644 --- a/packages/ui/src/components/Visualization/Canvas/__snapshots__/flow.service.test.ts.snap +++ b/packages/ui/src/components/Visualization/Canvas/__snapshots__/flow.service.test.ts.snap @@ -223,7 +223,7 @@ exports[`FlowService getFlowDiagram should return nodes and edges for a group wi "label": "group-1234", "parentNode": undefined, "style": { - "padding": 60, + "padding": 65, }, "type": "group", }, diff --git a/packages/ui/src/components/Visualization/Canvas/canvas.defaults.ts b/packages/ui/src/components/Visualization/Canvas/canvas.defaults.ts index ca6795c8d..aac38b9b8 100644 --- a/packages/ui/src/components/Visualization/Canvas/canvas.defaults.ts +++ b/packages/ui/src/components/Visualization/Canvas/canvas.defaults.ts @@ -5,6 +5,6 @@ export class CanvasDefaults { static readonly DEFAULT_LAYOUT = LayoutType.DagreVertical; static readonly DEFAULT_NODE_SHAPE = NodeShape.rect; static readonly DEFAULT_NODE_DIAMETER = 75; - static readonly DEFAULT_GROUP_PADDING = 50; + static readonly DEFAULT_GROUP_PADDING = 65; static readonly DEFAULT_SIDEBAR_WIDTH = 500; } diff --git a/packages/ui/src/components/Visualization/Canvas/flow.service.ts b/packages/ui/src/components/Visualization/Canvas/flow.service.ts index c93e06262..caa5b04b6 100644 --- a/packages/ui/src/components/Visualization/Canvas/flow.service.ts +++ b/packages/ui/src/components/Visualization/Canvas/flow.service.ts @@ -33,7 +33,7 @@ export class FlowService { }); const containerId = vizNodeParam.id; - node = this.getContainer(containerId, { + node = this.getGroup(containerId, { label: containerId, children: children.map((child) => child.id), parentNode: vizNodeParam.getParentNode()?.id, @@ -75,7 +75,7 @@ export class FlowService { return edges; } - private static getContainer( + private static getGroup( id: string, options: { label?: string; children?: string[]; parentNode?: string; data?: CanvasNode['data'] } = {}, ): CanvasNode { @@ -88,7 +88,7 @@ export class FlowService { parentNode: options.parentNode, data: options.data, style: { - padding: CanvasDefaults.DEFAULT_NODE_DIAMETER * 0.8, + padding: CanvasDefaults.DEFAULT_GROUP_PADDING, }, }; } diff --git a/packages/ui/src/components/Visualization/Custom/Group/CustomGroupExpanded.tsx b/packages/ui/src/components/Visualization/Custom/Group/CustomGroupExpanded.tsx index 6abf174c8..67659e082 100644 --- a/packages/ui/src/components/Visualization/Custom/Group/CustomGroupExpanded.tsx +++ b/packages/ui/src/components/Visualization/Custom/Group/CustomGroupExpanded.tsx @@ -46,7 +46,7 @@ export const CustomGroupExpanded: FunctionComponent = x={boxRef.current.x} y={boxRef.current.y} width={boxRef.current.width} - height={boxRef.current.height + 10} + height={boxRef.current.height} /> = x={boxRef.current.x} y={boxRef.current.y} width={boxRef.current.width} - height={boxRef.current.height + 10} + height={boxRef.current.height} >
diff --git a/packages/ui/src/tests/__snapshots__/nodes-edges.test.ts.snap b/packages/ui/src/tests/__snapshots__/nodes-edges.test.ts.snap index de387427c..2a5c75d9d 100644 --- a/packages/ui/src/tests/__snapshots__/nodes-edges.test.ts.snap +++ b/packages/ui/src/tests/__snapshots__/nodes-edges.test.ts.snap @@ -1860,7 +1860,7 @@ exports[`Nodes and Edges should generate edges for steps with branches 1`] = ` "label": "when-1234", "parentNode": "choice-1234", "style": { - "padding": 60, + "padding": 65, }, "type": "group", }, @@ -2951,7 +2951,7 @@ exports[`Nodes and Edges should generate edges for steps with branches 1`] = ` "label": "otherwise-1234", "parentNode": "choice-1234", "style": { - "padding": 60, + "padding": 65, }, "type": "group", }, @@ -3500,7 +3500,7 @@ exports[`Nodes and Edges should generate edges for steps with branches 1`] = ` "label": "choice-1234", "parentNode": "route-1234", "style": { - "padding": 60, + "padding": 65, }, "type": "group", }, @@ -4906,7 +4906,7 @@ exports[`Nodes and Edges should generate edges for steps with branches 1`] = ` "label": "route-1234", "parentNode": undefined, "style": { - "padding": 60, + "padding": 65, }, "type": "group", },