Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sequence Diagram: Incoming and Outgoing messages without participants on one end #5859

Open
jayaprabhakar opened this issue Sep 13, 2024 · 2 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request

Comments

@jayaprabhakar
Copy link
Contributor

Proposal

Mermaid sequence diagram has been extremely easy to use. I have one small feature request. I need a way to represent Incoming and Outgoing messages. That is, messages where one end of the arrow has an unspecified participant/actor.

The common convention in most text-to-sequence diagram tools is to use '[' or ']'.

[->>Alice: Incoming Message from the Left
[<<-Alice: Outgoing Message to the Left

Alice->>]: Outgoing Message to the right
Alice<<-]: Incoming Message from the right

References:
https://plantuml.com/sequence-diagram#05984b1743e67542
https://sequencediagram.org/instructions.html#:~:text=Server%3Alater%20message-,Incoming%20and%20Outgoing%20Messages,-Incoming%20and%20Outgoing

Example

No response

Screenshots

PlantUML
Screenshot 2024-09-12 at 11 04 32 PM

sequencediagram.org
Screenshot 2024-09-12 at 11 04 56 PM

https://www.websequencediagrams.com/
Screenshot 2024-09-12 at 11 04 44 PM

@jayaprabhakar jayaprabhakar added Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request labels Sep 13, 2024
@jayaprabhakar
Copy link
Contributor Author

Another reason it is important is because, at present, in mermaid, a participant can be activated only if there is a message.

@jayaprabhakar
Copy link
Contributor Author

What is the process to get this done?

  • Is this change okay?
    • Technically, this will be considered backwards incompatible, because anyone who defined a participant as [ or ] will see a different behavior, however I don't see a reason why someone who do that.
    • We could document it if required or provide a way to disable this behavior if needed.
    • The grammar on mermaid has, the uni directional arrows are always specified left to write in the text --> -->> even if the diagram will show it right to left depending on the participants. So, To support incoming/outgoing messages we might have either add specifying arrows right to left or change the convention. '[' always mean left of participant. So A -->> [ will have an arrow pointing to the left of A. Similarly, ']' should mean right of the participant.
  • Can someone who know the codebase point out where to make the changes?

I am happy to take this on, if I could get some guidance on how to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Triage Needs to be verified, categorized, etc Type: Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant