From 4bfbaba301fa933953e21835e6806c3166cf1bfe Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Mon, 10 Apr 2023 10:33:40 -0700 Subject: [PATCH 1/4] add grid_in_constant_near test --- e2etests/regression_test.go | 14 + .../dagre/board.exp.json | 294 ++++++++++++++++++ .../dagre/sketch.exp.svg | 102 ++++++ .../grid_in_constant_near/elk/board.exp.json | 294 ++++++++++++++++++ .../grid_in_constant_near/elk/sketch.exp.svg | 102 ++++++ 5 files changed, 806 insertions(+) create mode 100644 e2etests/testdata/regression/grid_in_constant_near/dagre/board.exp.json create mode 100644 e2etests/testdata/regression/grid_in_constant_near/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/regression/grid_in_constant_near/elk/board.exp.json create mode 100644 e2etests/testdata/regression/grid_in_constant_near/elk/sketch.exp.svg diff --git a/e2etests/regression_test.go b/e2etests/regression_test.go index def1627c1e..7582801348 100644 --- a/e2etests/regression_test.go +++ b/e2etests/regression_test.go @@ -654,6 +654,20 @@ x -> y: sync y -> z: sync { style.bold: true } +`, + }, + { + name: "grid_in_constant_near", + script: ` +a +b +c +x: { + near: top-right + grid-columns: 1 + y + z +} `, }, } diff --git a/e2etests/testdata/regression/grid_in_constant_near/dagre/board.exp.json b/e2etests/testdata/regression/grid_in_constant_near/dagre/board.exp.json new file mode 100644 index 0000000000..8da9c38848 --- /dev/null +++ b/e2etests/testdata/regression/grid_in_constant_near/dagre/board.exp.json @@ -0,0 +1,294 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "a", + "type": "rectangle", + "pos": { + "x": 0, + "y": 0 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "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": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b", + "type": "rectangle", + "pos": { + "x": 113, + "y": 0 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "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": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "c", + "type": "rectangle", + "pos": { + "x": 226, + "y": 0 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "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": "c", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "x", + "type": "rectangle", + "pos": { + "x": 299, + "y": -145 + }, + "width": 246, + "height": 125, + "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": "x", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 13, + "labelHeight": 36, + "labelPosition": "OUTSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "x.y", + "type": "rectangle", + "pos": { + "x": 339, + "y": -115 + }, + "width": 54, + "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": "y", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "x.z", + "type": "rectangle", + "pos": { + "x": 453, + "y": -115 + }, + "width": 52, + "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": "z", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 7, + "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_in_constant_near/dagre/sketch.exp.svg b/e2etests/testdata/regression/grid_in_constant_near/dagre/sketch.exp.svg new file mode 100644 index 0000000000..928b164a0e --- /dev/null +++ b/e2etests/testdata/regression/grid_in_constant_near/dagre/sketch.exp.svg @@ -0,0 +1,102 @@ +abcxyz + + + \ No newline at end of file diff --git a/e2etests/testdata/regression/grid_in_constant_near/elk/board.exp.json b/e2etests/testdata/regression/grid_in_constant_near/elk/board.exp.json new file mode 100644 index 0000000000..f4ce68389d --- /dev/null +++ b/e2etests/testdata/regression/grid_in_constant_near/elk/board.exp.json @@ -0,0 +1,294 @@ +{ + "name": "", + "isFolderOnly": false, + "fontFamily": "SourceSansPro", + "shapes": [ + { + "id": "a", + "type": "rectangle", + "pos": { + "x": 12, + "y": 12 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "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": "a", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "b", + "type": "rectangle", + "pos": { + "x": 85, + "y": 12 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "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": "b", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "c", + "type": "rectangle", + "pos": { + "x": 158, + "y": 12 + }, + "width": 53, + "height": 66, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "B6", + "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": "c", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 8, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "x", + "type": "rectangle", + "pos": { + "x": 231, + "y": -174 + }, + "width": 226, + "height": 166, + "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": "x", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 13, + "labelHeight": 36, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "x.y", + "type": "rectangle", + "pos": { + "x": 281, + "y": -124 + }, + "width": 54, + "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": "y", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 9, + "labelHeight": 21, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "x.z", + "type": "rectangle", + "pos": { + "x": 355, + "y": -124 + }, + "width": 52, + "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": "z", + "fontSize": 16, + "fontFamily": "DEFAULT", + "language": "", + "color": "N1", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 7, + "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_in_constant_near/elk/sketch.exp.svg b/e2etests/testdata/regression/grid_in_constant_near/elk/sketch.exp.svg new file mode 100644 index 0000000000..094a4fa5c9 --- /dev/null +++ b/e2etests/testdata/regression/grid_in_constant_near/elk/sketch.exp.svg @@ -0,0 +1,102 @@ +abcxyz + + + \ No newline at end of file From 55438280205f145ff4d8c59b8359146679ff9135 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Mon, 10 Apr 2023 10:34:12 -0700 Subject: [PATCH 2/4] fix layout of grid in constant near --- d2lib/d2.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/d2lib/d2.go b/d2lib/d2.go index 5b497b5942..10fbb02e78 100644 --- a/d2lib/d2.go +++ b/d2lib/d2.go @@ -71,15 +71,15 @@ func compile(ctx context.Context, g *d2graph.Graph, opts *CompileOptions) (*d2ta constantNearGraphs := d2near.WithoutConstantNears(ctx, g) + layoutWithGrids := d2grid.Layout(ctx, g, coreLayout) + // run core layout for constantNears for _, tempGraph := range constantNearGraphs { - if err = coreLayout(ctx, tempGraph); err != nil { + if err = layoutWithGrids(ctx, tempGraph); err != nil { return nil, err } } - layoutWithGrids := d2grid.Layout(ctx, g, coreLayout) - err = d2sequence.Layout(ctx, g, layoutWithGrids) if err != nil { return nil, err From ab8b163aab98a423a2d2b9d56978432813a3bdc2 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Mon, 10 Apr 2023 10:35:16 -0700 Subject: [PATCH 3/4] update test --- .../dagre/board.exp.json | 18 +- .../dagre/sketch.exp.svg | 160 +++++++++--------- .../grid_in_constant_near/elk/board.exp.json | 16 +- .../grid_in_constant_near/elk/sketch.exp.svg | 160 +++++++++--------- 4 files changed, 177 insertions(+), 177 deletions(-) diff --git a/e2etests/testdata/regression/grid_in_constant_near/dagre/board.exp.json b/e2etests/testdata/regression/grid_in_constant_near/dagre/board.exp.json index 8da9c38848..898fb18cf7 100644 --- a/e2etests/testdata/regression/grid_in_constant_near/dagre/board.exp.json +++ b/e2etests/testdata/regression/grid_in_constant_near/dagre/board.exp.json @@ -131,10 +131,10 @@ "type": "rectangle", "pos": { "x": 299, - "y": -145 + "y": -312 }, - "width": 246, - "height": 125, + "width": 174, + "height": 292, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -163,7 +163,7 @@ "underline": false, "labelWidth": 13, "labelHeight": 36, - "labelPosition": "OUTSIDE_TOP_CENTER", + "labelPosition": "INSIDE_TOP_CENTER", "zIndex": 0, "level": 1 }, @@ -171,8 +171,8 @@ "id": "x.y", "type": "rectangle", "pos": { - "x": 339, - "y": -115 + "x": 359, + "y": -252 }, "width": 54, "height": 66, @@ -212,10 +212,10 @@ "id": "x.z", "type": "rectangle", "pos": { - "x": 453, - "y": -115 + "x": 359, + "y": -146 }, - "width": 52, + "width": 54, "height": 66, "opacity": 1, "strokeDash": 0, diff --git a/e2etests/testdata/regression/grid_in_constant_near/dagre/sketch.exp.svg b/e2etests/testdata/regression/grid_in_constant_near/dagre/sketch.exp.svg index 928b164a0e..a3c543ab78 100644 --- a/e2etests/testdata/regression/grid_in_constant_near/dagre/sketch.exp.svg +++ b/e2etests/testdata/regression/grid_in_constant_near/dagre/sketch.exp.svg @@ -1,16 +1,16 @@ -abcxyz - + .d2-1887656548 .fill-N1{fill:#0A0F25;} + .d2-1887656548 .fill-N2{fill:#676C7E;} + .d2-1887656548 .fill-N3{fill:#9499AB;} + .d2-1887656548 .fill-N4{fill:#CFD2DD;} + .d2-1887656548 .fill-N5{fill:#DEE1EB;} + .d2-1887656548 .fill-N6{fill:#EEF1F8;} + .d2-1887656548 .fill-N7{fill:#FFFFFF;} + .d2-1887656548 .fill-B1{fill:#0D32B2;} + .d2-1887656548 .fill-B2{fill:#0D32B2;} + .d2-1887656548 .fill-B3{fill:#E3E9FD;} + .d2-1887656548 .fill-B4{fill:#E3E9FD;} + .d2-1887656548 .fill-B5{fill:#EDF0FD;} + .d2-1887656548 .fill-B6{fill:#F7F8FE;} + .d2-1887656548 .fill-AA2{fill:#4A6FF3;} + .d2-1887656548 .fill-AA4{fill:#EDF0FD;} + .d2-1887656548 .fill-AA5{fill:#F7F8FE;} + .d2-1887656548 .fill-AB4{fill:#EDF0FD;} + .d2-1887656548 .fill-AB5{fill:#F7F8FE;} + .d2-1887656548 .stroke-N1{stroke:#0A0F25;} + .d2-1887656548 .stroke-N2{stroke:#676C7E;} + .d2-1887656548 .stroke-N3{stroke:#9499AB;} + .d2-1887656548 .stroke-N4{stroke:#CFD2DD;} + .d2-1887656548 .stroke-N5{stroke:#DEE1EB;} + .d2-1887656548 .stroke-N6{stroke:#EEF1F8;} + .d2-1887656548 .stroke-N7{stroke:#FFFFFF;} + .d2-1887656548 .stroke-B1{stroke:#0D32B2;} + .d2-1887656548 .stroke-B2{stroke:#0D32B2;} + .d2-1887656548 .stroke-B3{stroke:#E3E9FD;} + .d2-1887656548 .stroke-B4{stroke:#E3E9FD;} + .d2-1887656548 .stroke-B5{stroke:#EDF0FD;} + .d2-1887656548 .stroke-B6{stroke:#F7F8FE;} + .d2-1887656548 .stroke-AA2{stroke:#4A6FF3;} + .d2-1887656548 .stroke-AA4{stroke:#EDF0FD;} + .d2-1887656548 .stroke-AA5{stroke:#F7F8FE;} + .d2-1887656548 .stroke-AB4{stroke:#EDF0FD;} + .d2-1887656548 .stroke-AB5{stroke:#F7F8FE;} + .d2-1887656548 .background-color-N1{background-color:#0A0F25;} + .d2-1887656548 .background-color-N2{background-color:#676C7E;} + .d2-1887656548 .background-color-N3{background-color:#9499AB;} + .d2-1887656548 .background-color-N4{background-color:#CFD2DD;} + .d2-1887656548 .background-color-N5{background-color:#DEE1EB;} + .d2-1887656548 .background-color-N6{background-color:#EEF1F8;} + .d2-1887656548 .background-color-N7{background-color:#FFFFFF;} + .d2-1887656548 .background-color-B1{background-color:#0D32B2;} + .d2-1887656548 .background-color-B2{background-color:#0D32B2;} + .d2-1887656548 .background-color-B3{background-color:#E3E9FD;} + .d2-1887656548 .background-color-B4{background-color:#E3E9FD;} + .d2-1887656548 .background-color-B5{background-color:#EDF0FD;} + .d2-1887656548 .background-color-B6{background-color:#F7F8FE;} + .d2-1887656548 .background-color-AA2{background-color:#4A6FF3;} + .d2-1887656548 .background-color-AA4{background-color:#EDF0FD;} + .d2-1887656548 .background-color-AA5{background-color:#F7F8FE;} + .d2-1887656548 .background-color-AB4{background-color:#EDF0FD;} + .d2-1887656548 .background-color-AB5{background-color:#F7F8FE;} + .d2-1887656548 .color-N1{color:#0A0F25;} + .d2-1887656548 .color-N2{color:#676C7E;} + .d2-1887656548 .color-N3{color:#9499AB;} + .d2-1887656548 .color-N4{color:#CFD2DD;} + .d2-1887656548 .color-N5{color:#DEE1EB;} + .d2-1887656548 .color-N6{color:#EEF1F8;} + .d2-1887656548 .color-N7{color:#FFFFFF;} + .d2-1887656548 .color-B1{color:#0D32B2;} + .d2-1887656548 .color-B2{color:#0D32B2;} + .d2-1887656548 .color-B3{color:#E3E9FD;} + .d2-1887656548 .color-B4{color:#E3E9FD;} + .d2-1887656548 .color-B5{color:#EDF0FD;} + .d2-1887656548 .color-B6{color:#F7F8FE;} + .d2-1887656548 .color-AA2{color:#4A6FF3;} + .d2-1887656548 .color-AA4{color:#EDF0FD;} + .d2-1887656548 .color-AA5{color:#F7F8FE;} + .d2-1887656548 .color-AB4{color:#EDF0FD;} + .d2-1887656548 .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}]]>abcxyz + \ No newline at end of file diff --git a/e2etests/testdata/regression/grid_in_constant_near/elk/board.exp.json b/e2etests/testdata/regression/grid_in_constant_near/elk/board.exp.json index f4ce68389d..8e4a35f1c6 100644 --- a/e2etests/testdata/regression/grid_in_constant_near/elk/board.exp.json +++ b/e2etests/testdata/regression/grid_in_constant_near/elk/board.exp.json @@ -131,10 +131,10 @@ "type": "rectangle", "pos": { "x": 231, - "y": -174 + "y": -300 }, - "width": 226, - "height": 166, + "width": 174, + "height": 292, "opacity": 1, "strokeDash": 0, "strokeWidth": 2, @@ -171,8 +171,8 @@ "id": "x.y", "type": "rectangle", "pos": { - "x": 281, - "y": -124 + "x": 291, + "y": -240 }, "width": 54, "height": 66, @@ -212,10 +212,10 @@ "id": "x.z", "type": "rectangle", "pos": { - "x": 355, - "y": -124 + "x": 291, + "y": -134 }, - "width": 52, + "width": 54, "height": 66, "opacity": 1, "strokeDash": 0, diff --git a/e2etests/testdata/regression/grid_in_constant_near/elk/sketch.exp.svg b/e2etests/testdata/regression/grid_in_constant_near/elk/sketch.exp.svg index 094a4fa5c9..dea8e209dd 100644 --- a/e2etests/testdata/regression/grid_in_constant_near/elk/sketch.exp.svg +++ b/e2etests/testdata/regression/grid_in_constant_near/elk/sketch.exp.svg @@ -1,16 +1,16 @@ -abcxyz - + .d2-1071213895 .fill-N1{fill:#0A0F25;} + .d2-1071213895 .fill-N2{fill:#676C7E;} + .d2-1071213895 .fill-N3{fill:#9499AB;} + .d2-1071213895 .fill-N4{fill:#CFD2DD;} + .d2-1071213895 .fill-N5{fill:#DEE1EB;} + .d2-1071213895 .fill-N6{fill:#EEF1F8;} + .d2-1071213895 .fill-N7{fill:#FFFFFF;} + .d2-1071213895 .fill-B1{fill:#0D32B2;} + .d2-1071213895 .fill-B2{fill:#0D32B2;} + .d2-1071213895 .fill-B3{fill:#E3E9FD;} + .d2-1071213895 .fill-B4{fill:#E3E9FD;} + .d2-1071213895 .fill-B5{fill:#EDF0FD;} + .d2-1071213895 .fill-B6{fill:#F7F8FE;} + .d2-1071213895 .fill-AA2{fill:#4A6FF3;} + .d2-1071213895 .fill-AA4{fill:#EDF0FD;} + .d2-1071213895 .fill-AA5{fill:#F7F8FE;} + .d2-1071213895 .fill-AB4{fill:#EDF0FD;} + .d2-1071213895 .fill-AB5{fill:#F7F8FE;} + .d2-1071213895 .stroke-N1{stroke:#0A0F25;} + .d2-1071213895 .stroke-N2{stroke:#676C7E;} + .d2-1071213895 .stroke-N3{stroke:#9499AB;} + .d2-1071213895 .stroke-N4{stroke:#CFD2DD;} + .d2-1071213895 .stroke-N5{stroke:#DEE1EB;} + .d2-1071213895 .stroke-N6{stroke:#EEF1F8;} + .d2-1071213895 .stroke-N7{stroke:#FFFFFF;} + .d2-1071213895 .stroke-B1{stroke:#0D32B2;} + .d2-1071213895 .stroke-B2{stroke:#0D32B2;} + .d2-1071213895 .stroke-B3{stroke:#E3E9FD;} + .d2-1071213895 .stroke-B4{stroke:#E3E9FD;} + .d2-1071213895 .stroke-B5{stroke:#EDF0FD;} + .d2-1071213895 .stroke-B6{stroke:#F7F8FE;} + .d2-1071213895 .stroke-AA2{stroke:#4A6FF3;} + .d2-1071213895 .stroke-AA4{stroke:#EDF0FD;} + .d2-1071213895 .stroke-AA5{stroke:#F7F8FE;} + .d2-1071213895 .stroke-AB4{stroke:#EDF0FD;} + .d2-1071213895 .stroke-AB5{stroke:#F7F8FE;} + .d2-1071213895 .background-color-N1{background-color:#0A0F25;} + .d2-1071213895 .background-color-N2{background-color:#676C7E;} + .d2-1071213895 .background-color-N3{background-color:#9499AB;} + .d2-1071213895 .background-color-N4{background-color:#CFD2DD;} + .d2-1071213895 .background-color-N5{background-color:#DEE1EB;} + .d2-1071213895 .background-color-N6{background-color:#EEF1F8;} + .d2-1071213895 .background-color-N7{background-color:#FFFFFF;} + .d2-1071213895 .background-color-B1{background-color:#0D32B2;} + .d2-1071213895 .background-color-B2{background-color:#0D32B2;} + .d2-1071213895 .background-color-B3{background-color:#E3E9FD;} + .d2-1071213895 .background-color-B4{background-color:#E3E9FD;} + .d2-1071213895 .background-color-B5{background-color:#EDF0FD;} + .d2-1071213895 .background-color-B6{background-color:#F7F8FE;} + .d2-1071213895 .background-color-AA2{background-color:#4A6FF3;} + .d2-1071213895 .background-color-AA4{background-color:#EDF0FD;} + .d2-1071213895 .background-color-AA5{background-color:#F7F8FE;} + .d2-1071213895 .background-color-AB4{background-color:#EDF0FD;} + .d2-1071213895 .background-color-AB5{background-color:#F7F8FE;} + .d2-1071213895 .color-N1{color:#0A0F25;} + .d2-1071213895 .color-N2{color:#676C7E;} + .d2-1071213895 .color-N3{color:#9499AB;} + .d2-1071213895 .color-N4{color:#CFD2DD;} + .d2-1071213895 .color-N5{color:#DEE1EB;} + .d2-1071213895 .color-N6{color:#EEF1F8;} + .d2-1071213895 .color-N7{color:#FFFFFF;} + .d2-1071213895 .color-B1{color:#0D32B2;} + .d2-1071213895 .color-B2{color:#0D32B2;} + .d2-1071213895 .color-B3{color:#E3E9FD;} + .d2-1071213895 .color-B4{color:#E3E9FD;} + .d2-1071213895 .color-B5{color:#EDF0FD;} + .d2-1071213895 .color-B6{color:#F7F8FE;} + .d2-1071213895 .color-AA2{color:#4A6FF3;} + .d2-1071213895 .color-AA4{color:#EDF0FD;} + .d2-1071213895 .color-AA5{color:#F7F8FE;} + .d2-1071213895 .color-AB4{color:#EDF0FD;} + .d2-1071213895 .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}]]>abcxyz + \ No newline at end of file From 5caf3a49f4b9de99690fe56fc28df78b549276be Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Mon, 10 Apr 2023 10:38:21 -0700 Subject: [PATCH 4/4] changelog --- ci/release/changelogs/next.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index f3c0d2a774..ea4bee246d 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -3,3 +3,5 @@ #### Improvements 🧹 #### Bugfixes ⛑️ + +- Fixes grid layouts not applying on objects with a constant near [#1173](https://github.com/terrastruct/d2/issues/1173)