bramp / js-sequence-diagrams

Draws simple SVG sequence diagrams from textual representation of the diagram
https://bramp.github.io/js-sequence-diagrams/
BSD 2-Clause "Simplified" License
7.81k stars 1.08k forks source link

Add features for notes and groups #176

Open J-Wass opened 7 years ago

J-Wass commented 7 years ago

Notes should be able to extend across more than two participants.

Note over A,B,C: This is a long note!

Also, it would be really useful to create graphical groups around arrows, similar to 'opt's in web sequence diagrams.

Group Handshake
A->B: Send PacketRequest
B->A: Send PacketResponse
EndGroup

Finally, for when web sequences grow too big, it would nice to have the ability to collapse these groups to save both vertical and horizontal space.

CollapsibleGroup ReadDB
A->B: Send SQLQuery
B->A: Send DataSet
EndGroup
bramp commented 7 years ago

ETOOMANYFEATUREREQUESTS

1) You can already place notes over multiple participants, for example:

A->B: 1
B->C: 2
Note over A,C: This will cover lines A, B and C.

However, if you didn't know the order of the participants, I could see how you may not know that B was in the middle of C. So I think it might be far to allow A,B,C and ensure it covers all of them.

2) Yes opts would be cool, and there is already a feature request for them #160

3) Sounds a reasonable idea, but right now the generated SVGs are not interactive, but could be. Sounds low priority right now.

I welcome patches if you feel up to adding any of these features.