From 38bfc69325c7c52be687f0753e59f87c2e45d846 Mon Sep 17 00:00:00 2001 From: Daniel Suh <23denial@gmail.com> Date: Tue, 28 May 2024 22:31:24 -0400 Subject: [PATCH] removed pretty linke --- d2exporter/export.go | 1 - d2target/d2target.go | 3 +- .../link-on-connections/dagre/board.exp.json | 1 - .../link-on-connections/dagre/sketch.exp.svg | 154 +++++++++--------- .../link-on-connections/elk/board.exp.json | 1 - .../link-on-connections/elk/sketch.exp.svg | 154 +++++++++--------- 6 files changed, 155 insertions(+), 159 deletions(-) diff --git a/d2exporter/export.go b/d2exporter/export.go index 501867093..0a078a1ff 100644 --- a/d2exporter/export.go +++ b/d2exporter/export.go @@ -356,7 +356,6 @@ func toConnection(edge *d2graph.Edge, theme *d2themes.Theme) d2target.Connection } if edge.Link != nil { connection.Link = edge.Link.Value - connection.PrettyLink = toPrettyLink(edge.Dst.Graph, edge.Link.Value) } connection.Label = text.Text connection.LabelWidth = text.Dimensions.Width diff --git a/d2target/d2target.go b/d2target/d2target.go index a2c6d680d..4f6046f5e 100644 --- a/d2target/d2target.go +++ b/d2target/d2target.go @@ -599,8 +599,7 @@ type Connection struct { LabelPosition string `json:"labelPosition"` LabelPercentage float64 `json:"labelPercentage"` - Link string `json:"link"` - PrettyLink string `json:"prettyLink,omitempty"` + Link string `json:"link"` Route []*geo.Point `json:"route"` IsCurve bool `json:"isCurve,omitempty"` diff --git a/e2etests/testdata/txtar/link-on-connections/dagre/board.exp.json b/e2etests/testdata/txtar/link-on-connections/dagre/board.exp.json index a8053e9bb..891afd24f 100644 --- a/e2etests/testdata/txtar/link-on-connections/dagre/board.exp.json +++ b/e2etests/testdata/txtar/link-on-connections/dagre/board.exp.json @@ -112,7 +112,6 @@ "labelPosition": "", "labelPercentage": 0, "link": "https://google.com", - "prettyLink": "https://google.com", "route": [ { "x": 42.5, diff --git a/e2etests/testdata/txtar/link-on-connections/dagre/sketch.exp.svg b/e2etests/testdata/txtar/link-on-connections/dagre/sketch.exp.svg index e4483694c..773f203ee 100644 --- a/e2etests/testdata/txtar/link-on-connections/dagre/sketch.exp.svg +++ b/e2etests/testdata/txtar/link-on-connections/dagre/sketch.exp.svg @@ -1,12 +1,12 @@ -ab + .d2-340887395 .fill-N1{fill:#0A0F25;} + .d2-340887395 .fill-N2{fill:#676C7E;} + .d2-340887395 .fill-N3{fill:#9499AB;} + .d2-340887395 .fill-N4{fill:#CFD2DD;} + .d2-340887395 .fill-N5{fill:#DEE1EB;} + .d2-340887395 .fill-N6{fill:#EEF1F8;} + .d2-340887395 .fill-N7{fill:#FFFFFF;} + .d2-340887395 .fill-B1{fill:#0D32B2;} + .d2-340887395 .fill-B2{fill:#0D32B2;} + .d2-340887395 .fill-B3{fill:#E3E9FD;} + .d2-340887395 .fill-B4{fill:#E3E9FD;} + .d2-340887395 .fill-B5{fill:#EDF0FD;} + .d2-340887395 .fill-B6{fill:#F7F8FE;} + .d2-340887395 .fill-AA2{fill:#4A6FF3;} + .d2-340887395 .fill-AA4{fill:#EDF0FD;} + .d2-340887395 .fill-AA5{fill:#F7F8FE;} + .d2-340887395 .fill-AB4{fill:#EDF0FD;} + .d2-340887395 .fill-AB5{fill:#F7F8FE;} + .d2-340887395 .stroke-N1{stroke:#0A0F25;} + .d2-340887395 .stroke-N2{stroke:#676C7E;} + .d2-340887395 .stroke-N3{stroke:#9499AB;} + .d2-340887395 .stroke-N4{stroke:#CFD2DD;} + .d2-340887395 .stroke-N5{stroke:#DEE1EB;} + .d2-340887395 .stroke-N6{stroke:#EEF1F8;} + .d2-340887395 .stroke-N7{stroke:#FFFFFF;} + .d2-340887395 .stroke-B1{stroke:#0D32B2;} + .d2-340887395 .stroke-B2{stroke:#0D32B2;} + .d2-340887395 .stroke-B3{stroke:#E3E9FD;} + .d2-340887395 .stroke-B4{stroke:#E3E9FD;} + .d2-340887395 .stroke-B5{stroke:#EDF0FD;} + .d2-340887395 .stroke-B6{stroke:#F7F8FE;} + .d2-340887395 .stroke-AA2{stroke:#4A6FF3;} + .d2-340887395 .stroke-AA4{stroke:#EDF0FD;} + .d2-340887395 .stroke-AA5{stroke:#F7F8FE;} + .d2-340887395 .stroke-AB4{stroke:#EDF0FD;} + .d2-340887395 .stroke-AB5{stroke:#F7F8FE;} + .d2-340887395 .background-color-N1{background-color:#0A0F25;} + .d2-340887395 .background-color-N2{background-color:#676C7E;} + .d2-340887395 .background-color-N3{background-color:#9499AB;} + .d2-340887395 .background-color-N4{background-color:#CFD2DD;} + .d2-340887395 .background-color-N5{background-color:#DEE1EB;} + .d2-340887395 .background-color-N6{background-color:#EEF1F8;} + .d2-340887395 .background-color-N7{background-color:#FFFFFF;} + .d2-340887395 .background-color-B1{background-color:#0D32B2;} + .d2-340887395 .background-color-B2{background-color:#0D32B2;} + .d2-340887395 .background-color-B3{background-color:#E3E9FD;} + .d2-340887395 .background-color-B4{background-color:#E3E9FD;} + .d2-340887395 .background-color-B5{background-color:#EDF0FD;} + .d2-340887395 .background-color-B6{background-color:#F7F8FE;} + .d2-340887395 .background-color-AA2{background-color:#4A6FF3;} + .d2-340887395 .background-color-AA4{background-color:#EDF0FD;} + .d2-340887395 .background-color-AA5{background-color:#F7F8FE;} + .d2-340887395 .background-color-AB4{background-color:#EDF0FD;} + .d2-340887395 .background-color-AB5{background-color:#F7F8FE;} + .d2-340887395 .color-N1{color:#0A0F25;} + .d2-340887395 .color-N2{color:#676C7E;} + .d2-340887395 .color-N3{color:#9499AB;} + .d2-340887395 .color-N4{color:#CFD2DD;} + .d2-340887395 .color-N5{color:#DEE1EB;} + .d2-340887395 .color-N6{color:#EEF1F8;} + .d2-340887395 .color-N7{color:#FFFFFF;} + .d2-340887395 .color-B1{color:#0D32B2;} + .d2-340887395 .color-B2{color:#0D32B2;} + .d2-340887395 .color-B3{color:#E3E9FD;} + .d2-340887395 .color-B4{color:#E3E9FD;} + .d2-340887395 .color-B5{color:#EDF0FD;} + .d2-340887395 .color-B6{color:#F7F8FE;} + .d2-340887395 .color-AA2{color:#4A6FF3;} + .d2-340887395 .color-AA4{color:#EDF0FD;} + .d2-340887395 .color-AA5{color:#F7F8FE;} + .d2-340887395 .color-AB4{color:#EDF0FD;} + .d2-340887395 .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}]]>ab @@ -104,7 +104,7 @@ - + diff --git a/e2etests/testdata/txtar/link-on-connections/elk/board.exp.json b/e2etests/testdata/txtar/link-on-connections/elk/board.exp.json index 2c842d216..a14d8bc25 100644 --- a/e2etests/testdata/txtar/link-on-connections/elk/board.exp.json +++ b/e2etests/testdata/txtar/link-on-connections/elk/board.exp.json @@ -112,7 +112,6 @@ "labelPosition": "", "labelPercentage": 0, "link": "https://google.com", - "prettyLink": "https://google.com", "route": [ { "x": 54.5, diff --git a/e2etests/testdata/txtar/link-on-connections/elk/sketch.exp.svg b/e2etests/testdata/txtar/link-on-connections/elk/sketch.exp.svg index efefa51e2..be19c62e0 100644 --- a/e2etests/testdata/txtar/link-on-connections/elk/sketch.exp.svg +++ b/e2etests/testdata/txtar/link-on-connections/elk/sketch.exp.svg @@ -1,12 +1,12 @@ -ab + .d2-3413914892 .fill-N1{fill:#0A0F25;} + .d2-3413914892 .fill-N2{fill:#676C7E;} + .d2-3413914892 .fill-N3{fill:#9499AB;} + .d2-3413914892 .fill-N4{fill:#CFD2DD;} + .d2-3413914892 .fill-N5{fill:#DEE1EB;} + .d2-3413914892 .fill-N6{fill:#EEF1F8;} + .d2-3413914892 .fill-N7{fill:#FFFFFF;} + .d2-3413914892 .fill-B1{fill:#0D32B2;} + .d2-3413914892 .fill-B2{fill:#0D32B2;} + .d2-3413914892 .fill-B3{fill:#E3E9FD;} + .d2-3413914892 .fill-B4{fill:#E3E9FD;} + .d2-3413914892 .fill-B5{fill:#EDF0FD;} + .d2-3413914892 .fill-B6{fill:#F7F8FE;} + .d2-3413914892 .fill-AA2{fill:#4A6FF3;} + .d2-3413914892 .fill-AA4{fill:#EDF0FD;} + .d2-3413914892 .fill-AA5{fill:#F7F8FE;} + .d2-3413914892 .fill-AB4{fill:#EDF0FD;} + .d2-3413914892 .fill-AB5{fill:#F7F8FE;} + .d2-3413914892 .stroke-N1{stroke:#0A0F25;} + .d2-3413914892 .stroke-N2{stroke:#676C7E;} + .d2-3413914892 .stroke-N3{stroke:#9499AB;} + .d2-3413914892 .stroke-N4{stroke:#CFD2DD;} + .d2-3413914892 .stroke-N5{stroke:#DEE1EB;} + .d2-3413914892 .stroke-N6{stroke:#EEF1F8;} + .d2-3413914892 .stroke-N7{stroke:#FFFFFF;} + .d2-3413914892 .stroke-B1{stroke:#0D32B2;} + .d2-3413914892 .stroke-B2{stroke:#0D32B2;} + .d2-3413914892 .stroke-B3{stroke:#E3E9FD;} + .d2-3413914892 .stroke-B4{stroke:#E3E9FD;} + .d2-3413914892 .stroke-B5{stroke:#EDF0FD;} + .d2-3413914892 .stroke-B6{stroke:#F7F8FE;} + .d2-3413914892 .stroke-AA2{stroke:#4A6FF3;} + .d2-3413914892 .stroke-AA4{stroke:#EDF0FD;} + .d2-3413914892 .stroke-AA5{stroke:#F7F8FE;} + .d2-3413914892 .stroke-AB4{stroke:#EDF0FD;} + .d2-3413914892 .stroke-AB5{stroke:#F7F8FE;} + .d2-3413914892 .background-color-N1{background-color:#0A0F25;} + .d2-3413914892 .background-color-N2{background-color:#676C7E;} + .d2-3413914892 .background-color-N3{background-color:#9499AB;} + .d2-3413914892 .background-color-N4{background-color:#CFD2DD;} + .d2-3413914892 .background-color-N5{background-color:#DEE1EB;} + .d2-3413914892 .background-color-N6{background-color:#EEF1F8;} + .d2-3413914892 .background-color-N7{background-color:#FFFFFF;} + .d2-3413914892 .background-color-B1{background-color:#0D32B2;} + .d2-3413914892 .background-color-B2{background-color:#0D32B2;} + .d2-3413914892 .background-color-B3{background-color:#E3E9FD;} + .d2-3413914892 .background-color-B4{background-color:#E3E9FD;} + .d2-3413914892 .background-color-B5{background-color:#EDF0FD;} + .d2-3413914892 .background-color-B6{background-color:#F7F8FE;} + .d2-3413914892 .background-color-AA2{background-color:#4A6FF3;} + .d2-3413914892 .background-color-AA4{background-color:#EDF0FD;} + .d2-3413914892 .background-color-AA5{background-color:#F7F8FE;} + .d2-3413914892 .background-color-AB4{background-color:#EDF0FD;} + .d2-3413914892 .background-color-AB5{background-color:#F7F8FE;} + .d2-3413914892 .color-N1{color:#0A0F25;} + .d2-3413914892 .color-N2{color:#676C7E;} + .d2-3413914892 .color-N3{color:#9499AB;} + .d2-3413914892 .color-N4{color:#CFD2DD;} + .d2-3413914892 .color-N5{color:#DEE1EB;} + .d2-3413914892 .color-N6{color:#EEF1F8;} + .d2-3413914892 .color-N7{color:#FFFFFF;} + .d2-3413914892 .color-B1{color:#0D32B2;} + .d2-3413914892 .color-B2{color:#0D32B2;} + .d2-3413914892 .color-B3{color:#E3E9FD;} + .d2-3413914892 .color-B4{color:#E3E9FD;} + .d2-3413914892 .color-B5{color:#EDF0FD;} + .d2-3413914892 .color-B6{color:#F7F8FE;} + .d2-3413914892 .color-AA2{color:#4A6FF3;} + .d2-3413914892 .color-AA4{color:#EDF0FD;} + .d2-3413914892 .color-AA5{color:#F7F8FE;} + .d2-3413914892 .color-AB4{color:#EDF0FD;} + .d2-3413914892 .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}]]>ab @@ -104,7 +104,7 @@ - +