d2 icon indicating copy to clipboard operation
d2 copied to clipboard

Sequence diagram: Multiple notes/connections on the same row?

Open wq2012 opened this issue 1 year ago • 1 comments

Is there a way to put multiple notes/connections on the same row to make the sequence diagram more compact?

Example: img

Would really love this feature!

The possible syntax could be something like:

a."note 1"
& b."note 2"

And this will put "note 1" and "note 2" in the same row.

Just that in d2layouts/d2sequence/sequence_diagram.go::placeNotes(), replace y := sd.maxActorHeight + sd.yStep by y := sd.maxActorHeight when the & symbol is detected (or something similar).

wq2012 avatar Apr 04 '24 14:04 wq2012

Related: can a note (in a sequence_diagram shape) or an arrow label (anywhere) use text formatting (e.g., md)? EDIT: Found https://github.com/terrastruct/d2/issues/849.

amb007 avatar Jul 10 '24 13:07 amb007