From 6bae0255e6288084e075cf83c8f5b51b15ba3286 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Thu, 5 Oct 2023 18:47:57 -0700 Subject: [PATCH 1/5] add grid_rows_gap_bug test --- e2etests/regression_test.go | 1 + e2etests/testdata/files/grid_rows_gap_bug.d2 | 8 + .../grid_rows_gap_bug/dagre/board.exp.json | 212 ++++++++++++++++++ .../grid_rows_gap_bug/dagre/sketch.exp.svg | 97 ++++++++ .../grid_rows_gap_bug/elk/board.exp.json | 212 ++++++++++++++++++ .../grid_rows_gap_bug/elk/sketch.exp.svg | 97 ++++++++ 6 files changed, 627 insertions(+) create mode 100644 e2etests/testdata/files/grid_rows_gap_bug.d2 create mode 100644 e2etests/testdata/regression/grid_rows_gap_bug/dagre/board.exp.json create mode 100644 e2etests/testdata/regression/grid_rows_gap_bug/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/regression/grid_rows_gap_bug/elk/board.exp.json create mode 100644 e2etests/testdata/regression/grid_rows_gap_bug/elk/sketch.exp.svg diff --git a/e2etests/regression_test.go b/e2etests/regression_test.go index 2bbea307d..56c2d2f15 100644 --- a/e2etests/regression_test.go +++ b/e2etests/regression_test.go @@ -1047,6 +1047,7 @@ cf many required: { loadFromFile(t, "empty_nested_grid"), loadFromFile(t, "code_font_size"), loadFromFile(t, "disclaimer"), + loadFromFile(t, "grid_rows_gap_bug"), } runa(t, tcs) diff --git a/e2etests/testdata/files/grid_rows_gap_bug.d2 b/e2etests/testdata/files/grid_rows_gap_bug.d2 new file mode 100644 index 000000000..9376bfd2b --- /dev/null +++ b/e2etests/testdata/files/grid_rows_gap_bug.d2 @@ -0,0 +1,8 @@ +grid: "" { + grid-rows: 3 + horizontal-gap: 100 + vertical-gap: 0 + first + second + third +} diff --git a/e2etests/testdata/regression/grid_rows_gap_bug/dagre/board.exp.json b/e2etests/testdata/regression/grid_rows_gap_bug/dagre/board.exp.json new file mode 100644 index 000000000..54ae66359 --- /dev/null +++ b/e2etests/testdata/regression/grid_rows_gap_bug/dagre/board.exp.json @@ -0,0 +1,212 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "grid", + "type": "rectangle", + "pos": { + "x": 0, + "y": 0 + }, + "width": 295, + "height": 98, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "grid.first", + "type": "rectangle", + "pos": { + "x": 100, + "y": 0 + }, + "width": 95, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "first", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 30, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.second", + "type": "rectangle", + "pos": { + "x": 100, + "y": 66 + }, + "width": 95, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "second", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 50, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.third", + "type": "rectangle", + "pos": { + "x": 100, + "y": 132 + }, + "width": 95, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "third", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 36, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + } + ], + "connections": [], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/regression/grid_rows_gap_bug/dagre/sketch.exp.svg b/e2etests/testdata/regression/grid_rows_gap_bug/dagre/sketch.exp.svg new file mode 100644 index 000000000..b4d3f8957 --- /dev/null +++ b/e2etests/testdata/regression/grid_rows_gap_bug/dagre/sketch.exp.svg @@ -0,0 +1,97 @@ +firstsecondthird + + + + + \ No newline at end of file diff --git a/e2etests/testdata/regression/grid_rows_gap_bug/elk/board.exp.json b/e2etests/testdata/regression/grid_rows_gap_bug/elk/board.exp.json new file mode 100644 index 000000000..f4e575d0b --- /dev/null +++ b/e2etests/testdata/regression/grid_rows_gap_bug/elk/board.exp.json @@ -0,0 +1,212 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "grid", + "type": "rectangle", + "pos": { + "x": 12, + "y": 12 + }, + "width": 295, + "height": 98, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B4", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "grid.first", + "type": "rectangle", + "pos": { + "x": 112, + "y": 12 + }, + "width": 95, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "first", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 30, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.second", + "type": "rectangle", + "pos": { + "x": 112, + "y": 78 + }, + "width": 95, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "second", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 50, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "grid.third", + "type": "rectangle", + "pos": { + "x": 112, + "y": 144 + }, + "width": 95, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B5", + "stroke": "B1", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "third", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 36, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + } + ], + "connections": [], + "root": { + "id": "", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 0, + "height": 0, + "opacity": 0, + "strokeDash": 0, + "strokeWidth": 0, + "borderRadius": 0, + "fill": "N7", + "stroke": "", + "shadow": false, + "3d": false, + "multiple": false, + "double-border": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "", + "fontSize": 0, + "fontFamily": "", + "language": "", + "color": "", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 0, + "labelHeight": 0, + "zIndex": 0, + "level": 0 + } +} diff --git a/e2etests/testdata/regression/grid_rows_gap_bug/elk/sketch.exp.svg b/e2etests/testdata/regression/grid_rows_gap_bug/elk/sketch.exp.svg new file mode 100644 index 000000000..4d4246899 --- /dev/null +++ b/e2etests/testdata/regression/grid_rows_gap_bug/elk/sketch.exp.svg @@ -0,0 +1,97 @@ +firstsecondthird + + + + + \ No newline at end of file From aca528c9e132766bd706387bc6d727993b582153 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Thu, 5 Oct 2023 18:48:51 -0700 Subject: [PATCH 2/5] fix typo bug --- d2layouts/d2grid/layout.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d2layouts/d2grid/layout.go b/d2layouts/d2grid/layout.go index d5c220f90..80f183b56 100644 --- a/d2layouts/d2grid/layout.go +++ b/d2layouts/d2grid/layout.go @@ -397,7 +397,7 @@ func (gd *gridDiagram) layoutDynamic(g *d2graph.Graph, obj *d2graph.Object) { cursor.X = 0 cursor.Y += rowHeight + verticalGap } - maxY = cursor.Y - horizontalGap + maxY = cursor.Y - verticalGap } else { // measure column heights colHeights := []float64{} From 7a7d3edc3c88479a332d6715c1c7bfee5c36e291 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Thu, 5 Oct 2023 18:49:38 -0700 Subject: [PATCH 3/5] update test --- .../grid_rows_gap_bug/dagre/board.exp.json | 2 +- .../grid_rows_gap_bug/dagre/sketch.exp.svg | 152 +++++++++--------- .../grid_rows_gap_bug/elk/board.exp.json | 2 +- .../grid_rows_gap_bug/elk/sketch.exp.svg | 152 +++++++++--------- 4 files changed, 154 insertions(+), 154 deletions(-) diff --git a/e2etests/testdata/regression/grid_rows_gap_bug/dagre/board.exp.json b/e2etests/testdata/regression/grid_rows_gap_bug/dagre/board.exp.json index 54ae66359..34af37809 100644 --- a/e2etests/testdata/regression/grid_rows_gap_bug/dagre/board.exp.json +++ b/e2etests/testdata/regression/grid_rows_gap_bug/dagre/board.exp.json @@ -11,7 +11,7 @@ "y": 0 }, "width": 295, - "height": 98, + "height": 198, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, diff --git a/e2etests/testdata/regression/grid_rows_gap_bug/dagre/sketch.exp.svg b/e2etests/testdata/regression/grid_rows_gap_bug/dagre/sketch.exp.svg index b4d3f8957..c6958e932 100644 --- a/e2etests/testdata/regression/grid_rows_gap_bug/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/grid_rows_gap_bug/dagre/sketch.exp.svg @@ -1,9 +1,9 @@ -firstsecondthird + .d2-3501266100 .fill-N1{fill:#0A0F25;} + .d2-3501266100 .fill-N2{fill:#676C7E;} + .d2-3501266100 .fill-N3{fill:#9499AB;} + .d2-3501266100 .fill-N4{fill:#CFD2DD;} + .d2-3501266100 .fill-N5{fill:#DEE1EB;} + .d2-3501266100 .fill-N6{fill:#EEF1F8;} + .d2-3501266100 .fill-N7{fill:#FFFFFF;} + .d2-3501266100 .fill-B1{fill:#0D32B2;} + .d2-3501266100 .fill-B2{fill:#0D32B2;} + .d2-3501266100 .fill-B3{fill:#E3E9FD;} + .d2-3501266100 .fill-B4{fill:#E3E9FD;} + .d2-3501266100 .fill-B5{fill:#EDF0FD;} + .d2-3501266100 .fill-B6{fill:#F7F8FE;} + .d2-3501266100 .fill-AA2{fill:#4A6FF3;} + .d2-3501266100 .fill-AA4{fill:#EDF0FD;} + .d2-3501266100 .fill-AA5{fill:#F7F8FE;} + .d2-3501266100 .fill-AB4{fill:#EDF0FD;} + .d2-3501266100 .fill-AB5{fill:#F7F8FE;} + .d2-3501266100 .stroke-N1{stroke:#0A0F25;} + .d2-3501266100 .stroke-N2{stroke:#676C7E;} + .d2-3501266100 .stroke-N3{stroke:#9499AB;} + .d2-3501266100 .stroke-N4{stroke:#CFD2DD;} + .d2-3501266100 .stroke-N5{stroke:#DEE1EB;} + .d2-3501266100 .stroke-N6{stroke:#EEF1F8;} + .d2-3501266100 .stroke-N7{stroke:#FFFFFF;} + .d2-3501266100 .stroke-B1{stroke:#0D32B2;} + .d2-3501266100 .stroke-B2{stroke:#0D32B2;} + .d2-3501266100 .stroke-B3{stroke:#E3E9FD;} + .d2-3501266100 .stroke-B4{stroke:#E3E9FD;} + .d2-3501266100 .stroke-B5{stroke:#EDF0FD;} + .d2-3501266100 .stroke-B6{stroke:#F7F8FE;} + .d2-3501266100 .stroke-AA2{stroke:#4A6FF3;} + .d2-3501266100 .stroke-AA4{stroke:#EDF0FD;} + .d2-3501266100 .stroke-AA5{stroke:#F7F8FE;} + .d2-3501266100 .stroke-AB4{stroke:#EDF0FD;} + .d2-3501266100 .stroke-AB5{stroke:#F7F8FE;} + .d2-3501266100 .background-color-N1{background-color:#0A0F25;} + .d2-3501266100 .background-color-N2{background-color:#676C7E;} + .d2-3501266100 .background-color-N3{background-color:#9499AB;} + .d2-3501266100 .background-color-N4{background-color:#CFD2DD;} + .d2-3501266100 .background-color-N5{background-color:#DEE1EB;} + .d2-3501266100 .background-color-N6{background-color:#EEF1F8;} + .d2-3501266100 .background-color-N7{background-color:#FFFFFF;} + .d2-3501266100 .background-color-B1{background-color:#0D32B2;} + .d2-3501266100 .background-color-B2{background-color:#0D32B2;} + .d2-3501266100 .background-color-B3{background-color:#E3E9FD;} + .d2-3501266100 .background-color-B4{background-color:#E3E9FD;} + .d2-3501266100 .background-color-B5{background-color:#EDF0FD;} + .d2-3501266100 .background-color-B6{background-color:#F7F8FE;} + .d2-3501266100 .background-color-AA2{background-color:#4A6FF3;} + .d2-3501266100 .background-color-AA4{background-color:#EDF0FD;} + .d2-3501266100 .background-color-AA5{background-color:#F7F8FE;} + .d2-3501266100 .background-color-AB4{background-color:#EDF0FD;} + .d2-3501266100 .background-color-AB5{background-color:#F7F8FE;} + .d2-3501266100 .color-N1{color:#0A0F25;} + .d2-3501266100 .color-N2{color:#676C7E;} + .d2-3501266100 .color-N3{color:#9499AB;} + .d2-3501266100 .color-N4{color:#CFD2DD;} + .d2-3501266100 .color-N5{color:#DEE1EB;} + .d2-3501266100 .color-N6{color:#EEF1F8;} + .d2-3501266100 .color-N7{color:#FFFFFF;} + .d2-3501266100 .color-B1{color:#0D32B2;} + .d2-3501266100 .color-B2{color:#0D32B2;} + .d2-3501266100 .color-B3{color:#E3E9FD;} + .d2-3501266100 .color-B4{color:#E3E9FD;} + .d2-3501266100 .color-B5{color:#EDF0FD;} + .d2-3501266100 .color-B6{color:#F7F8FE;} + .d2-3501266100 .color-AA2{color:#4A6FF3;} + .d2-3501266100 .color-AA4{color:#EDF0FD;} + .d2-3501266100 .color-AA5{color:#F7F8FE;} + .d2-3501266100 .color-AB4{color:#EDF0FD;} + .d2-3501266100 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>firstsecondthird diff --git a/e2etests/testdata/regression/grid_rows_gap_bug/elk/board.exp.json b/e2etests/testdata/regression/grid_rows_gap_bug/elk/board.exp.json index f4e575d0b..fbd3e7cae 100644 --- a/e2etests/testdata/regression/grid_rows_gap_bug/elk/board.exp.json +++ b/e2etests/testdata/regression/grid_rows_gap_bug/elk/board.exp.json @@ -11,7 +11,7 @@ "y": 12 }, "width": 295, - "height": 98, + "height": 198, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, diff --git a/e2etests/testdata/regression/grid_rows_gap_bug/elk/sketch.exp.svg b/e2etests/testdata/regression/grid_rows_gap_bug/elk/sketch.exp.svg index 4d4246899..cc09f9ae8 100644 --- a/e2etests/testdata/regression/grid_rows_gap_bug/elk/sketch.exp.svg +++ b/e2etests/testdata/regression/grid_rows_gap_bug/elk/sketch.exp.svg @@ -1,9 +1,9 @@ -firstsecondthird + .d2-3322634070 .fill-N1{fill:#0A0F25;} + .d2-3322634070 .fill-N2{fill:#676C7E;} + .d2-3322634070 .fill-N3{fill:#9499AB;} + .d2-3322634070 .fill-N4{fill:#CFD2DD;} + .d2-3322634070 .fill-N5{fill:#DEE1EB;} + .d2-3322634070 .fill-N6{fill:#EEF1F8;} + .d2-3322634070 .fill-N7{fill:#FFFFFF;} + .d2-3322634070 .fill-B1{fill:#0D32B2;} + .d2-3322634070 .fill-B2{fill:#0D32B2;} + .d2-3322634070 .fill-B3{fill:#E3E9FD;} + .d2-3322634070 .fill-B4{fill:#E3E9FD;} + .d2-3322634070 .fill-B5{fill:#EDF0FD;} + .d2-3322634070 .fill-B6{fill:#F7F8FE;} + .d2-3322634070 .fill-AA2{fill:#4A6FF3;} + .d2-3322634070 .fill-AA4{fill:#EDF0FD;} + .d2-3322634070 .fill-AA5{fill:#F7F8FE;} + .d2-3322634070 .fill-AB4{fill:#EDF0FD;} + .d2-3322634070 .fill-AB5{fill:#F7F8FE;} + .d2-3322634070 .stroke-N1{stroke:#0A0F25;} + .d2-3322634070 .stroke-N2{stroke:#676C7E;} + .d2-3322634070 .stroke-N3{stroke:#9499AB;} + .d2-3322634070 .stroke-N4{stroke:#CFD2DD;} + .d2-3322634070 .stroke-N5{stroke:#DEE1EB;} + .d2-3322634070 .stroke-N6{stroke:#EEF1F8;} + .d2-3322634070 .stroke-N7{stroke:#FFFFFF;} + .d2-3322634070 .stroke-B1{stroke:#0D32B2;} + .d2-3322634070 .stroke-B2{stroke:#0D32B2;} + .d2-3322634070 .stroke-B3{stroke:#E3E9FD;} + .d2-3322634070 .stroke-B4{stroke:#E3E9FD;} + .d2-3322634070 .stroke-B5{stroke:#EDF0FD;} + .d2-3322634070 .stroke-B6{stroke:#F7F8FE;} + .d2-3322634070 .stroke-AA2{stroke:#4A6FF3;} + .d2-3322634070 .stroke-AA4{stroke:#EDF0FD;} + .d2-3322634070 .stroke-AA5{stroke:#F7F8FE;} + .d2-3322634070 .stroke-AB4{stroke:#EDF0FD;} + .d2-3322634070 .stroke-AB5{stroke:#F7F8FE;} + .d2-3322634070 .background-color-N1{background-color:#0A0F25;} + .d2-3322634070 .background-color-N2{background-color:#676C7E;} + .d2-3322634070 .background-color-N3{background-color:#9499AB;} + .d2-3322634070 .background-color-N4{background-color:#CFD2DD;} + .d2-3322634070 .background-color-N5{background-color:#DEE1EB;} + .d2-3322634070 .background-color-N6{background-color:#EEF1F8;} + .d2-3322634070 .background-color-N7{background-color:#FFFFFF;} + .d2-3322634070 .background-color-B1{background-color:#0D32B2;} + .d2-3322634070 .background-color-B2{background-color:#0D32B2;} + .d2-3322634070 .background-color-B3{background-color:#E3E9FD;} + .d2-3322634070 .background-color-B4{background-color:#E3E9FD;} + .d2-3322634070 .background-color-B5{background-color:#EDF0FD;} + .d2-3322634070 .background-color-B6{background-color:#F7F8FE;} + .d2-3322634070 .background-color-AA2{background-color:#4A6FF3;} + .d2-3322634070 .background-color-AA4{background-color:#EDF0FD;} + .d2-3322634070 .background-color-AA5{background-color:#F7F8FE;} + .d2-3322634070 .background-color-AB4{background-color:#EDF0FD;} + .d2-3322634070 .background-color-AB5{background-color:#F7F8FE;} + .d2-3322634070 .color-N1{color:#0A0F25;} + .d2-3322634070 .color-N2{color:#676C7E;} + .d2-3322634070 .color-N3{color:#9499AB;} + .d2-3322634070 .color-N4{color:#CFD2DD;} + .d2-3322634070 .color-N5{color:#DEE1EB;} + .d2-3322634070 .color-N6{color:#EEF1F8;} + .d2-3322634070 .color-N7{color:#FFFFFF;} + .d2-3322634070 .color-B1{color:#0D32B2;} + .d2-3322634070 .color-B2{color:#0D32B2;} + .d2-3322634070 .color-B3{color:#E3E9FD;} + .d2-3322634070 .color-B4{color:#E3E9FD;} + .d2-3322634070 .color-B5{color:#EDF0FD;} + .d2-3322634070 .color-B6{color:#F7F8FE;} + .d2-3322634070 .color-AA2{color:#4A6FF3;} + .d2-3322634070 .color-AA4{color:#EDF0FD;} + .d2-3322634070 .color-AA5{color:#F7F8FE;} + .d2-3322634070 .color-AB4{color:#EDF0FD;} + .d2-3322634070 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]>firstsecondthird From 9797f5503faffa21dc50c1b856c36c7a26efb7ef Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Thu, 5 Oct 2023 18:52:28 -0700 Subject: [PATCH 4/5] update tests --- .../stable/nesting_power/dagre/board.exp.json | 148 ++++++------ .../stable/nesting_power/dagre/sketch.exp.svg | 224 +++++++++--------- .../stable/nesting_power/elk/board.exp.json | 150 ++++++------ .../stable/nesting_power/elk/sketch.exp.svg | 224 +++++++++--------- 4 files changed, 373 insertions(+), 373 deletions(-) diff --git a/e2etests/testdata/stable/nesting_power/dagre/board.exp.json b/e2etests/testdata/stable/nesting_power/dagre/board.exp.json index 4e7a8b922..58936ce0d 100644 --- a/e2etests/testdata/stable/nesting_power/dagre/board.exp.json +++ b/e2etests/testdata/stable/nesting_power/dagre/board.exp.json @@ -8,10 +8,10 @@ "type": "rectangle", "pos": { "x": -2526, - "y": 732 + "y": 736 }, "width": 2508, - "height": 946, + "height": 938, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -131,10 +131,10 @@ "type": "rectangle", "pos": { "x": -1570, - "y": 762 + "y": 766 }, "width": 1522, - "height": 886, + "height": 878, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -295,10 +295,10 @@ "type": "rectangle", "pos": { "x": -1510, - "y": 822 + "y": 826 }, "width": 204, - "height": 766, + "height": 758, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -336,10 +336,10 @@ "type": "rectangle", "pos": { "x": -1266, - "y": 853 + "y": 857 }, "width": 242, - "height": 735, + "height": 727, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -377,7 +377,7 @@ "type": "rectangle", "pos": { "x": -1450, - "y": 882 + "y": 886 }, "width": 84, "height": 66, @@ -418,7 +418,7 @@ "type": "rectangle", "pos": { "x": -1450, - "y": 988 + "y": 992 }, "width": 84, "height": 66, @@ -459,7 +459,7 @@ "type": "rectangle", "pos": { "x": -1450, - "y": 1094 + "y": 1098 }, "width": 84, "height": 66, @@ -500,7 +500,7 @@ "type": "rectangle", "pos": { "x": -1450, - "y": 1200 + "y": 1204 }, "width": 84, "height": 66, @@ -541,7 +541,7 @@ "type": "rectangle", "pos": { "x": -1450, - "y": 1306 + "y": 1310 }, "width": 84, "height": 66, @@ -582,10 +582,10 @@ "type": "sequence_diagram", "pos": { "x": -984, - "y": 822 + "y": 826 }, "width": 876, - "height": 766, + "height": 758, "opacity": 1, "strokeDash": 0, "strokeWidth": 0, @@ -623,7 +623,7 @@ "type": "rectangle", "pos": { "x": -972, - "y": 1230 + "y": 1226 }, "width": 100, "height": 66, @@ -664,7 +664,7 @@ "type": "rectangle", "pos": { "x": -822, - "y": 1230 + "y": 1226 }, "width": 100, "height": 66, @@ -705,7 +705,7 @@ "type": "rectangle", "pos": { "x": -682, - "y": 1230 + "y": 1226 }, "width": 168, "height": 66, @@ -746,7 +746,7 @@ "type": "rectangle", "pos": { "x": -604, - "y": 1426 + "y": 1422 }, "width": 12, "height": 90, @@ -786,10 +786,10 @@ "type": "rectangle", "pos": { "x": -474, - "y": 900 + "y": 904 }, "width": 354, - "height": 396, + "height": 388, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -827,7 +827,7 @@ "type": "rectangle", "pos": { "x": -474, - "y": 931 + "y": 935 }, "width": 77, "height": 66, @@ -868,7 +868,7 @@ "type": "rectangle", "pos": { "x": -397, - "y": 931 + "y": 935 }, "width": 277, "height": 66, @@ -909,10 +909,10 @@ "type": "rectangle", "pos": { "x": -474, - "y": 997 + "y": 1001 }, "width": 77, - "height": 299, + "height": 291, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -950,7 +950,7 @@ "type": "rectangle", "pos": { "x": -464, - "y": 1028 + "y": 1032 }, "width": 53, "height": 66, @@ -991,7 +991,7 @@ "type": "rectangle", "pos": { "x": -464, - "y": 1114 + "y": 1118 }, "width": 53, "height": 66, @@ -1032,7 +1032,7 @@ "type": "rectangle", "pos": { "x": -464, - "y": 1200 + "y": 1204 }, "width": 53, "height": 66, @@ -1073,10 +1073,10 @@ "type": "sequence_diagram", "pos": { "x": -397, - "y": 997 + "y": 1001 }, "width": 277, - "height": 299, + "height": 291, "opacity": 1, "strokeDash": 0, "strokeWidth": 0, @@ -1114,7 +1114,7 @@ "type": "rectangle", "pos": { "x": -385, - "y": 1070 + "y": 1074 }, "width": 105, "height": 66, @@ -1155,7 +1155,7 @@ "type": "rectangle", "pos": { "x": -232, - "y": 1070 + "y": 1074 }, "width": 100, "height": 66, @@ -1196,7 +1196,7 @@ "type": "rectangle", "pos": { "x": -1236, - "y": 884 + "y": 888 }, "width": 182, "height": 126, @@ -1237,7 +1237,7 @@ "type": "rectangle", "pos": { "x": -1206, - "y": 914 + "y": 918 }, "width": 122, "height": 66, @@ -6620,11 +6620,11 @@ "route": [ { "x": -1408, - "y": 948.5 + "y": 952.5 }, { "x": -1408, - "y": 988.5 + "y": 992.5 } ], "animated": false, @@ -6658,11 +6658,11 @@ "route": [ { "x": -1408, - "y": 1054.5 + "y": 1058.5 }, { "x": -1408, - "y": 1094.5 + "y": 1098.5 } ], "animated": false, @@ -6696,11 +6696,11 @@ "route": [ { "x": -1408, - "y": 1160.5 + "y": 1164.5 }, { "x": -1408, - "y": 1200.5 + "y": 1204.5 } ], "animated": false, @@ -6734,11 +6734,11 @@ "route": [ { "x": -1408, - "y": 1266.5 + "y": 1270.5 }, { "x": -1408, - "y": 1306.5 + "y": 1310.5 } ], "animated": false, @@ -6810,11 +6810,11 @@ "route": [ { "x": -922, - "y": 1366.5 + "y": 1362.5 }, { "x": -772, - "y": 1366.5 + "y": 1362.5 } ], "animated": false, @@ -6848,11 +6848,11 @@ "route": [ { "x": -772, - "y": 1436.5 + "y": 1432.5 }, { "x": -604, - "y": 1436.5 + "y": 1432.5 } ], "animated": false, @@ -6886,11 +6886,11 @@ "route": [ { "x": -592, - "y": 1506.5 + "y": 1502.5 }, { "x": -297, - "y": 1506.5 + "y": 1502.5 } ], "animated": false, @@ -6924,11 +6924,11 @@ "route": [ { "x": -437.5, - "y": 1094.5 + "y": 1098.5 }, { "x": -437.5, - "y": 1114.5 + "y": 1118.5 } ], "animated": false, @@ -6962,11 +6962,11 @@ "route": [ { "x": -437.5, - "y": 1180.5 + "y": 1184.5 }, { "x": -437.5, - "y": 1200.5 + "y": 1204.5 } ], "animated": false, @@ -7000,11 +7000,11 @@ "route": [ { "x": -332.5, - "y": 1206.5 + "y": 1210.5 }, { "x": -182, - "y": 1206.5 + "y": 1210.5 } ], "animated": false, @@ -7040,12 +7040,12 @@ "labelPercentage": 0, "route": [ { - "x": -219, - "y": 1136.5 + "x": -220, + "y": 1140.5 }, { "x": -592, - "y": 1466.5 + "y": 1462.5 } ], "animated": false, @@ -7082,11 +7082,11 @@ "route": [ { "x": -1366, - "y": 1009.5 + "y": 1013.5 }, { "x": -1206, - "y": 964.5 + "y": 968.5 } ], "animated": false, @@ -7123,7 +7123,7 @@ "route": [ { "x": -1450, - "y": 1335.5 + "y": 1339.5 }, { "x": -2380, @@ -7164,7 +7164,7 @@ "route": [ { "x": -1449.5, - "y": 934.5 + "y": 938.5 }, { "x": -1967.5, @@ -10137,7 +10137,7 @@ "route": [ { "x": -1366, - "y": 1359 + "y": 1363 }, { "x": 149, @@ -10216,11 +10216,11 @@ "route": [ { "x": -922, - "y": 1296.5 + "y": 1292.5 }, { "x": -922, - "y": 1576.5 + "y": 1572.5 } ], "animated": false, @@ -10254,11 +10254,11 @@ "route": [ { "x": -772, - "y": 1296.5 + "y": 1292.5 }, { "x": -772, - "y": 1576.5 + "y": 1572.5 } ], "animated": false, @@ -10292,11 +10292,11 @@ "route": [ { "x": -598, - "y": 1296.5 + "y": 1292.5 }, { "x": -598, - "y": 1576.5 + "y": 1572.5 } ], "animated": false, @@ -10330,11 +10330,11 @@ "route": [ { "x": -297, - "y": 1296.5 + "y": 1292.5 }, { "x": -297, - "y": 1576.5 + "y": 1572.5 } ], "animated": false, @@ -10368,11 +10368,11 @@ "route": [ { "x": -332.5, - "y": 1136.5 + "y": 1140.5 }, { "x": -332.5, - "y": 1276.5 + "y": 1280.5 } ], "animated": false, @@ -10406,11 +10406,11 @@ "route": [ { "x": -182, - "y": 1136.5 + "y": 1140.5 }, { "x": -182, - "y": 1276.5 + "y": 1280.5 } ], "animated": false, diff --git a/e2etests/testdata/stable/nesting_power/dagre/sketch.exp.svg b/e2etests/testdata/stable/nesting_power/dagre/sketch.exp.svg index 864f4229c..1c18310e9 100644 --- a/e2etests/testdata/stable/nesting_power/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/nesting_power/dagre/sketch.exp.svg @@ -1,23 +1,23 @@ - + .d2-1035777037 .fill-N1{fill:#0A0F25;} + .d2-1035777037 .fill-N2{fill:#676C7E;} + .d2-1035777037 .fill-N3{fill:#9499AB;} + .d2-1035777037 .fill-N4{fill:#CFD2DD;} + .d2-1035777037 .fill-N5{fill:#DEE1EB;} + .d2-1035777037 .fill-N6{fill:#EEF1F8;} + .d2-1035777037 .fill-N7{fill:#FFFFFF;} + .d2-1035777037 .fill-B1{fill:#0D32B2;} + .d2-1035777037 .fill-B2{fill:#0D32B2;} + .d2-1035777037 .fill-B3{fill:#E3E9FD;} + .d2-1035777037 .fill-B4{fill:#E3E9FD;} + .d2-1035777037 .fill-B5{fill:#EDF0FD;} + .d2-1035777037 .fill-B6{fill:#F7F8FE;} + .d2-1035777037 .fill-AA2{fill:#4A6FF3;} + .d2-1035777037 .fill-AA4{fill:#EDF0FD;} + .d2-1035777037 .fill-AA5{fill:#F7F8FE;} + .d2-1035777037 .fill-AB4{fill:#EDF0FD;} + .d2-1035777037 .fill-AB5{fill:#F7F8FE;} + .d2-1035777037 .stroke-N1{stroke:#0A0F25;} + .d2-1035777037 .stroke-N2{stroke:#676C7E;} + .d2-1035777037 .stroke-N3{stroke:#9499AB;} + .d2-1035777037 .stroke-N4{stroke:#CFD2DD;} + .d2-1035777037 .stroke-N5{stroke:#DEE1EB;} + .d2-1035777037 .stroke-N6{stroke:#EEF1F8;} + .d2-1035777037 .stroke-N7{stroke:#FFFFFF;} + .d2-1035777037 .stroke-B1{stroke:#0D32B2;} + .d2-1035777037 .stroke-B2{stroke:#0D32B2;} + .d2-1035777037 .stroke-B3{stroke:#E3E9FD;} + .d2-1035777037 .stroke-B4{stroke:#E3E9FD;} + .d2-1035777037 .stroke-B5{stroke:#EDF0FD;} + .d2-1035777037 .stroke-B6{stroke:#F7F8FE;} + .d2-1035777037 .stroke-AA2{stroke:#4A6FF3;} + .d2-1035777037 .stroke-AA4{stroke:#EDF0FD;} + .d2-1035777037 .stroke-AA5{stroke:#F7F8FE;} + .d2-1035777037 .stroke-AB4{stroke:#EDF0FD;} + .d2-1035777037 .stroke-AB5{stroke:#F7F8FE;} + .d2-1035777037 .background-color-N1{background-color:#0A0F25;} + .d2-1035777037 .background-color-N2{background-color:#676C7E;} + .d2-1035777037 .background-color-N3{background-color:#9499AB;} + .d2-1035777037 .background-color-N4{background-color:#CFD2DD;} + .d2-1035777037 .background-color-N5{background-color:#DEE1EB;} + .d2-1035777037 .background-color-N6{background-color:#EEF1F8;} + .d2-1035777037 .background-color-N7{background-color:#FFFFFF;} + .d2-1035777037 .background-color-B1{background-color:#0D32B2;} + .d2-1035777037 .background-color-B2{background-color:#0D32B2;} + .d2-1035777037 .background-color-B3{background-color:#E3E9FD;} + .d2-1035777037 .background-color-B4{background-color:#E3E9FD;} + .d2-1035777037 .background-color-B5{background-color:#EDF0FD;} + .d2-1035777037 .background-color-B6{background-color:#F7F8FE;} + .d2-1035777037 .background-color-AA2{background-color:#4A6FF3;} + .d2-1035777037 .background-color-AA4{background-color:#EDF0FD;} + .d2-1035777037 .background-color-AA5{background-color:#F7F8FE;} + .d2-1035777037 .background-color-AB4{background-color:#EDF0FD;} + .d2-1035777037 .background-color-AB5{background-color:#F7F8FE;} + .d2-1035777037 .color-N1{color:#0A0F25;} + .d2-1035777037 .color-N2{color:#676C7E;} + .d2-1035777037 .color-N3{color:#9499AB;} + .d2-1035777037 .color-N4{color:#CFD2DD;} + .d2-1035777037 .color-N5{color:#DEE1EB;} + .d2-1035777037 .color-N6{color:#EEF1F8;} + .d2-1035777037 .color-N7{color:#FFFFFF;} + .d2-1035777037 .color-B1{color:#0D32B2;} + .d2-1035777037 .color-B2{color:#0D32B2;} + .d2-1035777037 .color-B3{color:#E3E9FD;} + .d2-1035777037 .color-B4{color:#E3E9FD;} + .d2-1035777037 .color-B5{color:#EDF0FD;} + .d2-1035777037 .color-B6{color:#F7F8FE;} + .d2-1035777037 .color-AA2{color:#4A6FF3;} + .d2-1035777037 .color-AA4{color:#EDF0FD;} + .d2-1035777037 .color-AA5{color:#F7F8FE;} + .d2-1035777037 .color-AB4{color:#EDF0FD;} + .d2-1035777037 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]> @@ -111,11 +111,11 @@ -Left Constant NearcenterdirectionsRight Constant NearseqmoreBottom Left Constant Neardefaultlayouthererectanglesquarepageparallelogramdocumentcylinderqueuepackagestepcalloutstored_datapersondiamondovalcirclehexagoncloudrightleftisconstantandalsogridscoreritemResponseitemessayRubricconceptitemOutcomestylishcontaineradagreelktalathisisgrid12341234updownnearax +Left Constant NearcenterdirectionsRight Constant NearseqmoreBottom Left Constant Neardefaultlayouthererectanglesquarepageparallelogramdocumentcylinderqueuepackagestepcalloutstored_datapersondiamondovalcirclehexagoncloudrightleftisconstantandalsogridscoreritemResponseitemessayRubricconceptitemOutcomestylishcontaineradagreelktalathisisgrid12341234updownnearax -ya_sequencea_shapesequencefinallybrow 1row 2row 3row 4row 5withasequence diagramyou canchild of is12341234scoreritemResponseitemessayRubricconceptsequencefrom one constant nearhaveanothergridhere andgrandchildscorerconceptessayRubricitemitemOutcomeitemResponse123continuenesting ororruns thisruns thisruns thisA straight edge across straight edge across nested typesdefault layoutdefault layoutdefault layout in styleto inside sequence diagramto inside sequence diagramto inside sequence diagramto constant nearfrom within constant nearto another getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)score +ya_sequencea_shapesequencefinallybrow 1row 2row 3row 4row 5withasequence diagramyou canchild of is12341234scoreritemResponseitemessayRubricconceptsequencefrom one constant nearhaveanothergridhere andgrandchildscorerconceptessayRubricitemitemOutcomeitemResponse123continuenesting ororruns thisruns thisruns thisA straight edge across straight edge across nested typesdefault layoutdefault layoutdefault layout in styleto inside sequence diagramto inside sequence diagramto inside sequence diagramto constant nearfrom within constant nearto another getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)score - + @@ -124,7 +124,7 @@ - + @@ -161,9 +161,9 @@ - - - + + + @@ -183,16 +183,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -208,30 +208,30 @@ - - - - - + + + + + - - - - - + + + + + - - + + @@ -240,7 +240,7 @@ - + diff --git a/e2etests/testdata/stable/nesting_power/elk/board.exp.json b/e2etests/testdata/stable/nesting_power/elk/board.exp.json index 5da7a5e49..ee17bcd78 100644 --- a/e2etests/testdata/stable/nesting_power/elk/board.exp.json +++ b/e2etests/testdata/stable/nesting_power/elk/board.exp.json @@ -8,10 +8,10 @@ "type": "rectangle", "pos": { "x": -2800, - "y": 729 + "y": 733 }, "width": 2792, - "height": 986, + "height": 978, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -131,10 +131,10 @@ "type": "rectangle", "pos": { "x": -1660, - "y": 779 + "y": 783 }, "width": 1602, - "height": 886, + "height": 878, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -295,10 +295,10 @@ "type": "rectangle", "pos": { "x": -1600, - "y": 839 + "y": 843 }, "width": 204, - "height": 766, + "height": 758, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -336,10 +336,10 @@ "type": "rectangle", "pos": { "x": -1356, - "y": 839 + "y": 843 }, "width": 322, - "height": 766, + "height": 758, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -377,7 +377,7 @@ "type": "rectangle", "pos": { "x": -1540, - "y": 899 + "y": 903 }, "width": 84, "height": 66, @@ -418,7 +418,7 @@ "type": "rectangle", "pos": { "x": -1540, - "y": 1005 + "y": 1009 }, "width": 84, "height": 66, @@ -459,7 +459,7 @@ "type": "rectangle", "pos": { "x": -1540, - "y": 1111 + "y": 1115 }, "width": 84, "height": 66, @@ -500,7 +500,7 @@ "type": "rectangle", "pos": { "x": -1540, - "y": 1217 + "y": 1221 }, "width": 84, "height": 66, @@ -541,7 +541,7 @@ "type": "rectangle", "pos": { "x": -1540, - "y": 1323 + "y": 1327 }, "width": 84, "height": 66, @@ -582,10 +582,10 @@ "type": "sequence_diagram", "pos": { "x": -994, - "y": 839 + "y": 843 }, "width": 876, - "height": 766, + "height": 758, "opacity": 1, "strokeDash": 0, "strokeWidth": 0, @@ -623,7 +623,7 @@ "type": "rectangle", "pos": { "x": -982, - "y": 1247 + "y": 1243 }, "width": 100, "height": 66, @@ -664,7 +664,7 @@ "type": "rectangle", "pos": { "x": -832, - "y": 1247 + "y": 1243 }, "width": 100, "height": 66, @@ -705,7 +705,7 @@ "type": "rectangle", "pos": { "x": -692, - "y": 1247 + "y": 1243 }, "width": 168, "height": 66, @@ -746,7 +746,7 @@ "type": "rectangle", "pos": { "x": -614, - "y": 1443 + "y": 1439 }, "width": 12, "height": 90, @@ -786,10 +786,10 @@ "type": "rectangle", "pos": { "x": -484, - "y": 917 + "y": 921 }, "width": 354, - "height": 396, + "height": 388, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -827,7 +827,7 @@ "type": "rectangle", "pos": { "x": -484, - "y": 948 + "y": 952 }, "width": 77, "height": 66, @@ -868,7 +868,7 @@ "type": "rectangle", "pos": { "x": -407, - "y": 948 + "y": 952 }, "width": 277, "height": 66, @@ -909,10 +909,10 @@ "type": "rectangle", "pos": { "x": -484, - "y": 1014 + "y": 1018 }, "width": 77, - "height": 299, + "height": 291, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -950,7 +950,7 @@ "type": "rectangle", "pos": { "x": -474, - "y": 1045 + "y": 1049 }, "width": 53, "height": 66, @@ -991,7 +991,7 @@ "type": "rectangle", "pos": { "x": -474, - "y": 1131 + "y": 1135 }, "width": 53, "height": 66, @@ -1032,7 +1032,7 @@ "type": "rectangle", "pos": { "x": -474, - "y": 1217 + "y": 1221 }, "width": 53, "height": 66, @@ -1073,10 +1073,10 @@ "type": "sequence_diagram", "pos": { "x": -407, - "y": 1014 + "y": 1018 }, "width": 277, - "height": 299, + "height": 291, "opacity": 1, "strokeDash": 0, "strokeWidth": 0, @@ -1114,7 +1114,7 @@ "type": "rectangle", "pos": { "x": -395, - "y": 1087 + "y": 1091 }, "width": 105, "height": 66, @@ -1155,7 +1155,7 @@ "type": "rectangle", "pos": { "x": -242, - "y": 1087 + "y": 1091 }, "width": 100, "height": 66, @@ -1196,7 +1196,7 @@ "type": "rectangle", "pos": { "x": -1306, - "y": 889 + "y": 893 }, "width": 222, "height": 166, @@ -1237,7 +1237,7 @@ "type": "rectangle", "pos": { "x": -1256, - "y": 939 + "y": 943 }, "width": 122, "height": 66, @@ -6517,11 +6517,11 @@ "route": [ { "x": -1498, - "y": 965.5 + "y": 969.5 }, { "x": -1498, - "y": 1005.5 + "y": 1009.5 } ], "animated": false, @@ -6555,11 +6555,11 @@ "route": [ { "x": -1498, - "y": 1071.5 + "y": 1075.5 }, { "x": -1498, - "y": 1111.5 + "y": 1115.5 } ], "animated": false, @@ -6593,11 +6593,11 @@ "route": [ { "x": -1498, - "y": 1177.5 + "y": 1181.5 }, { "x": -1498, - "y": 1217.5 + "y": 1221.5 } ], "animated": false, @@ -6631,11 +6631,11 @@ "route": [ { "x": -1498, - "y": 1283.5 + "y": 1287.5 }, { "x": -1498, - "y": 1323.5 + "y": 1327.5 } ], "animated": false, @@ -6707,11 +6707,11 @@ "route": [ { "x": -932, - "y": 1383.5 + "y": 1379.5 }, { "x": -782, - "y": 1383.5 + "y": 1379.5 } ], "animated": false, @@ -6745,11 +6745,11 @@ "route": [ { "x": -782, - "y": 1453.5 + "y": 1449.5 }, { "x": -614, - "y": 1453.5 + "y": 1449.5 } ], "animated": false, @@ -6783,11 +6783,11 @@ "route": [ { "x": -602, - "y": 1523.5 + "y": 1519.5 }, { "x": -307, - "y": 1523.5 + "y": 1519.5 } ], "animated": false, @@ -6821,11 +6821,11 @@ "route": [ { "x": -447.5, - "y": 1111.5 + "y": 1115.5 }, { "x": -447.5, - "y": 1131.5 + "y": 1135.5 } ], "animated": false, @@ -6859,11 +6859,11 @@ "route": [ { "x": -447.5, - "y": 1197.5 + "y": 1201.5 }, { "x": -447.5, - "y": 1217.5 + "y": 1221.5 } ], "animated": false, @@ -6897,11 +6897,11 @@ "route": [ { "x": -342.5, - "y": 1223.5 + "y": 1227.5 }, { "x": -192, - "y": 1223.5 + "y": 1227.5 } ], "animated": false, @@ -6937,12 +6937,12 @@ "labelPercentage": 0, "route": [ { - "x": -229, - "y": 1153.5 + "x": -230, + "y": 1157.5 }, { "x": -602, - "y": 1483.5 + "y": 1479.5 } ], "animated": false, @@ -6979,11 +6979,11 @@ "route": [ { "x": -1456, - "y": 1029.5 + "y": 1033.5 }, { "x": -1256, - "y": 985.5 + "y": 989.5 } ], "animated": false, @@ -7020,7 +7020,7 @@ "route": [ { "x": -1540, - "y": 1351 + "y": 1355 }, { "x": -2614, @@ -7061,11 +7061,11 @@ "route": [ { "x": -1539.5, - "y": 953.5 + "y": 957.5 }, { "x": -2142.5, - "y": 1261.5 + "y": 1262.5 } ], "animated": false, @@ -9860,7 +9860,7 @@ "route": [ { "x": -1455.75, - "y": 1367 + "y": 1371 }, { "x": 159.25, @@ -9939,11 +9939,11 @@ "route": [ { "x": -932, - "y": 1313.5 + "y": 1309.5 }, { "x": -932, - "y": 1593.5 + "y": 1589.5 } ], "animated": false, @@ -9977,11 +9977,11 @@ "route": [ { "x": -782, - "y": 1313.5 + "y": 1309.5 }, { "x": -782, - "y": 1593.5 + "y": 1589.5 } ], "animated": false, @@ -10015,11 +10015,11 @@ "route": [ { "x": -608, - "y": 1313.5 + "y": 1309.5 }, { "x": -608, - "y": 1593.5 + "y": 1589.5 } ], "animated": false, @@ -10053,11 +10053,11 @@ "route": [ { "x": -307, - "y": 1313.5 + "y": 1309.5 }, { "x": -307, - "y": 1593.5 + "y": 1589.5 } ], "animated": false, @@ -10091,11 +10091,11 @@ "route": [ { "x": -342.5, - "y": 1153.5 + "y": 1157.5 }, { "x": -342.5, - "y": 1293.5 + "y": 1297.5 } ], "animated": false, @@ -10129,11 +10129,11 @@ "route": [ { "x": -192, - "y": 1153.5 + "y": 1157.5 }, { "x": -192, - "y": 1293.5 + "y": 1297.5 } ], "animated": false, diff --git a/e2etests/testdata/stable/nesting_power/elk/sketch.exp.svg b/e2etests/testdata/stable/nesting_power/elk/sketch.exp.svg index 2ec123dcf..aa4d266e5 100644 --- a/e2etests/testdata/stable/nesting_power/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/nesting_power/elk/sketch.exp.svg @@ -1,23 +1,23 @@ - + .d2-1831220497 .fill-N1{fill:#0A0F25;} + .d2-1831220497 .fill-N2{fill:#676C7E;} + .d2-1831220497 .fill-N3{fill:#9499AB;} + .d2-1831220497 .fill-N4{fill:#CFD2DD;} + .d2-1831220497 .fill-N5{fill:#DEE1EB;} + .d2-1831220497 .fill-N6{fill:#EEF1F8;} + .d2-1831220497 .fill-N7{fill:#FFFFFF;} + .d2-1831220497 .fill-B1{fill:#0D32B2;} + .d2-1831220497 .fill-B2{fill:#0D32B2;} + .d2-1831220497 .fill-B3{fill:#E3E9FD;} + .d2-1831220497 .fill-B4{fill:#E3E9FD;} + .d2-1831220497 .fill-B5{fill:#EDF0FD;} + .d2-1831220497 .fill-B6{fill:#F7F8FE;} + .d2-1831220497 .fill-AA2{fill:#4A6FF3;} + .d2-1831220497 .fill-AA4{fill:#EDF0FD;} + .d2-1831220497 .fill-AA5{fill:#F7F8FE;} + .d2-1831220497 .fill-AB4{fill:#EDF0FD;} + .d2-1831220497 .fill-AB5{fill:#F7F8FE;} + .d2-1831220497 .stroke-N1{stroke:#0A0F25;} + .d2-1831220497 .stroke-N2{stroke:#676C7E;} + .d2-1831220497 .stroke-N3{stroke:#9499AB;} + .d2-1831220497 .stroke-N4{stroke:#CFD2DD;} + .d2-1831220497 .stroke-N5{stroke:#DEE1EB;} + .d2-1831220497 .stroke-N6{stroke:#EEF1F8;} + .d2-1831220497 .stroke-N7{stroke:#FFFFFF;} + .d2-1831220497 .stroke-B1{stroke:#0D32B2;} + .d2-1831220497 .stroke-B2{stroke:#0D32B2;} + .d2-1831220497 .stroke-B3{stroke:#E3E9FD;} + .d2-1831220497 .stroke-B4{stroke:#E3E9FD;} + .d2-1831220497 .stroke-B5{stroke:#EDF0FD;} + .d2-1831220497 .stroke-B6{stroke:#F7F8FE;} + .d2-1831220497 .stroke-AA2{stroke:#4A6FF3;} + .d2-1831220497 .stroke-AA4{stroke:#EDF0FD;} + .d2-1831220497 .stroke-AA5{stroke:#F7F8FE;} + .d2-1831220497 .stroke-AB4{stroke:#EDF0FD;} + .d2-1831220497 .stroke-AB5{stroke:#F7F8FE;} + .d2-1831220497 .background-color-N1{background-color:#0A0F25;} + .d2-1831220497 .background-color-N2{background-color:#676C7E;} + .d2-1831220497 .background-color-N3{background-color:#9499AB;} + .d2-1831220497 .background-color-N4{background-color:#CFD2DD;} + .d2-1831220497 .background-color-N5{background-color:#DEE1EB;} + .d2-1831220497 .background-color-N6{background-color:#EEF1F8;} + .d2-1831220497 .background-color-N7{background-color:#FFFFFF;} + .d2-1831220497 .background-color-B1{background-color:#0D32B2;} + .d2-1831220497 .background-color-B2{background-color:#0D32B2;} + .d2-1831220497 .background-color-B3{background-color:#E3E9FD;} + .d2-1831220497 .background-color-B4{background-color:#E3E9FD;} + .d2-1831220497 .background-color-B5{background-color:#EDF0FD;} + .d2-1831220497 .background-color-B6{background-color:#F7F8FE;} + .d2-1831220497 .background-color-AA2{background-color:#4A6FF3;} + .d2-1831220497 .background-color-AA4{background-color:#EDF0FD;} + .d2-1831220497 .background-color-AA5{background-color:#F7F8FE;} + .d2-1831220497 .background-color-AB4{background-color:#EDF0FD;} + .d2-1831220497 .background-color-AB5{background-color:#F7F8FE;} + .d2-1831220497 .color-N1{color:#0A0F25;} + .d2-1831220497 .color-N2{color:#676C7E;} + .d2-1831220497 .color-N3{color:#9499AB;} + .d2-1831220497 .color-N4{color:#CFD2DD;} + .d2-1831220497 .color-N5{color:#DEE1EB;} + .d2-1831220497 .color-N6{color:#EEF1F8;} + .d2-1831220497 .color-N7{color:#FFFFFF;} + .d2-1831220497 .color-B1{color:#0D32B2;} + .d2-1831220497 .color-B2{color:#0D32B2;} + .d2-1831220497 .color-B3{color:#E3E9FD;} + .d2-1831220497 .color-B4{color:#E3E9FD;} + .d2-1831220497 .color-B5{color:#EDF0FD;} + .d2-1831220497 .color-B6{color:#F7F8FE;} + .d2-1831220497 .color-AA2{color:#4A6FF3;} + .d2-1831220497 .color-AA4{color:#EDF0FD;} + .d2-1831220497 .color-AA5{color:#F7F8FE;} + .d2-1831220497 .color-AB4{color:#EDF0FD;} + .d2-1831220497 .color-AB5{color:#F7F8FE;}.appendix text.text{fill:#0A0F25}.md{--color-fg-default:#0A0F25;--color-fg-muted:#676C7E;--color-fg-subtle:#9499AB;--color-canvas-default:#FFFFFF;--color-canvas-subtle:#EEF1F8;--color-border-default:#0D32B2;--color-border-muted:#0D32B2;--color-neutral-muted:#EEF1F8;--color-accent-fg:#0D32B2;--color-accent-emphasis:#0D32B2;--color-attention-subtle:#676C7E;--color-danger-fg:red;}.sketch-overlay-B1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B2{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-B3{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-B6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-AA4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AA5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB4{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-AB5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N1{fill:url(#streaks-darker);mix-blend-mode:lighten}.sketch-overlay-N2{fill:url(#streaks-dark);mix-blend-mode:overlay}.sketch-overlay-N3{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N4{fill:url(#streaks-normal);mix-blend-mode:color-burn}.sketch-overlay-N5{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N6{fill:url(#streaks-bright);mix-blend-mode:darken}.sketch-overlay-N7{fill:url(#streaks-bright);mix-blend-mode:darken}.light-code{display: block}.dark-code{display: none}]]> @@ -111,11 +111,11 @@ -Left Constant NearcenterdirectionsRight Constant NearseqmoreBottom Left Constant Neardefaultlayouthererectanglesquarepageparallelogramdocumentcylinderqueuepackagestepcalloutstored_datapersondiamondovalcirclehexagoncloudrightleftisconstantandalsogridscoreritemResponseitemessayRubricconceptitemOutcomestylishcontaineradagreelktalathisisgrid12341234updownnearax +Left Constant NearcenterdirectionsRight Constant NearseqmoreBottom Left Constant Neardefaultlayouthererectanglesquarepageparallelogramdocumentcylinderqueuepackagestepcalloutstored_datapersondiamondovalcirclehexagoncloudrightleftisconstantandalsogridscoreritemResponseitemessayRubricconceptitemOutcomestylishcontaineradagreelktalathisisgrid12341234updownnearax -ya_sequencea_shapesequencefinallybrow 1row 2row 3row 4row 5withasequence diagramyou canchild of is12341234scoreritemResponseitemessayRubricconceptsequencefrom one constant nearhaveanothergridhere andgrandchildscorerconceptessayRubricitemitemOutcomeitemResponse123continuenesting ororruns thisruns thisruns thisA straight edge across straight edge across nested typesdefault layoutdefault layoutdefault layout in styleto inside sequence diagramto inside sequence diagramto inside sequence diagramto constant nearfrom within constant nearto another getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)score +ya_sequencea_shapesequencefinallybrow 1row 2row 3row 4row 5withasequence diagramyou canchild of is12341234scoreritemResponseitemessayRubricconceptsequencefrom one constant nearhaveanothergridhere andgrandchildscorerconceptessayRubricitemitemOutcomeitemResponse123continuenesting ororruns thisruns thisruns thisA straight edge across straight edge across nested typesdefault layoutdefault layoutdefault layout in styleto inside sequence diagramto inside sequence diagramto inside sequence diagramto constant nearfrom within constant nearto another getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)score - + @@ -124,7 +124,7 @@ - + @@ -161,9 +161,9 @@ - - - + + + @@ -183,16 +183,16 @@ - - - - - - - - - - + + + + + + + + + + @@ -208,30 +208,30 @@ - - - - - + + + + + - - - - - + + + + + - - + + @@ -240,7 +240,7 @@ - + From 5b4818aefaf3dd09c89bb886994e5468f53686fc Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Thu, 5 Oct 2023 18:57:04 -0700 Subject: [PATCH 5/5] changelog --- ci/release/changelogs/next.md | 1 + 1 file changed, 1 insertion(+) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index d0c8a972a..9c2df2e84 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -7,4 +7,5 @@ #### Bugfixes ⛑️ +- Fixes a bug calculating grid height with only grid-rows and different horizontal-gap and vertical-gap values. [#1646](https://github.com/terrastruct/d2/pull/1646) - Grid layout now accounts for each cell's outside labels and icons [#1624](https://github.com/terrastruct/d2/pull/1624)