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

stateDiagram-v2 can't show transitions between parent and child (either direction) #5560

Open
adamfk opened this issue Jun 3, 2024 · 0 comments
Labels
Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect

Comments

@adamfk
Copy link

adamfk commented Jun 3, 2024

Description

mermaid.js can't show parent to child transitions (called local transitions by UML).

image

Here's an example of where the Moving state wants to have a transition to its child state A. PlantUML is capable of showing it correctly. Online example link.

image

When I try to do the same with mermaid, I see no transition from parent to child.

stateDiagram-v2
    [*] --> Moving

    state Moving {
        A
        B
    }
    Moving --> A : edge hidden behind A?
    A --> B
    Moving --> Stopped : STOP
Loading

Interestingly, if I change the transition to Stopped so that it originates from state B, we can see an edge hidden behind A.

stateDiagram-v2
    [*] --> Moving

    state Moving {
        A
        B
    }
    Moving --> A : edge hidden behind
    A --> B
    B --> Stopped : STOP
Loading

NOTE! Child to parent transitions also aren't shown. (A --> Moving).

Steps to reproduce

Try this mermaid text and see missing/hidden edge from parent to child:

stateDiagram-v2
    [*] --> Moving

    state Moving {
        A
        B
    }
    Moving --> A : edge hidden behind A?
    A --> B
    Moving --> Stopped : STOP

Screenshots

No response

Code Sample

No response

Setup

Suggested Solutions

No response

Additional Context

mermaid is pretty fantastic! Thanks! We are starting to use it to generate web based simulations for StateSmith state machines.

image

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