mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
68.75k stars 6.08k forks source link

Add named composite state example to stateDiagram-v2 #5485

Closed cbugk closed 2 months ago

cbugk commented 2 months ago

:bookmark_tabs: Summary

Although this can be deduced from naming a state, performing it in a one-liner should not be assumed. So having an explicit example is better IMO.

Resolves #5474

:straight_ruler: Design Decisions

Just defined a named state, and then populated it, alongside the first example of composites. This is not propagated to following examples though.

:clipboard: Tasks

Make sure you

netlify[bot] commented 2 months ago

Deploy Preview for mermaid-js ready!

Name Link
Latest commit 3000f0208fec5c9775ebc5b919e4cff3e112933a
Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/662be884da27830008111f41
Deploy Preview https://deploy-preview-5485--mermaid-js.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

codecov[bot] commented 2 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 5.72%. Comparing base (47c5abb) to head (3000f02).

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5485/graphs/tree.svg?width=650&height=150&src=pr&token=BaET4V1BdM&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js)](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5485?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js) ```diff @@ Coverage Diff @@ ## develop #5485 +/- ## ========================================== - Coverage 5.73% 5.72% -0.01% ========================================== Files 277 278 +1 Lines 42002 42013 +11 Branches 515 490 -25 ========================================== Hits 2407 2407 - Misses 39595 39606 +11 ``` | [Flag](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5485/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js) | Coverage Ξ” | | |---|---|---| | [unit](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5485/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js) | `5.72% <ΓΈ> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js#carryforward-flags-in-the-pull-request-comment) to find out more. [see 1 file with indirect coverage changes](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5485/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js)
mermaid-bot[bot] commented 2 months ago

@cbugk, Thank you for the contribution! You are now eligible for a year of Premium account on MermaidChart. Sign up with your GitHub account to activate.