From 15a64b2333f77b5b3da731b30923fb2fa9f51c8e Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Tue, 20 Dec 2022 12:54:24 -0800 Subject: [PATCH 1/8] add elk_alignment regression test --- e2etests/regression_test.go | 79 ++ .../elk_alignment/dagre/board.exp.json | 951 ++++++++++++++++++ .../elk_alignment/dagre/sketch.exp.svg | 52 + .../elk_alignment/elk/board.exp.json | 879 ++++++++++++++++ .../elk_alignment/elk/sketch.exp.svg | 52 + 5 files changed, 2013 insertions(+) create mode 100644 e2etests/testdata/regression/elk_alignment/dagre/board.exp.json create mode 100644 e2etests/testdata/regression/elk_alignment/dagre/sketch.exp.svg create mode 100644 e2etests/testdata/regression/elk_alignment/elk/board.exp.json create mode 100644 e2etests/testdata/regression/elk_alignment/elk/sketch.exp.svg diff --git a/e2etests/regression_test.go b/e2etests/regression_test.go index 7df5efff3..d115f1ba0 100644 --- a/e2etests/regression_test.go +++ b/e2etests/regression_test.go @@ -69,6 +69,85 @@ table_constrained: sql_table_constrained_overflow { constraint: foreign_key } } +`, + }, + { + name: "elk_alignment", + script: ` +direction: down + +build_workflow: lambda-build.yaml { + + push: Push to main branch { + style.font-size: 25 + } + + GHA: GitHub Actions { + style.font-size: 25 + } + + S3.style.font-size: 25 + Terraform.style.font-size: 25 + AWS.style.font-size: 25 + + push -> GHA: Triggers { + style.font-size: 20 + } + + GHA -> S3: Builds zip and pushes it { + style.font-size: 20 + } + + S3 <-> Terraform: Pulls zip to deploy { + style.font-size: 20 + } + + Terraform -> AWS: Changes live lambdas { + style.font-size: 20 + } +} + +deploy_workflow: lambda-deploy.yaml { + + manual: Manual Trigger { + style.font-size: 25 + } + + GHA: GitHub Actions { + style.font-size: 25 + } + + AWS.style.font-size: 25 + + Manual -> GHA: Launches { + style.font-size: 20 + } + + GHA -> AWS: Builds zip\npushes them to S3.\n\nDeploys lambdas\nusing Terraform { + style.font-size: 20 + } +} + +apollo_workflow: apollo-deploy.yaml { + + apollo: Apollo Repo { + style.font-size: 25 + } + + GHA: GitHub Actions { + style.font-size: 25 + } + + AWS.style.font-size: 25 + + apollo -> GHA: Triggered manually/push to master test test test test test test test { + style.font-size: 20 + } + + GHA -> AWS: test { + style.font-size: 20 + } +} `, }, } diff --git a/e2etests/testdata/regression/elk_alignment/dagre/board.exp.json b/e2etests/testdata/regression/elk_alignment/dagre/board.exp.json new file mode 100644 index 000000000..8a8cda91a --- /dev/null +++ b/e2etests/testdata/regression/elk_alignment/dagre/board.exp.json @@ -0,0 +1,951 @@ +{ + "name": "", + "shapes": [ + { + "id": "build_workflow", + "type": "", + "pos": { + "x": 0, + "y": 0 + }, + "width": 430, + "height": 1235, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#E3E9FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "lambda-build.yaml", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 226, + "labelHeight": 41, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "build_workflow.push", + "type": "", + "pos": { + "x": 50, + "y": 50 + }, + "width": 330, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "Push to main branch", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 230, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "build_workflow.GHA", + "type": "", + "pos": { + "x": 81, + "y": 287 + }, + "width": 269, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "GitHub Actions", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 169, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "build_workflow.S3", + "type": "", + "pos": { + "x": 150, + "y": 524 + }, + "width": 131, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "S3", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 31, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "build_workflow.Terraform", + "type": "", + "pos": { + "x": 106, + "y": 811 + }, + "width": 218, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "Terraform", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 118, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "build_workflow.AWS", + "type": "", + "pos": { + "x": 138, + "y": 1048 + }, + "width": 155, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "AWS", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 55, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "deploy_workflow", + "type": "", + "pos": { + "x": 470, + "y": 0 + }, + "width": 371, + "height": 711, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#E3E9FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "lambda-deploy.yaml", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 247, + "labelHeight": 41, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "deploy_workflow.manual", + "type": "", + "pos": { + "x": 520, + "y": 50 + }, + "width": 271, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "Manual Trigger", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 171, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "deploy_workflow.GHA", + "type": "", + "pos": { + "x": 521, + "y": 287 + }, + "width": 269, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "GitHub Actions", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 169, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "deploy_workflow.AWS", + "type": "", + "pos": { + "x": 578, + "y": 524 + }, + "width": 155, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "AWS", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 55, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "apollo_workflow", + "type": "", + "pos": { + "x": 881, + "y": 0 + }, + "width": 369, + "height": 711, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#E3E9FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "apollo-deploy.yaml", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 232, + "labelHeight": 41, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "apollo_workflow.apollo", + "type": "", + "pos": { + "x": 947, + "y": 50 + }, + "width": 238, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "Apollo Repo", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 138, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "apollo_workflow.GHA", + "type": "", + "pos": { + "x": 931, + "y": 287 + }, + "width": 269, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "GitHub Actions", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 169, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "apollo_workflow.AWS", + "type": "", + "pos": { + "x": 988, + "y": 524 + }, + "width": 155, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "AWS", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 55, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + } + ], + "connections": [ + { + "id": "build_workflow.(push -> GHA)[0]", + "src": "build_workflow.push", + "srcArrow": "none", + "srcLabel": "", + "dst": "build_workflow.GHA", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "Triggers", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 215, + "y": 187 + }, + { + "x": 215, + "y": 227 + }, + { + "x": 215, + "y": 247 + }, + { + "x": 215, + "y": 287 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "build_workflow.(GHA -> S3)[0]", + "src": "build_workflow.GHA", + "srcArrow": "none", + "srcLabel": "", + "dst": "build_workflow.S3", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "Builds zip and pushes it", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 192, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 215, + "y": 424 + }, + { + "x": 215, + "y": 464 + }, + { + "x": 215, + "y": 484 + }, + { + "x": 215, + "y": 524 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "build_workflow.(S3 <-> Terraform)[0]", + "src": "build_workflow.S3", + "srcArrow": "triangle", + "srcLabel": "", + "dst": "build_workflow.Terraform", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "Pulls zip to deploy", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 149, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 215, + "y": 661 + }, + { + "x": 215, + "y": 701 + }, + { + "x": 215, + "y": 771 + }, + { + "x": 215, + "y": 811 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "build_workflow.(Terraform -> AWS)[0]", + "src": "build_workflow.Terraform", + "srcArrow": "none", + "srcLabel": "", + "dst": "build_workflow.AWS", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "Changes live lambdas", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 179, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 215, + "y": 948 + }, + { + "x": 215, + "y": 988 + }, + { + "x": 215, + "y": 1008 + }, + { + "x": 215, + "y": 1048 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "deploy_workflow.(manual -> GHA)[0]", + "src": "deploy_workflow.manual", + "srcArrow": "none", + "srcLabel": "", + "dst": "deploy_workflow.GHA", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "Launches", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 78, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 655.5, + "y": 187 + }, + { + "x": 655.5, + "y": 227 + }, + { + "x": 655.5, + "y": 247 + }, + { + "x": 655.5, + "y": 287 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "deploy_workflow.(GHA -> AWS)[0]", + "src": "deploy_workflow.GHA", + "srcArrow": "none", + "srcLabel": "", + "dst": "deploy_workflow.AWS", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "Builds zip\npushes them to S3.\n\nDeploys lambdas\nusing Terraform", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 153, + "labelHeight": 106, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 655.5, + "y": 424 + }, + { + "x": 655.5, + "y": 464 + }, + { + "x": 655.5, + "y": 484 + }, + { + "x": 655.5, + "y": 524 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "apollo_workflow.(apollo -> GHA)[0]", + "src": "apollo_workflow.apollo", + "srcArrow": "none", + "srcLabel": "", + "dst": "apollo_workflow.GHA", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "Triggered manually/push to master test test test test test test test", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 533, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 1065.5, + "y": 187 + }, + { + "x": 1065.5, + "y": 227 + }, + { + "x": 1065.5, + "y": 247 + }, + { + "x": 1065.5, + "y": 287 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "apollo_workflow.(GHA -> AWS)[0]", + "src": "apollo_workflow.GHA", + "srcArrow": "none", + "srcLabel": "", + "dst": "apollo_workflow.AWS", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "test", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 31, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 1065.5, + "y": 424 + }, + { + "x": 1065.5, + "y": 464 + }, + { + "x": 1065.5, + "y": 484 + }, + { + "x": 1065.5, + "y": 524 + } + ], + "isCurve": true, + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ] +} diff --git a/e2etests/testdata/regression/elk_alignment/dagre/sketch.exp.svg b/e2etests/testdata/regression/elk_alignment/dagre/sketch.exp.svg new file mode 100644 index 000000000..c2f959670 --- /dev/null +++ b/e2etests/testdata/regression/elk_alignment/dagre/sketch.exp.svg @@ -0,0 +1,52 @@ + +lambda-build.yamllambda-deploy.yamlapollo-deploy.yamlPush to main branchGitHub ActionsS3TerraformAWSManual TriggerGitHub ActionsAWSApollo RepoGitHub ActionsAWS TriggersBuilds zip and pushes it Pulls zip to deployChanges live lambdasLaunchesBuilds zippushes them to S3. Deploys lambdasusing TerraformTriggered manually/push to master test test test test test test testtest + + + + + + + + + + \ No newline at end of file diff --git a/e2etests/testdata/regression/elk_alignment/elk/board.exp.json b/e2etests/testdata/regression/elk_alignment/elk/board.exp.json new file mode 100644 index 000000000..f5e8e3e4a --- /dev/null +++ b/e2etests/testdata/regression/elk_alignment/elk/board.exp.json @@ -0,0 +1,879 @@ +{ + "name": "", + "shapes": [ + { + "id": "build_workflow", + "type": "", + "pos": { + "x": 852, + "y": 12 + }, + "width": 509, + "height": 1099, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#E3E9FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "lambda-build.yaml", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 226, + "labelHeight": 41, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "build_workflow.push", + "type": "", + "pos": { + "x": 956, + "y": 87 + }, + "width": 330, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "Push to main branch", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 230, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "build_workflow.GHA", + "type": "", + "pos": { + "x": 987, + "y": 290 + }, + "width": 269, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "GitHub Actions", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 169, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "build_workflow.S3", + "type": "", + "pos": { + "x": 1056, + "y": 493 + }, + "width": 131, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "S3", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 31, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "build_workflow.Terraform", + "type": "", + "pos": { + "x": 1012, + "y": 696 + }, + "width": 218, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "Terraform", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 118, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "build_workflow.AWS", + "type": "", + "pos": { + "x": 1044, + "y": 899 + }, + "width": 155, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "AWS", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 55, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "deploy_workflow", + "type": "", + "pos": { + "x": 1381, + "y": 175 + }, + "width": 440, + "height": 773, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#E3E9FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "lambda-deploy.yaml", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 247, + "labelHeight": 41, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "deploy_workflow.manual", + "type": "", + "pos": { + "x": 1476, + "y": 250 + }, + "width": 271, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "Manual Trigger", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 171, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "deploy_workflow.GHA", + "type": "", + "pos": { + "x": 1477, + "y": 453 + }, + "width": 269, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "GitHub Actions", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 169, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "deploy_workflow.AWS", + "type": "", + "pos": { + "x": 1534, + "y": 736 + }, + "width": 155, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "AWS", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 55, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "apollo_workflow", + "type": "", + "pos": { + "x": 12, + "y": 215 + }, + "width": 819, + "height": 693, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#E3E9FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "apollo-deploy.yaml", + "fontSize": 28, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": false, + "underline": false, + "labelWidth": 232, + "labelHeight": 41, + "labelPosition": "INSIDE_TOP_CENTER", + "zIndex": 0, + "level": 1 + }, + { + "id": "apollo_workflow.apollo", + "type": "", + "pos": { + "x": 503, + "y": 290 + }, + "width": 238, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "Apollo Repo", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 138, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "apollo_workflow.GHA", + "type": "", + "pos": { + "x": 488, + "y": 493 + }, + "width": 269, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "GitHub Actions", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 169, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + }, + { + "id": "apollo_workflow.AWS", + "type": "", + "pos": { + "x": 545, + "y": 696 + }, + "width": 155, + "height": 137, + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "borderRadius": 0, + "fill": "#EDF0FD", + "stroke": "#0D32B2", + "shadow": false, + "3d": false, + "multiple": false, + "tooltip": "", + "link": "", + "icon": null, + "iconPosition": "", + "blend": false, + "fields": null, + "methods": null, + "columns": null, + "label": "AWS", + "fontSize": 25, + "fontFamily": "DEFAULT", + "language": "", + "color": "#0A0F25", + "italic": false, + "bold": true, + "underline": false, + "labelWidth": 55, + "labelHeight": 37, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "zIndex": 0, + "level": 2 + } + ], + "connections": [ + { + "id": "build_workflow.(push -> GHA)[0]", + "src": "build_workflow.push", + "srcArrow": "none", + "srcLabel": "", + "dst": "build_workflow.GHA", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "Triggers", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 67, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 1121, + "y": 224 + }, + { + "x": 1121, + "y": 290 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "build_workflow.(GHA -> S3)[0]", + "src": "build_workflow.GHA", + "srcArrow": "none", + "srcLabel": "", + "dst": "build_workflow.S3", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "Builds zip and pushes it", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 192, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 1121, + "y": 427 + }, + { + "x": 1121, + "y": 493 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "build_workflow.(S3 <-> Terraform)[0]", + "src": "build_workflow.S3", + "srcArrow": "triangle", + "srcLabel": "", + "dst": "build_workflow.Terraform", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "Pulls zip to deploy", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 149, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 1121, + "y": 630 + }, + { + "x": 1121, + "y": 696 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "build_workflow.(Terraform -> AWS)[0]", + "src": "build_workflow.Terraform", + "srcArrow": "none", + "srcLabel": "", + "dst": "build_workflow.AWS", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "Changes live lambdas", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 179, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 1121, + "y": 833 + }, + { + "x": 1121, + "y": 899 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "deploy_workflow.(manual -> GHA)[0]", + "src": "deploy_workflow.manual", + "srcArrow": "none", + "srcLabel": "", + "dst": "deploy_workflow.GHA", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "Launches", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 78, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 1611, + "y": 387 + }, + { + "x": 1611, + "y": 453 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "deploy_workflow.(GHA -> AWS)[0]", + "src": "deploy_workflow.GHA", + "srcArrow": "none", + "srcLabel": "", + "dst": "deploy_workflow.AWS", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "Builds zip\npushes them to S3.\n\nDeploys lambdas\nusing Terraform", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 153, + "labelHeight": 106, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 1611, + "y": 590 + }, + { + "x": 1611, + "y": 736 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "apollo_workflow.(apollo -> GHA)[0]", + "src": "apollo_workflow.apollo", + "srcArrow": "none", + "srcLabel": "", + "dst": "apollo_workflow.GHA", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "Triggered manually/push to master test test test test test test test", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 533, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 622, + "y": 427 + }, + { + "x": 622, + "y": 493 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + }, + { + "id": "apollo_workflow.(GHA -> AWS)[0]", + "src": "apollo_workflow.GHA", + "srcArrow": "none", + "srcLabel": "", + "dst": "apollo_workflow.AWS", + "dstArrow": "triangle", + "dstLabel": "", + "opacity": 1, + "strokeDash": 0, + "strokeWidth": 2, + "stroke": "#0D32B2", + "label": "test", + "fontSize": 20, + "fontFamily": "DEFAULT", + "language": "", + "color": "#676C7E", + "italic": true, + "bold": false, + "underline": false, + "labelWidth": 31, + "labelHeight": 26, + "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPercentage": 0, + "route": [ + { + "x": 622, + "y": 630 + }, + { + "x": 622, + "y": 696 + } + ], + "animated": false, + "tooltip": "", + "icon": null, + "zIndex": 0 + } + ] +} diff --git a/e2etests/testdata/regression/elk_alignment/elk/sketch.exp.svg b/e2etests/testdata/regression/elk_alignment/elk/sketch.exp.svg new file mode 100644 index 000000000..4b0877ba5 --- /dev/null +++ b/e2etests/testdata/regression/elk_alignment/elk/sketch.exp.svg @@ -0,0 +1,52 @@ + +lambda-build.yamllambda-deploy.yamlapollo-deploy.yamlPush to main branchGitHub ActionsS3TerraformAWSManual TriggerGitHub ActionsAWSApollo RepoGitHub ActionsAWS TriggersBuilds zip and pushes it Pulls zip to deployChanges live lambdasLaunchesBuilds zippushes them to S3. Deploys lambdasusing TerraformTriggered manually/push to master test test test test test test testtest + + + + + + + + + + \ No newline at end of file From 243df4b8e199442278b4118eff6156ee46ec5d23 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Tue, 20 Dec 2022 14:03:40 -0800 Subject: [PATCH 2/8] use elk layout's edge label position --- d2exporter/export.go | 3 +++ d2graph/d2graph.go | 1 + d2layouts/d2elklayout/layout.go | 3 ++- d2target/d2target.go | 8 ++++++-- 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/d2exporter/export.go b/d2exporter/export.go index 952a85662..6724283e8 100644 --- a/d2exporter/export.go +++ b/d2exporter/export.go @@ -242,6 +242,9 @@ func toConnection(edge *d2graph.Edge, theme *d2themes.Theme) d2target.Connection if edge.LabelPercentage != nil { connection.LabelPercentage = *edge.LabelPercentage } + if edge.LabelTL != nil { + connection.LabelTL = edge.LabelTL.Copy() + } connection.Route = edge.Route connection.IsCurve = edge.IsCurve diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index a6ec263f0..9ef90ed4c 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -664,6 +664,7 @@ type Edge struct { LabelDimensions d2target.TextDimensions `json:"label_dimensions"` LabelPosition *string `json:"labelPosition,omitempty"` LabelPercentage *float64 `json:"labelPercentage,omitempty"` + LabelTL *geo.Point `json:"labelTL,omitempty"` IsCurve bool `json:"isCurve"` Route []*geo.Point `json:"route,omitempty"` diff --git a/d2layouts/d2elklayout/layout.go b/d2layouts/d2elklayout/layout.go index fb364ceba..75ada9428 100644 --- a/d2layouts/d2elklayout/layout.go +++ b/d2layouts/d2elklayout/layout.go @@ -308,7 +308,8 @@ func Layout(ctx context.Context, g *d2graph.Graph) (err error) { points[endIndex] = shape.TraceToShapeBorder(dstShape, points[endIndex], points[endIndex-1]) if edge.Attributes.Label.Value != "" { - edge.LabelPosition = go2.Pointer(string(label.InsideMiddleCenter)) + // using the edge label position from elk layout + edge.LabelTL = geo.NewPoint(e.Labels[0].X+parentX, e.Labels[0].Y+parentY) } edge.Route = points diff --git a/d2target/d2target.go b/d2target/d2target.go index ae098fd28..053a11687 100644 --- a/d2target/d2target.go +++ b/d2target/d2target.go @@ -210,8 +210,9 @@ type Connection struct { Fill string `json:"fill,omitempty"` Text - LabelPosition string `json:"labelPosition"` - LabelPercentage float64 `json:"labelPercentage"` + LabelPosition string `json:"labelPosition"` + LabelPercentage float64 `json:"labelPercentage"` + LabelTL *geo.Point `json:"labelTL,omitempty"` Route []*geo.Point `json:"route"` IsCurve bool `json:"isCurve,omitempty"` @@ -239,6 +240,9 @@ func BaseConnection() *Connection { } func (c *Connection) GetLabelTopLeft() *geo.Point { + if c.LabelTL != nil { + return c.LabelTL + } return label.Position(c.LabelPosition).GetPointOnRoute( c.Route, float64(c.StrokeWidth), From 9f9774b142ebdfad2abc1f11ca2a2ae7fa763f39 Mon Sep 17 00:00:00 2001 From: Gavin Nishizawa Date: Tue, 20 Dec 2022 14:07:30 -0800 Subject: [PATCH 3/8] update tests --- .../elk_alignment/elk/board.exp.json | 48 +++++++++++++++---- .../elk_alignment/elk/sketch.exp.svg | 11 +---- .../connection_label/elk/board.exp.json | 6 ++- .../connection_label/elk/sketch.exp.svg | 4 +- .../arrowhead_labels/elk/board.exp.json | 6 ++- .../arrowhead_labels/elk/sketch.exp.svg | 8 ++-- .../testdata/stable/chaos1/elk/board.exp.json | 12 ++++- .../testdata/stable/chaos1/elk/sketch.exp.svg | 5 +- .../testdata/stable/chaos2/elk/board.exp.json | 48 +++++++++++++++---- .../testdata/stable/chaos2/elk/sketch.exp.svg | 11 +---- .../stable/font_colors/elk/board.exp.json | 6 ++- .../stable/font_colors/elk/sketch.exp.svg | 4 +- .../stable/font_sizes/elk/board.exp.json | 18 +++++-- .../stable/font_sizes/elk/sketch.exp.svg | 6 +-- .../stable/investigate/elk/board.exp.json | 36 +++++++++++--- .../stable/investigate/elk/sketch.exp.svg | 13 ++--- .../testdata/stable/latex/elk/board.exp.json | 6 ++- .../testdata/stable/latex/elk/sketch.exp.svg | 4 +- .../elk/board.exp.json | 36 +++++++++++--- .../elk/sketch.exp.svg | 9 +--- .../self-referencing/elk/board.exp.json | 6 ++- .../self-referencing/elk/sketch.exp.svg | 8 ++-- .../stable/stylish/elk/board.exp.json | 6 ++- .../stable/stylish/elk/sketch.exp.svg | 4 +- .../container_child_edge/elk/board.exp.json | 12 ++++- .../container_child_edge/elk/sketch.exp.svg | 5 +- .../todo/font_sizes_large/elk/board.exp.json | 24 ++++++++-- .../todo/font_sizes_large/elk/sketch.exp.svg | 11 ++--- .../todo/tall_edge_label/elk/board.exp.json | 6 ++- .../todo/tall_edge_label/elk/sketch.exp.svg | 4 +- 30 files changed, 268 insertions(+), 115 deletions(-) diff --git a/e2etests/testdata/regression/elk_alignment/elk/board.exp.json b/e2etests/testdata/regression/elk_alignment/elk/board.exp.json index f5e8e3e4a..676dc94db 100644 --- a/e2etests/testdata/regression/elk_alignment/elk/board.exp.json +++ b/e2etests/testdata/regression/elk_alignment/elk/board.exp.json @@ -585,8 +585,12 @@ "underline": false, "labelWidth": 67, "labelHeight": 26, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "", "labelPercentage": 0, + "labelTL": { + "x": 1052, + "y": 244 + }, "route": [ { "x": 1121, @@ -624,8 +628,12 @@ "underline": false, "labelWidth": 192, "labelHeight": 26, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "", "labelPercentage": 0, + "labelTL": { + "x": 927, + "y": 447 + }, "route": [ { "x": 1121, @@ -663,8 +671,12 @@ "underline": false, "labelWidth": 149, "labelHeight": 26, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "", "labelPercentage": 0, + "labelTL": { + "x": 970, + "y": 650 + }, "route": [ { "x": 1121, @@ -702,8 +714,12 @@ "underline": false, "labelWidth": 179, "labelHeight": 26, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "", "labelPercentage": 0, + "labelTL": { + "x": 940, + "y": 853 + }, "route": [ { "x": 1121, @@ -741,8 +757,12 @@ "underline": false, "labelWidth": 78, "labelHeight": 26, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "", "labelPercentage": 0, + "labelTL": { + "x": 1531, + "y": 407 + }, "route": [ { "x": 1611, @@ -780,8 +800,12 @@ "underline": false, "labelWidth": 153, "labelHeight": 106, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "", "labelPercentage": 0, + "labelTL": { + "x": 1456, + "y": 610 + }, "route": [ { "x": 1611, @@ -819,8 +843,12 @@ "underline": false, "labelWidth": 533, "labelHeight": 26, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "", "labelPercentage": 0, + "labelTL": { + "x": 87, + "y": 447 + }, "route": [ { "x": 622, @@ -858,8 +886,12 @@ "underline": false, "labelWidth": 31, "labelHeight": 26, - "labelPosition": "INSIDE_MIDDLE_CENTER", + "labelPosition": "", "labelPercentage": 0, + "labelTL": { + "x": 589, + "y": 650 + }, "route": [ { "x": 622, diff --git a/e2etests/testdata/regression/elk_alignment/elk/sketch.exp.svg b/e2etests/testdata/regression/elk_alignment/elk/sketch.exp.svg index 4b0877ba5..10db0fd6b 100644 --- a/e2etests/testdata/regression/elk_alignment/elk/sketch.exp.svg +++ b/e2etests/testdata/regression/elk_alignment/elk/sketch.exp.svg @@ -18,16 +18,9 @@ width="2009" height="1299" viewBox="-88 -88 2009 1299">lambda-build.yamllambda-deploy.yamlapollo-deploy.yamlPush to main branchGitHub ActionsS3TerraformAWSManual TriggerGitHub ActionsAWSApollo RepoGitHub ActionsAWS TriggersBuilds zip and pushes it Pulls zip to deployChanges live lambdasLaunchesBuilds zippushes them to S3. Deploys lambdasusing TerraformTriggered manually/push to master test test test test test test testtest +lambda-build.yamllambda-deploy.yamlapollo-deploy.yamlPush to main branchGitHub ActionsS3TerraformAWSManual TriggerGitHub ActionsAWSApollo RepoGitHub ActionsAWS TriggersBuilds zip and pushes it Pulls zip to deployChanges live lambdasLaunchesBuilds zippushes them to S3. Deploys lambdasusing TerraformTriggered manually/push to master test test test test test test testtest - - - - - - - - + ab hello +ab hello - + ab To err is human, to moo bovine1* - - +ab To err is human, to moo bovine1* + + aaadddeeebbbccc111 222 +aaadddeeebbbccc111 222 - - + aabbllmm

nn

oocciikkdd

gg

hhjj

ee

-
ff1122 334455667788 +ff1122 334455667788 - - - - - - - - + alphabeta gamma +alphabeta gamma - + size XSsize Ssize Msize Lsize XLsize XXLsize XXXLcustom 8custom 12custom 18custom 21custom 64 custom 10custom 15custom 48 +size XSsize Ssize Msize Lsize XLsize XXLsize XXXLcustom 8custom 12custom 18custom 21custom 64 custom 10custom 15custom 48 - - - + aabbccddllffwwyynniijjkkssuurmeemmmmgghhzzooppqqrrttvvxxabac 123456 - - - - - - - +aabbccddllffwwyynniijjkkssuurmeemmmmgghhzzooppqqrrttvvxxabac 123456 + + mixed togethersugarsolution we get +mixed togethersugarsolution we get - + rootcontainerrootleftrightrootinnerrootinnerleftrightleftright to inner leftto inner rightto inner leftto inner rightto left container rootto right container root +rootcontainerrootleftrightrootinnerrootinnerleftrightleftright to inner leftto inner rightto inner leftto inner rightto left container rootto right container root - - - - - - + xyz hello - - +xyz hello + + containerfirstsecond 1->2c->2 +containerfirstsecond 1->2c->2 - - + eightsixteenthirty twosixty fourninety nine twelvetwenty fourforty eighteighty one - - - - - +eightsixteenthirty twosixty fourninety nine twelvetwenty fourforty eighteighty one + + ab Thereoncewasaverytalledgelabel +ab Thereoncewasaverytalledgelabel - + lambda-build.yamllambda-deploy.yamlapollo-deploy.yamlPush to main branchGitHub ActionsS3TerraformAWSManual TriggerGitHub ActionsAWSApollo RepoGitHub ActionsAWS TriggersBuilds zip and pushes it Pulls zip to deployChanges live lambdasLaunchesBuilds zippushes them to S3. Deploys lambdasusing TerraformTriggered manually/push to master test test test test test test testtest - +lambda-build.yamllambda-deploy.yamlapollo-deploy.yamlPush to main branchGitHub ActionsS3TerraformAWSManual TriggerGitHub ActionsAWSApollo RepoGitHub ActionsAWS TriggersBuilds zip and pushes it Pulls zip to deployChanges live lambdasLaunchesBuilds zippushes them to S3. Deploys lambdasusing TerraformTriggered manually/push to master test test test test test test testtest + ab hello +ab hello ab To err is human, to moo bovine1* - +ab To err is human, to moo bovine1* + aaadddeeebbbccc111 222 +aaadddeeebbbccc111 222 aabbllmm

nn

-
oocciikkdd

gg

-
hhjj

ee

-
ff1122 334455667788 - +aabbllmm

nn

+
oocciikkdd

gg

+
hhjj

ee

+
ff1122 334455667788 + alphabeta gamma +alphabeta gamma size XSsize Ssize Msize Lsize XLsize XXLsize XXXLcustom 8custom 12custom 18custom 21custom 64 custom 10custom 15custom 48 +size XSsize Ssize Msize Lsize XLsize XXLsize XXXLcustom 8custom 12custom 18custom 21custom 64 custom 10custom 15custom 48 aabbccddllffwwyynniijjkkssuurmeemmmmgghhzzooppqqrrttvvxxabac 123456 - +aabbccddllffwwyynniijjkkssuurmeemmmmgghhzzooppqqrrttvvxxabac 123456 + mixed togethersugarsolution we get +mixed togethersugarsolution we get rootcontainerrootleftrightrootinnerrootinnerleftrightleftright to inner leftto inner rightto inner leftto inner rightto left container rootto right container root +rootcontainerrootleftrightrootinnerrootinnerleftrightleftright to inner leftto inner rightto inner leftto inner rightto left container rootto right container root xyz hello - +xyz hello + containerfirstsecond 1->2c->2 - +containerfirstsecond 1->2c->2 + eightsixteenthirty twosixty fourninety nine twelvetwenty fourforty eighteighty one - +eightsixteenthirty twosixty fourninety nine twelvetwenty fourforty eighteighty one + ab Thereoncewasaverytalledgelabel +ab Thereoncewasaverytalledgelabel lambda-build.yamllambda-deploy.yamlapollo-deploy.yamlPush to main branchGitHub ActionsS3TerraformAWSManual TriggerGitHub ActionsAWSApollo RepoGitHub ActionsAWS TriggersBuilds zip and pushes it Pulls zip to deployChanges live lambdasLaunchesBuilds zippushes them to S3. Deploys lambdasusing TerraformTriggered manually/push to master test test test test test test testtest - - +lambda-build.yamllambda-deploy.yamlapollo-deploy.yamlPush to main branchGitHub ActionsS3TerraformAWSManual TriggerGitHub ActionsAWSApollo RepoGitHub ActionsAWS TriggersBuilds zip and pushes it Pulls zip to deployChanges live lambdasLaunchesBuilds zippushes them to S3. Deploys lambdasusing TerraformTriggered manually/push to master test test test test test test testtest + + + + + + + + + ab hello +ab hello - + ab To err is human, to moo bovine1* - - +ab To err is human, to moo bovine1* + + aaadddeeebbbccc111 222 +aaadddeeebbbccc111 222 - + + aabbllmm

nn

-
oocciikkdd

gg

-
hhjj

ee

-
ff1122 334455667788 - - +aabbllmm

nn

+
oocciikkdd

gg

+
hhjj

ee

+
ff1122 334455667788 + + + + + + + + + alphabeta gamma +alphabeta gamma - + size XSsize Ssize Msize Lsize XLsize XXLsize XXXLcustom 8custom 12custom 18custom 21custom 64 custom 10custom 15custom 48 +size XSsize Ssize Msize Lsize XLsize XXLsize XXXLcustom 8custom 12custom 18custom 21custom 64 custom 10custom 15custom 48 - + + + aabbccddllffwwyynniijjkkssuurmeemmmmgghhzzooppqqrrttvvxxabac 123456 - - +aabbccddllffwwyynniijjkkssuurmeemmmmgghhzzooppqqrrttvvxxabac 123456 + + + + + + + mixed togethersugarsolution we get +mixed togethersugarsolution we get - + rootcontainerrootleftrightrootinnerrootinnerleftrightleftright to inner leftto inner rightto inner leftto inner rightto left container rootto right container root +rootcontainerrootleftrightrootinnerrootinnerleftrightleftright to inner leftto inner rightto inner leftto inner rightto left container rootto right container root - + + + + + + xyz hello - - +xyz hello + + containerfirstsecond 1->2c->2 - - +containerfirstsecond 1->2c->2 + + + eightsixteenthirty twosixty fourninety nine twelvetwenty fourforty eighteighty one - - +eightsixteenthirty twosixty fourninety nine twelvetwenty fourforty eighteighty one + + + + + ab Thereoncewasaverytalledgelabel +ab Thereoncewasaverytalledgelabel - +