From 75102f3d402d7a86665f44dd6b0dcf0536a0e22c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vojt=C4=9Bch=20Fo=C5=A1n=C3=A1r?= Date: Mon, 20 Feb 2023 20:09:17 +0100 Subject: [PATCH] fix CLI option, update and hopefully fix tests --- ci/sub | 1 + .../container_dimensions/dagre/board.exp.json | 62 +++++++++---------- .../container_dimensions/dagre/sketch.exp.svg | 45 ++++++-------- .../container_dimensions/elk/board.exp.json | 62 +++++++++---------- .../container_dimensions/elk/sketch.exp.svg | 45 ++++++-------- main.go | 2 +- 6 files changed, 100 insertions(+), 117 deletions(-) create mode 160000 ci/sub diff --git a/ci/sub b/ci/sub new file mode 160000 index 000000000..cb8a9993d --- /dev/null +++ b/ci/sub @@ -0,0 +1 @@ +Subproject commit cb8a9993d7e1d91815650c5baade7658622189b9 diff --git a/e2etests/testdata/stable/container_dimensions/dagre/board.exp.json b/e2etests/testdata/stable/container_dimensions/dagre/board.exp.json index 317bd2d40..f6c758ec4 100644 --- a/e2etests/testdata/stable/container_dimensions/dagre/board.exp.json +++ b/e2etests/testdata/stable/container_dimensions/dagre/board.exp.json @@ -15,8 +15,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#E3E9FD", - "stroke": "#0D32B2", + "fill": "B4", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -33,7 +33,7 @@ "fontSize": 28, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": false, "underline": false, @@ -56,8 +56,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#EDF0FD", - "stroke": "#0D32B2", + "fill": "B5", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -74,7 +74,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": true, "underline": false, @@ -97,8 +97,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#EDF0FD", - "stroke": "#0D32B2", + "fill": "B5", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -115,7 +115,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": true, "underline": false, @@ -138,8 +138,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#E3E9FD", - "stroke": "#0D32B2", + "fill": "B4", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -156,7 +156,7 @@ "fontSize": 28, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": false, "underline": false, @@ -179,8 +179,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#EDF0FD", - "stroke": "#0D32B2", + "fill": "B5", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -197,7 +197,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": true, "underline": false, @@ -220,8 +220,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#EDF0FD", - "stroke": "#0D32B2", + "fill": "B5", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -238,7 +238,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": true, "underline": false, @@ -261,8 +261,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#EDF0FD", - "stroke": "#0D32B2", + "fill": "B5", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -279,7 +279,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": true, "underline": false, @@ -302,8 +302,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#E3E9FD", - "stroke": "#0D32B2", + "fill": "B4", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -320,7 +320,7 @@ "fontSize": 28, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": false, "underline": false, @@ -343,8 +343,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#EDF0FD", - "stroke": "#0D32B2", + "fill": "B5", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -361,7 +361,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": true, "underline": false, @@ -384,12 +384,12 @@ "opacity": 1, "strokeDash": 0, "strokeWidth": 2, - "stroke": "#0D32B2", + "stroke": "B1", "label": "", "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#676C7E", + "color": "N2", "italic": true, "bold": false, "underline": false, @@ -432,12 +432,12 @@ "opacity": 1, "strokeDash": 0, "strokeWidth": 2, - "stroke": "#0D32B2", + "stroke": "B1", "label": "", "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#676C7E", + "color": "N2", "italic": true, "bold": false, "underline": false, diff --git a/e2etests/testdata/stable/container_dimensions/dagre/sketch.exp.svg b/e2etests/testdata/stable/container_dimensions/dagre/sketch.exp.svg index eb78ff58d..4a6606e8c 100644 --- a/e2etests/testdata/stable/container_dimensions/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/container_dimensions/dagre/sketch.exp.svg @@ -1,11 +1,18 @@ - -abcbcbcea - \ No newline at end of file + \ No newline at end of file diff --git a/e2etests/testdata/stable/container_dimensions/elk/board.exp.json b/e2etests/testdata/stable/container_dimensions/elk/board.exp.json index 96eb760eb..f49b81426 100644 --- a/e2etests/testdata/stable/container_dimensions/elk/board.exp.json +++ b/e2etests/testdata/stable/container_dimensions/elk/board.exp.json @@ -15,8 +15,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#E3E9FD", - "stroke": "#0D32B2", + "fill": "B4", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -33,7 +33,7 @@ "fontSize": 28, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": false, "underline": false, @@ -56,8 +56,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#EDF0FD", - "stroke": "#0D32B2", + "fill": "B5", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -74,7 +74,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": true, "underline": false, @@ -97,8 +97,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#EDF0FD", - "stroke": "#0D32B2", + "fill": "B5", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -115,7 +115,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": true, "underline": false, @@ -138,8 +138,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#E3E9FD", - "stroke": "#0D32B2", + "fill": "B4", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -156,7 +156,7 @@ "fontSize": 28, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": false, "underline": false, @@ -179,8 +179,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#EDF0FD", - "stroke": "#0D32B2", + "fill": "B5", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -197,7 +197,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": true, "underline": false, @@ -220,8 +220,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#EDF0FD", - "stroke": "#0D32B2", + "fill": "B5", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -238,7 +238,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": true, "underline": false, @@ -261,8 +261,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#EDF0FD", - "stroke": "#0D32B2", + "fill": "B5", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -279,7 +279,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": true, "underline": false, @@ -302,8 +302,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#E3E9FD", - "stroke": "#0D32B2", + "fill": "B4", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -320,7 +320,7 @@ "fontSize": 28, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": false, "underline": false, @@ -343,8 +343,8 @@ "strokeDash": 0, "strokeWidth": 2, "borderRadius": 0, - "fill": "#EDF0FD", - "stroke": "#0D32B2", + "fill": "B5", + "stroke": "B1", "shadow": false, "3d": false, "multiple": false, @@ -361,7 +361,7 @@ "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#0A0F25", + "color": "N1", "italic": false, "bold": true, "underline": false, @@ -384,12 +384,12 @@ "opacity": 1, "strokeDash": 0, "strokeWidth": 2, - "stroke": "#0D32B2", + "stroke": "B1", "label": "", "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#676C7E", + "color": "N2", "italic": true, "bold": false, "underline": false, @@ -423,12 +423,12 @@ "opacity": 1, "strokeDash": 0, "strokeWidth": 2, - "stroke": "#0D32B2", + "stroke": "B1", "label": "", "fontSize": 16, "fontFamily": "DEFAULT", "language": "", - "color": "#676C7E", + "color": "N2", "italic": true, "bold": false, "underline": false, diff --git a/e2etests/testdata/stable/container_dimensions/elk/sketch.exp.svg b/e2etests/testdata/stable/container_dimensions/elk/sketch.exp.svg index 3a1b99b89..80e84a849 100644 --- a/e2etests/testdata/stable/container_dimensions/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/container_dimensions/elk/sketch.exp.svg @@ -1,11 +1,18 @@ - -abcbcbcea - \ No newline at end of file + \ No newline at end of file diff --git a/main.go b/main.go index 03124cec6..e61ffd86a 100644 --- a/main.go +++ b/main.go @@ -68,7 +68,7 @@ func run(ctx context.Context, ms *xmain.State) (err error) { if err != nil { return err } - darkThemeFlag, err := ms.Opts.Int64("D2_D_THEME", "dark-theme", "", -1, "the diagram dark theme ID. When left unset only the theme will be applied") + darkThemeFlag, err := ms.Opts.Int64("D2_DARK_THEME", "dark-theme", "", -1, "the diagram dark theme ID. When left unset only the theme will be applied") if err != nil { return err }