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

Unexpected rendering of message arrows in sequence diagrams #5415

Open
Azam-Ra opened this issue Mar 25, 2024 · 0 comments
Open

Unexpected rendering of message arrows in sequence diagrams #5415

Azam-Ra opened this issue Mar 25, 2024 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@Azam-Ra
Copy link

Azam-Ra commented Mar 25, 2024

Description

There is a feature of destroying participant/actor objects, when designing sequence diagrams in mermaid. It's defined in mermaid, that destroy action should associate with a destroying message after its declaration.

However, if you leave the contents of the destroying message empty; then the previous message arrow will point not to the lifeline of the participant/actor object being destroyed, but to the participant/actor object itself:
[Picture1]
image
Furthermore, if the previous message arrow was associated with create action (which is pretty unrealistic, but still...), then it causes even more chaos:
[Picture2]
image

On the other hand, if you fill contents of the destroying message:

  • in case of preceeding message being associated to a create action, rendered participant/actor objects will not overlap;
    [Picture3]
    image
  • in other cases, rendered message arrow will point to the lifeline of participant/actor object, being destroyed.
    [Picture4]
    image

Steps to reproduce

Code to recreate the pictures provided in the description:
[Picture1]:

sequenceDiagram
    participant p1

    create participant p2
    p1 ->> p2: Instantiate p2

    p2 -->> p1: Time has passed

    destroy p2
    p1 -x p2: 

[Picture2]:

sequenceDiagram
    participant p1

    create participant p2
    p1 ->> p2: Instantiate p2

    destroy p2
    p1 -x p2: 

[Picture3]:

sequenceDiagram
    participant p1

    create participant p2
    p1 ->> p2: Instantiate p2

    p2 -->> p1: Time has passed

    destroy p2
    p1 -x p2: .

[Picture4]:

sequenceDiagram
    participant p1

    create participant p2
    p1 ->> p2: Instantiate p2

    destroy p2
    p1 -x p2: .

Screenshots

No response

Code Sample

No response

Setup

  • Mermaid version: v10.9.0
  • Browser and Version: Google Chrome 123.0.6312.58

Suggested Solutions

No response

Additional Context

No response

@Azam-Ra Azam-Ra added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Mar 25, 2024
@Azam-Ra Azam-Ra changed the title Not expected rendering of message arrows in sequence diagrams Unexpected rendering of message arrows in sequence diagrams Apr 4, 2024
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: Bug / Error Something isn't working or is incorrect
Projects
None yet
Development

No branches or pull requests

1 participant