mermaid icon indicating copy to clipboard operation
mermaid copied to clipboard

sequence diagram request: grouping actors in box

Open The-Alchemist opened this issue 4 years ago • 13 comments

Request Description

I'd love to be able to do this:

sequence diagram screenshot with box

More specifically, the "boxes" labeled "Application" and "Kafka".

Source: https://chrzaszcz.dev/2019/12/kafka-transactions/

Proposed Syntax

I propose using the same syntax as loops:

sequenceDiagram
    participant Alice
    participant Bob


    box Alice_and_Bob
    Alice->>Bob: Hello John, how are you?
    Bob->>Alice: Fight against hypochondria
    end
    

The-Alchemist avatar Jun 27 '20 15:06 The-Alchemist

Thats a good idea! We should do this.

knsv avatar Jul 04 '20 08:07 knsv

Agreed. I can probably get this implemented.

soon™

cmmoran avatar Jul 09 '20 10:07 cmmoran

Agreed. I can probably get this implemented.

soon™

You're awesome, @cmmoran ! I volunteer to test.

The-Alchemist avatar Jul 09 '20 14:07 The-Alchemist

If the participants belong to a single box, the box could be set when creating the participants.
For example:

sequenceDiagram
    %% Alice and Bob are grouped in "Alice_and_Bob" box
    box Alice_and_Bob
    participant Alice
    participant Bob
    end
    %% Truddy does not belong to a group
    participant Truddy

eclaus avatar Jul 23 '20 17:07 eclaus

I would appreciate this feature as well :)

orenyomtov avatar Jan 19 '21 09:01 orenyomtov

I don't mind creating (and funding) a bounty on https://gitcoin.co, https://www.bountysource.com, or https://gitpay.me if someone is interested. 😄

UPDATE: I just put a $100 USD bounty on this at https://www.bountysource.com/issues/91876024-sequence-diagram-request-grouping-actors-in-box , if anyone is interested.

The-Alchemist avatar Jan 19 '21 14:01 The-Alchemist

Hi Team, Any progress on this request? I am very interested in this feature.

chrimaho avatar Aug 29 '21 05:08 chrimaho

Also interested in this feature.

iforwms avatar Mar 22 '22 14:03 iforwms

+1

Zyaen avatar Mar 22 '22 15:03 Zyaen

+1

maikheene avatar May 05 '22 13:05 maikheene

Let me give it a try 👍 @The-Alchemist

amitkshirsagar13 avatar May 16 '22 13:05 amitkshirsagar13

Let me give it a try 👍 @The-Alchemist

That sounds great! Bounty is still active 🥇

https://app.bountysource.com/issues/91876024-sequence-diagram-request-grouping-actors-in-box

The-Alchemist avatar May 16 '22 17:05 The-Alchemist

Will this be added anytime soon?

gayalkuruppu avatar Jul 17 '22 16:07 gayalkuruppu

Hi There , since I really wanted this feature too, I have done it Hopefully it will be accepted / merged ;)

oleveau avatar Jan 05 '23 14:01 oleveau

Would this support nested boxes as well? Like -

sequenceDiagram box Friends box Alice_and_Bob participant Alice participant Bob end participant Truddy end

I see errors trying to do this.

rranjan3 avatar Jan 09 '24 07:01 rranjan3