diff --git a/ci/release/changelogs/next.md b/ci/release/changelogs/next.md index 532aa4df1..fd95f04a1 100644 --- a/ci/release/changelogs/next.md +++ b/ci/release/changelogs/next.md @@ -29,6 +29,7 @@ - `--force-appendix` flag adds an appendix to SVG outputs with tooltips or links. [#761](https://github.com/terrastruct/d2/pull/761) - `d2 themes` subcommand to list themes. [#760](https://github.com/terrastruct/d2/pull/760) - `sql_table` header left-aligned with column [#769](https://github.com/terrastruct/d2/pull/769) +- Sequence diagram edge group labels are clearer [#782](https://github.com/terrastruct/d2/pull/782) #### Bugfixes ⛑️ diff --git a/d2exporter/export.go b/d2exporter/export.go index 418e71370..0237d554a 100644 --- a/d2exporter/export.go +++ b/d2exporter/export.go @@ -147,6 +147,9 @@ func toShape(obj *d2graph.Object, theme *d2themes.Theme) d2target.Shape { shape.LabelHeight = text.Dimensions.Height if obj.LabelPosition != nil { shape.LabelPosition = *obj.LabelPosition + if obj.IsSequenceDiagramGroup() { + shape.LabelFill = shape.Fill + } } shape.Tooltip = obj.Attributes.Tooltip @@ -163,7 +166,6 @@ func toConnection(edge *d2graph.Edge, theme *d2themes.Theme) d2target.Connection connection := d2target.BaseConnection() connection.ID = edge.AbsID() connection.ZIndex = edge.ZIndex - // edge.Edge.ID = go2.StringToIntHash(connection.ID) text := edge.Text() if edge.SrcArrow { diff --git a/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg b/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg index 41c015af4..f174f6658 100644 --- a/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg +++ b/d2renderers/d2svg/appendix/testdata/diagram_wider_than_tooltip/sketch.exp.svg @@ -39,7 +39,7 @@ width="1932" height="2282" viewBox="-134 -49 1932 2282">