diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 09c421ba1..e76476e8c 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -35,6 +35,8 @@ So you can run `go install oss.terrastruct.com/d2@latest` to install from source now. [#290](https://github.com/terrastruct/d2/pull/290) +- Container default font styling is no longer bold. Everything used to look too bold. + [#358](https://github.com/terrastruct/d2/pull/358) - `BROWSER=0` now works to disable opening a browser on `--watch`. [#311](https://github.com/terrastruct/d2/pull/311) diff --git a/d2exporter/export.go b/d2exporter/export.go index 3a1274f89..2f8e5ec40 100644 --- a/d2exporter/export.go +++ b/d2exporter/export.go @@ -95,6 +95,8 @@ func toShape(obj *d2graph.Object, theme *d2themes.Theme) d2target.Shape { shape.Height = int(obj.Height) text := obj.Text() + shape.Bold = text.IsBold + shape.Italic = text.IsItalic shape.FontSize = text.FontSize applyStyles(shape, obj) diff --git a/d2graph/d2graph.go b/d2graph/d2graph.go index d9a96d83a..e560946f9 100644 --- a/d2graph/d2graph.go +++ b/d2graph/d2graph.go @@ -336,7 +336,7 @@ func (obj *Object) GetFill(theme *d2themes.Theme) string { } else if obj.IsSequenceDiagramNote() { return theme.Colors.Neutrals.N7 } else if obj.IsSequenceDiagramGroup() { - sd := obj.outerSequenceDiagram() + sd := obj.OuterSequenceDiagram() // Alternate if (level-int(sd.Level()))%2 == 0 { return theme.Colors.Neutrals.N7 @@ -428,10 +428,14 @@ func (obj *Object) AbsIDArray() []string { } func (obj *Object) Text() *d2target.MText { + isBold := !obj.IsContainer() fontSize := d2fonts.FONT_SIZE_M - if obj.IsContainer() && !obj.Parent.IsSequenceDiagram() { - // sequence diagram children (aka, actors) shouldn't have the container font size - fontSize = obj.Level().LabelSize() + if obj.OuterSequenceDiagram() == nil { + if obj.IsContainer() { + fontSize = obj.Level().LabelSize() + } + } else { + isBold = false } if obj.Attributes.Style.FontSize != nil { fontSize, _ = strconv.Atoi(obj.Attributes.Style.FontSize.Value) @@ -443,7 +447,7 @@ func (obj *Object) Text() *d2target.MText { return &d2target.MText{ Text: obj.Attributes.Label.Value, FontSize: fontSize, - IsBold: !obj.IsContainer(), + IsBold: isBold, IsItalic: false, Language: obj.Attributes.Language, Shape: obj.Attributes.Shape.Value, @@ -742,7 +746,7 @@ func (obj *Object) Connect(srcID, dstID []string, srcArrow, dstArrow bool, label src := srcObj.EnsureChild(srcID) dst := dstObj.EnsureChild(dstID) - if src.outerSequenceDiagram() != dst.outerSequenceDiagram() { + if src.OuterSequenceDiagram() != dst.OuterSequenceDiagram() { return nil, errors.New("connections within sequence diagrams can connect only to other objects within the same sequence diagram") } diff --git a/d2graph/seqdiagram.go b/d2graph/seqdiagram.go index fbd4d4bb6..bc40d387b 100644 --- a/d2graph/seqdiagram.go +++ b/d2graph/seqdiagram.go @@ -6,7 +6,7 @@ func (obj *Object) IsSequenceDiagram() bool { return obj != nil && obj.Attributes.Shape.Value == d2target.ShapeSequenceDiagram } -func (obj *Object) outerSequenceDiagram() *Object { +func (obj *Object) OuterSequenceDiagram() *Object { for obj != nil { obj = obj.Parent if obj.IsSequenceDiagram() { @@ -19,7 +19,7 @@ func (obj *Object) outerSequenceDiagram() *Object { // groups are objects in sequence diagrams that have no messages connected // and does not have a note as a child (a note can appear within a group, but it's a child of an actor) func (obj *Object) IsSequenceDiagramGroup() bool { - if obj.outerSequenceDiagram() == nil { + if obj.OuterSequenceDiagram() == nil { return false } for _, e := range obj.Graph.Edges { @@ -38,7 +38,7 @@ func (obj *Object) IsSequenceDiagramGroup() bool { // notes are descendant of actors with no edges and no children func (obj *Object) IsSequenceDiagramNote() bool { - if obj.outerSequenceDiagram() == nil { + if obj.OuterSequenceDiagram() == nil { return false } return !obj.hasEdgeRef() && !obj.ContainsAnyEdge(obj.Graph.Edges) && len(obj.ChildrenArray) == 0 diff --git a/d2layouts/d2sequence/layout_test.go b/d2layouts/d2sequence/layout_test.go index 1e3dbfd60..50c1e3ffe 100644 --- a/d2layouts/d2sequence/layout_test.go +++ b/d2layouts/d2sequence/layout_test.go @@ -6,6 +6,7 @@ import ( "testing" "github.com/stretchr/testify/assert" + "oss.terrastruct.com/d2/d2compiler" "oss.terrastruct.com/d2/d2graph" "oss.terrastruct.com/d2/d2layouts/d2sequence" diff --git a/e2etests/testdata/sanity/child_to_child/dagre/board.exp.json b/e2etests/testdata/sanity/child_to_child/dagre/board.exp.json index 6e06f2f68..6e7c12ff5 100644 --- a/e2etests/testdata/sanity/child_to_child/dagre/board.exp.json +++ b/e2etests/testdata/sanity/child_to_child/dagre/board.exp.json @@ -32,7 +32,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 17, "labelHeight": 41, @@ -110,7 +110,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 17, "labelHeight": 41, diff --git a/e2etests/testdata/sanity/child_to_child/dagre/sketch.exp.svg b/e2etests/testdata/sanity/child_to_child/dagre/sketch.exp.svg index a6be75347..73bf3f2c8 100644 --- a/e2etests/testdata/sanity/child_to_child/dagre/sketch.exp.svg +++ b/e2etests/testdata/sanity/child_to_child/dagre/sketch.exp.svg @@ -14,7 +14,14 @@ width="414" height="752" viewBox="-100 -100 414 752">acbd acbd acbd acbd aaadddeeebbbccc111 222 +aaadddeeebbbccc111 222 aaadddeeebbbccc111 222 +aaadddeeebbbccc111 222 aabbllmm

nn

-
oocciikkdd

gg

+aabbllmm

nn

+
oocciikkdd

gg

hhjj

ee

ff1122 334455667788 diff --git a/e2etests/testdata/stable/chaos2/elk/board.exp.json b/e2etests/testdata/stable/chaos2/elk/board.exp.json index 8b13f40e1..c24935e24 100644 --- a/e2etests/testdata/stable/chaos2/elk/board.exp.json +++ b/e2etests/testdata/stable/chaos2/elk/board.exp.json @@ -32,7 +32,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 32, "labelHeight": 41, @@ -71,7 +71,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 31, "labelHeight": 36, @@ -110,7 +110,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 24, "labelHeight": 31, @@ -149,7 +149,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 22, "labelHeight": 26, @@ -342,7 +342,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 14, "labelHeight": 31, diff --git a/e2etests/testdata/stable/chaos2/elk/sketch.exp.svg b/e2etests/testdata/stable/chaos2/elk/sketch.exp.svg index 11e1d3310..9af9e35e2 100644 --- a/e2etests/testdata/stable/chaos2/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/chaos2/elk/sketch.exp.svg @@ -770,8 +770,8 @@ width="1092" height="1907" viewBox="-88 -88 1092 1907">aabbllmm

nn

-
oocciikkdd

gg

+aabbllmm

nn

+
oocciikkdd

gg

hhjj

ee

ff1122 334455667788 diff --git a/e2etests/testdata/stable/child_parent_edges/dagre/board.exp.json b/e2etests/testdata/stable/child_parent_edges/dagre/board.exp.json index dd97cece7..7533f6dc4 100644 --- a/e2etests/testdata/stable/child_parent_edges/dagre/board.exp.json +++ b/e2etests/testdata/stable/child_parent_edges/dagre/board.exp.json @@ -32,7 +32,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 17, "labelHeight": 41, @@ -71,7 +71,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 17, "labelHeight": 36, @@ -110,7 +110,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 14, "labelHeight": 31, diff --git a/e2etests/testdata/stable/child_parent_edges/dagre/sketch.exp.svg b/e2etests/testdata/stable/child_parent_edges/dagre/sketch.exp.svg index a82415426..da6d37d97 100644 --- a/e2etests/testdata/stable/child_parent_edges/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/child_parent_edges/dagre/sketch.exp.svg @@ -14,7 +14,14 @@ width="724" height="626" viewBox="-100 -100 724 626">abcd abcd abcd abcd acfbdhg acfbdhg acfbdhg acfbdhg agdfbhec agdfbhec agdfbhec agdfbhec finallyatreeandnodessomemoremanythenhereyouhavehierarchyanotherofnestingtreesatreeinsidehierarchyroot finallyatreeandnodessomemoremanythenhereyouhavehierarchyanotherofnestingtreesatreeinsidehierarchyroot finallyatreeandnodessomemoremanythenhereyouhavehierarchyanotherofnestingtreesatreeinsidehierarchyroot finallyatreeandnodessomemoremanythenhereyouhavehierarchyanotherofnestingtreesatreeinsidehierarchyroot bacde21345abcde bacde21345abcde bacde21345abcde bacde21345abcde aabbccddllffwwyynniijjkkssuurmeemmmmgghhzzooppqqrrttvvxxabac 123456 +aabbccddllffwwyynniijjkkssuurmeemmmmgghhzzooppqqrrttvvxxabac 123456 @@ -23,6 +23,13 @@ width="1011" height="4426" viewBox="-100 -100 1011 4426">aabbccddllffwwyynniijjkkssuurmeemmmmgghhzzooppqqrrttvvxxabac 123456 +aabbccddllffwwyynniijjkkssuurmeemmmmgghhzzooppqqrrttvvxxabac 123456 @@ -23,6 +23,13 @@ width="860" height="4868" viewBox="-82 -88 860 4868">abcdefghiqrjmnoszaabbeeffggklptuwxyccddv abcdefghiqrjmnoszaabbeeffggklptuwxyccddv abcdefghiqrjmnoszaabbeeffggklptuwxyccddv abcdefghiqrjmnoszaabbeeffggklptuwxyccddv markdown

Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+markdown

Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

\ No newline at end of file diff --git a/e2etests/testdata/stable/md_2space_newline/elk/board.exp.json b/e2etests/testdata/stable/md_2space_newline/elk/board.exp.json index 1d7641708..51e893f73 100644 --- a/e2etests/testdata/stable/md_2space_newline/elk/board.exp.json +++ b/e2etests/testdata/stable/md_2space_newline/elk/board.exp.json @@ -32,7 +32,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 129, "labelHeight": 41, diff --git a/e2etests/testdata/stable/md_2space_newline/elk/sketch.exp.svg b/e2etests/testdata/stable/md_2space_newline/elk/sketch.exp.svg index bf85bbffc..f33612e5a 100644 --- a/e2etests/testdata/stable/md_2space_newline/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/md_2space_newline/elk/sketch.exp.svg @@ -770,7 +770,7 @@ width="809" height="398" viewBox="-88 -88 809 398">markdown

Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+markdown

Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

\ No newline at end of file diff --git a/e2etests/testdata/stable/md_backslash_newline/dagre/board.exp.json b/e2etests/testdata/stable/md_backslash_newline/dagre/board.exp.json index 53c2c3f0b..c0833ff0a 100644 --- a/e2etests/testdata/stable/md_backslash_newline/dagre/board.exp.json +++ b/e2etests/testdata/stable/md_backslash_newline/dagre/board.exp.json @@ -32,7 +32,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 129, "labelHeight": 41, diff --git a/e2etests/testdata/stable/md_backslash_newline/dagre/sketch.exp.svg b/e2etests/testdata/stable/md_backslash_newline/dagre/sketch.exp.svg index 4834ed25d..6156259cc 100644 --- a/e2etests/testdata/stable/md_backslash_newline/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/md_backslash_newline/dagre/sketch.exp.svg @@ -770,7 +770,7 @@ width="759" height="348" viewBox="-100 -100 759 348">markdown

Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+markdown

Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

\ No newline at end of file diff --git a/e2etests/testdata/stable/md_backslash_newline/elk/board.exp.json b/e2etests/testdata/stable/md_backslash_newline/elk/board.exp.json index 068744935..49ee4fa4e 100644 --- a/e2etests/testdata/stable/md_backslash_newline/elk/board.exp.json +++ b/e2etests/testdata/stable/md_backslash_newline/elk/board.exp.json @@ -32,7 +32,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 129, "labelHeight": 41, diff --git a/e2etests/testdata/stable/md_backslash_newline/elk/sketch.exp.svg b/e2etests/testdata/stable/md_backslash_newline/elk/sketch.exp.svg index bf85bbffc..f33612e5a 100644 --- a/e2etests/testdata/stable/md_backslash_newline/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/md_backslash_newline/elk/sketch.exp.svg @@ -770,7 +770,7 @@ width="809" height="398" viewBox="-88 -88 809 398">markdown

Lorem ipsum dolor sit amet, consectetur adipiscing elit,
+markdown

Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.

\ No newline at end of file diff --git a/e2etests/testdata/stable/one_container_loop/dagre/board.exp.json b/e2etests/testdata/stable/one_container_loop/dagre/board.exp.json index 56939fe30..381e16618 100644 --- a/e2etests/testdata/stable/one_container_loop/dagre/board.exp.json +++ b/e2etests/testdata/stable/one_container_loop/dagre/board.exp.json @@ -32,7 +32,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 17, "labelHeight": 41, diff --git a/e2etests/testdata/stable/one_container_loop/dagre/sketch.exp.svg b/e2etests/testdata/stable/one_container_loop/dagre/sketch.exp.svg index 8ef105d9f..8002c18d3 100644 --- a/e2etests/testdata/stable/one_container_loop/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/one_container_loop/dagre/sketch.exp.svg @@ -14,7 +14,14 @@ width="679" height="1330" viewBox="-100 -100 679 1330">acdefgbh acdefgbh acdefgbh acdefgbh topabcbottomstartend topabcbottomstartend topabcbottomstartend topabcbottomstartend a labelblabelsa class+ -public() bool -void- -private() int -voidcloudyyyy:= 5 +a labelblabelsa class+ +public() bool +void- +private() int +voidcloudyyyy:= 5 := a + 7 -fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid -int -name -varchar - result := callThisFunction(obj, 5) midthis sideother side - - - +fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid +int +name +varchar + result := callThisFunction(obj, 5) midthis sideother side + + + a labelblabelsa class+ -public() bool -void- -private() int -voidcloudyyyy:= 5 +a labelblabelsa class+ +public() bool +void- +private() int +voidcloudyyyy:= 5 := a + 7 -fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid -int -name -varchar - result := callThisFunction(obj, 5) midthis sideother side - - - +fmt.Printf("%d", b)cyldiadocssix cornersa random iconoverpackdocs pagetoohard o saysinglepersona queuea squarea step at a timedatausersid +int +name +varchar + result := callThisFunction(obj, 5) midthis sideother side + + + abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note - - - - - +abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note + + + + + abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note - - - - - +abcdggggroup 1group bchoonested guy lalaeyokayokaywhat would arnold saythis note + + + + + scoreritemResponseitemessayRubricconceptitemOutcome scoreritemResponseitemessayRubricconceptitemOutcome \ No newline at end of file diff --git a/e2etests/testdata/stable/sequence_diagram_nested_span/elk/board.exp.json b/e2etests/testdata/stable/sequence_diagram_nested_span/elk/board.exp.json index 88317fe29..4baf730fb 100644 --- a/e2etests/testdata/stable/sequence_diagram_nested_span/elk/board.exp.json +++ b/e2etests/testdata/stable/sequence_diagram_nested_span/elk/board.exp.json @@ -32,7 +32,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 48, "labelHeight": 26, @@ -71,9 +71,9 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 31, + "labelWidth": 29, "labelHeight": 26, "zIndex": 3, "level": 2 @@ -109,7 +109,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 100, "labelHeight": 26, @@ -148,9 +148,9 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 13, + "labelWidth": 12, "labelHeight": 26, "zIndex": 3, "level": 2 @@ -186,7 +186,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 35, "labelHeight": 26, @@ -220,15 +220,15 @@ "methods": null, "columns": null, "label": "", - "fontSize": 24, + "fontSize": 16, "fontFamily": "DEFAULT", "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 15, - "labelHeight": 36, + "labelWidth": 12, + "labelHeight": 26, "zIndex": 3, "level": 2 }, @@ -263,7 +263,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 13, "labelHeight": 26, @@ -301,7 +301,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 86, "labelHeight": 26, @@ -335,15 +335,15 @@ "methods": null, "columns": null, "label": "", - "fontSize": 24, + "fontSize": 16, "fontFamily": "DEFAULT", "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 15, - "labelHeight": 36, + "labelWidth": 12, + "labelHeight": 26, "zIndex": 3, "level": 2 }, @@ -373,15 +373,15 @@ "methods": null, "columns": null, "label": "", - "fontSize": 20, + "fontSize": 16, "fontFamily": "DEFAULT", "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 15, - "labelHeight": 31, + "labelWidth": 13, + "labelHeight": 26, "zIndex": 3, "level": 3 }, @@ -416,9 +416,9 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 13, + "labelWidth": 12, "labelHeight": 26, "zIndex": 3, "level": 4 @@ -454,7 +454,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 60, "labelHeight": 26, @@ -488,15 +488,15 @@ "methods": null, "columns": null, "label": "", - "fontSize": 24, + "fontSize": 16, "fontFamily": "DEFAULT", "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 15, - "labelHeight": 36, + "labelWidth": 12, + "labelHeight": 26, "zIndex": 3, "level": 2 }, @@ -526,15 +526,15 @@ "methods": null, "columns": null, "label": "", - "fontSize": 20, + "fontSize": 16, "fontFamily": "DEFAULT", "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 15, - "labelHeight": 31, + "labelWidth": 13, + "labelHeight": 26, "zIndex": 3, "level": 3 }, @@ -569,7 +569,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 12, "labelHeight": 26, @@ -607,9 +607,9 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 14, + "labelWidth": 13, "labelHeight": 26, "zIndex": 3, "level": 5 @@ -645,7 +645,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 97, "labelHeight": 26, @@ -679,15 +679,15 @@ "methods": null, "columns": null, "label": "", - "fontSize": 24, + "fontSize": 16, "fontFamily": "DEFAULT", "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 15, - "labelHeight": 36, + "labelWidth": 12, + "labelHeight": 26, "zIndex": 3, "level": 2 }, @@ -717,15 +717,15 @@ "methods": null, "columns": null, "label": "", - "fontSize": 20, + "fontSize": 16, "fontFamily": "DEFAULT", "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 15, - "labelHeight": 31, + "labelWidth": 13, + "labelHeight": 26, "zIndex": 3, "level": 3 }, @@ -760,7 +760,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 12, "labelHeight": 26, @@ -798,7 +798,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 13, "labelHeight": 26, @@ -836,7 +836,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 13, "labelHeight": 26, @@ -874,9 +874,9 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 13, + "labelWidth": 12, "labelHeight": 26, "zIndex": 3, "level": 2 diff --git a/e2etests/testdata/stable/sequence_diagram_nested_span/elk/sketch.exp.svg b/e2etests/testdata/stable/sequence_diagram_nested_span/elk/sketch.exp.svg index 65b52749f..f2bb4e085 100644 --- a/e2etests/testdata/stable/sequence_diagram_nested_span/elk/sketch.exp.svg +++ b/e2etests/testdata/stable/sequence_diagram_nested_span/elk/sketch.exp.svg @@ -2,7 +2,7 @@ \ No newline at end of file diff --git a/e2etests/testdata/stable/sequence_diagram_note/dagre/board.exp.json b/e2etests/testdata/stable/sequence_diagram_note/dagre/board.exp.json index 6b9df7e57..69036822a 100644 --- a/e2etests/testdata/stable/sequence_diagram_note/dagre/board.exp.json +++ b/e2etests/testdata/stable/sequence_diagram_note/dagre/board.exp.json @@ -32,7 +32,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 12, "labelHeight": 26, @@ -44,7 +44,7 @@ "id": "b", "type": "", "pos": { - "x": 250, + "x": 220, "y": 50 }, "width": 150, @@ -71,7 +71,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 13, "labelHeight": 26, @@ -83,7 +83,7 @@ "id": "c", "type": "", "pos": { - "x": 500, + "x": 440, "y": 50 }, "width": 150, @@ -110,9 +110,9 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 13, + "labelWidth": 12, "labelHeight": 26, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 0, @@ -122,7 +122,7 @@ "id": "d", "type": "", "pos": { - "x": 750, + "x": 660, "y": 50 }, "width": 150, @@ -149,7 +149,7 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, "labelWidth": 13, "labelHeight": 26, @@ -161,10 +161,10 @@ "id": "a.explanation", "type": "rectangle", "pos": { - "x": -20, + "x": -17, "y": 436 }, - "width": 190, + "width": 184, "height": 126, "opacity": 1, "strokeDash": 0, @@ -188,9 +188,9 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 90, + "labelWidth": 84, "labelHeight": 26, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 5, @@ -200,10 +200,10 @@ "id": "a.another explanation", "type": "rectangle", "pos": { - "x": -50, + "x": -45, "y": 692 }, - "width": 250, + "width": 241, "height": 126, "opacity": 1, "strokeDash": 0, @@ -227,9 +227,9 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 150, + "labelWidth": 141, "labelHeight": 26, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 5, @@ -239,10 +239,10 @@ "id": "b.\"Some one who believes imaginary things\\n appear right before your i's.\"", "type": "rectangle", "pos": { - "x": 128, + "x": 106, "y": 1078 }, - "width": 393, + "width": 378, "height": 142, "opacity": 1, "strokeDash": 0, @@ -266,9 +266,9 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 293, + "labelWidth": 278, "labelHeight": 42, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 5, @@ -278,10 +278,10 @@ "id": "d.The earth is like a tiny grain of sand, only much, much heavier", "type": "rectangle", "pos": { - "x": 554, + "x": 477, "y": 1480 }, - "width": 541, + "width": 516, "height": 126, "opacity": 1, "strokeDash": 0, @@ -305,9 +305,9 @@ "language": "", "color": "#0A0F25", "italic": false, - "bold": true, + "bold": false, "underline": false, - "labelWidth": 441, + "labelWidth": 416, "labelHeight": 26, "labelPosition": "INSIDE_MIDDLE_CENTER", "zIndex": 5, @@ -345,7 +345,7 @@ "y": 306 }, { - "x": 325, + "x": 295, "y": 306 } ], @@ -380,11 +380,11 @@ "labelPercentage": 0, "route": [ { - "x": 325, + "x": 295, "y": 948 }, { - "x": 575, + "x": 515, "y": 948 } ], @@ -419,11 +419,11 @@ "labelPercentage": 0, "route": [ { - "x": 575, + "x": 515, "y": 1350 }, { - "x": 325, + "x": 295, "y": 1350 } ], @@ -497,11 +497,11 @@ "labelPercentage": 0, "route": [ { - "x": 325, + "x": 295, "y": 176 }, { - "x": 325, + "x": 295, "y": 1736 } ], @@ -536,11 +536,11 @@ "labelPercentage": 0, "route": [ { - "x": 575, + "x": 515, "y": 176 }, { - "x": 575, + "x": 515, "y": 1736 } ], @@ -575,11 +575,11 @@ "labelPercentage": 0, "route": [ { - "x": 825, + "x": 735, "y": 176 }, { - "x": 825, + "x": 735, "y": 1736 } ], diff --git a/e2etests/testdata/stable/sequence_diagram_note/dagre/sketch.exp.svg b/e2etests/testdata/stable/sequence_diagram_note/dagre/sketch.exp.svg index c45a3f815..26ea65ebf 100644 --- a/e2etests/testdata/stable/sequence_diagram_note/dagre/sketch.exp.svg +++ b/e2etests/testdata/stable/sequence_diagram_note/dagre/sketch.exp.svg @@ -2,7 +2,7 @@ abcd okayexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier + + abcd okayexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier - - +abcd okayexplanationanother explanationSome one who believes imaginary things appear right before your i's.The earth is like a tiny grain of sand, only much, much heavier + + How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place - - - - - - - - - - - - - - +How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place + + + + + + + + + + + + + + How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place - - - - - - - - - - - - - - +How this is renderedCLId2astd2compilerd2layoutd2exporterd2themesd2rendererd2sequencelayoutd2dagrelayoutonly if root is not sequence 'How this is rendered: {...}'tokenized ASTcompile ASTobjects and edgesrun layout enginesrun engine on shape: sequence_diagram, temporarily removerun core engine on rest add back in sequence diagramsdiagram with correct positions and dimensionsexport diagram with chosen theme and rendererget theme stylesrender to SVGresulting SVGmeasurements also take place + + + + + + + + + + + + + + ab a self edge herebetween actorsto descendantto deeper descendantto parentactor - +ab a self edge herebetween actorsto descendantto deeper descendantto parentactor + - - - - - + + + + + ab a self edge herebetween actorsto descendantto deeper descendantto parentactor - +ab a self edge herebetween actorsto descendantto deeper descendantto parentactor + - - - - - + + + + + AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response - - - - - - - - - +AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response + + + + + + + + + AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response - - - - - - - - - +AlicelinebreakerBobdbqueueanoddservicewithanameinmultiple lines Authentication Requestmake request for something that is quite far away and requires a really long label to take all the space between the objectsvalidate credentialsAuthentication ResponseAnother authentication Requestdo it later storedAnother authentication Response + + + + + + + + + scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - +scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - +scoreritemResponseitemessayRubricconceptitemOutcome getItem() itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - - - - - - - - - - - - - +a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + + + + + + + + + + + + + a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) - - - - - - - - - - - - - - - - - - - - - - - - - +a_shapea_sequenceanotherfinallysequencesequencesequencescoreritemResponseitemessayRubricconceptitemOutcomescorerconceptessayRubricitemitemOutcomeitemResponsescoreritemResponseitemessayRubricconceptitemOutcome getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts)getItem()itemgetRubric()rubricapplyTo(essayResp)match(essayResponse)scorenewgetNormalMinimum()getNormalMaximum()setScore(score)setFeedback(missingConcepts) + + + + + + + + + + + + + + + + + + + + + + + + + acbl1l2c1l2c3l2c2l3c1l3c2l4bacacbabcc1c2c3abc acbl1l2c1l2c3l2c2l3c1l3c2l4bacacbabcc1c2c3abc containerfirstsecond 1->2c->2 +containerfirstsecond 1->2c->2 containerfirstsecond 1->2c->2 +containerfirstsecond 1->2c->2 ninety ninesixty fourthirty twosixteeneightninety ninesixty fourthirty twosixteeneight