-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
feat : add alias support for new participant syntax #7136
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
base: develop
Are you sure you want to change the base?
feat : add alias support for new participant syntax #7136
Conversation
🦋 Changeset detectedLatest commit: b33ce14 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
@mermaid-js/examples
mermaid
@mermaid-js/layout-elk
@mermaid-js/layout-tidy-tree
@mermaid-js/mermaid-zenuml
@mermaid-js/parser
@mermaid-js/tiny
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #7136 +/- ##
==========================================
- Coverage 3.55% 3.55% -0.01%
==========================================
Files 473 474 +1
Lines 47496 47510 +14
Branches 731 731
==========================================
Hits 1687 1687
- Misses 45809 45823 +14
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
sidharthv96
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure if we should support this syntax. The @{ } syntax is meant to define all custom properties of a node. So shouldn't it just be ID@{ alias: 'Alias' }?
Mixing the old syntax with new seems wrong.
…in sequence diagrams on-behalf-of: @Mermaid-Chart <[email protected]>
📑 Summary
This PR adds comprehensive alias support for participants in Sequence Diagrams, enabling users to define aliases in two ways:
askeyword): Combine participant stereotypes with aliases using syntax likeparticipant API@{ "type" : "boundary" } as Public APIparticipant API@{ "type": "boundary", "alias": "Public API" }Both syntaxes allow users to assign UML stereotype types and descriptive aliases to participants, with full backward compatibility maintained.
🎯 Key Features
1. External Alias Syntax
Users can now use the
askeyword after stereotype configuration:2. Inline Alias Syntax
Users can define aliases directly inside the configuration object:
3. Precedence Rule
When both inline and external aliases are provided, the external alias takes precedence: