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

Differentiate "state name/title" and "state description" is not clearly define and have side effect #5795

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

Comments

@flabb17
Copy link

flabb17 commented Aug 30, 2024

Description

Official documentation for state says that
state "line1" as A and A: line3 are both description of state A
but the render of the first "description" is not the same : it is clearly a "title" or a "name"

stateDiagram-v2
state "line1" as A 
state "line2" as A 
state "line3" as A 
stateDiagram-v2
state "line1" as A 
state "line2" as A 
state "line3" as A 
Loading
stateDiagram-v2
state "line1" as A 
state "line2" as A 
state "line3" as A
stateDiagram-v2
A: line1
A: line2
A: line3
Loading

and if you have sub state : (description) can't be multiple for state

stateDiagram-v2
state A  {
    state B{
        state C{ 
            D
        }
    }
}
A : A_first_description
A : A_second_description
A : A_third_description

==> error

stateDiagram-v2
state A  {
    state B{
        state C{ 
            D
        }
    }
}
A : A_first_description
A : A_second_description
A : A_third_description
Loading

but

stateDiagram-v2
state A : A_first_description {
    state B{
        state C{ 
            D
        }
    }
}

A : A_second_description
A : A_third_description

give two separated state A

stateDiagram-v2
state A : A_first_description {
    state B{
        state C{ 
            D
        }
    }
}

A : A_second_description
A : A_third_description
Loading

Steps to reproduce

Test the code on the description

Screenshots

No response

Code Sample

No response

Setup

  • Mermaid version:
  • Browser and Version: [Chrome, Edge, Firefox]

Suggested Solutions

So for me :

  • the as is clearly the definition an alias for the state to not use the full state name and should not be possible more that once.
  • the : should be clearly define as a description , and the first description can't be used as "state name"
  • state define with sub state should react as "normal" state

Additional Context

No response

@flabb17 flabb17 added Status: Triage Needs to be verified, categorized, etc Type: Bug / Error Something isn't working or is incorrect labels Aug 30, 2024
@flabb17 flabb17 changed the title Differentiate "state name/title" and "state description" is not clearly define , but exist in reality Differentiate "state name/title" and "state description" is not clearly define and have side effect Aug 30, 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