mermaid
mermaid copied to clipboard
feat(state): add from, to ids for edge
:bookmark_tabs: Summary
The ID of the from-to relationship was added to the diagram's edges. Another denominator "_" was used to make the extraction of these respective IDs easier.
:straight_ruler: Design Decisions
I am currently working on converting state diagram to Excalidraw, and I felt the need to have an easier way to find the edges.
I tried some alternative paths but without success, for example:
- Manually tracking each edge, and using it as an index to search in
.edgePaths
, however, the index does not always reflect how we iterate through the parser.doc. - Using the respective
graphCount
id to get the edge, but in cases where we have multiple relationships for the same state, it may not find the correct edge because we do not have access to thegraphCount
in the parser.doc, only to the node id.
:clipboard: Tasks
Make sure you
- [x] :book: have read the contribution guidelines
- [ ] :computer: have added necessary unit/e2e tests.
- [ ] :notebook: have added documentation. Make sure
MERMAID_RELEASE_VERSION
is used for all new features. - [x] :bookmark: targeted
develop
branch
Deploy Preview for mermaid-js ready!
Name | Link |
---|---|
Latest commit | da150e8767eab63ef9e95be73a6696f34ffca161 |
Latest deploy log | https://app.netlify.com/sites/mermaid-js/deploys/6638ba5d184fe10008ebd40c |
Deploy Preview | https://deploy-preview-5503--mermaid-js.netlify.app |
Preview on mobile | Toggle 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 Report
Attention: Patch coverage is 4.54545%
with 42 lines
in your changes are missing coverage. Please review.
Project coverage is 5.73%. Comparing base (
e68125e
) to head (da150e8
).
Additional details and impacted files
@@ Coverage Diff @@
## develop #5503 +/- ##
=======================================
Coverage 5.73% 5.73%
=======================================
Files 277 277
Lines 41999 42033 +34
Branches 515 515
=======================================
+ Hits 2407 2409 +2
- Misses 39592 39624 +32
Flag | Coverage Δ | |
---|---|---|
unit | 5.73% <4.54%> (+<0.01%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Files | Coverage Δ | |
---|---|---|
...ges/mermaid/src/diagrams/class/classRenderer-v2.ts | 0.00% <0.00%> (ø) |
|
...ges/mermaid/src/diagrams/flowchart/flowRenderer.js | 0.00% <0.00%> (ø) |
|
.../mermaid/src/diagrams/flowchart/flowRenderer-v2.js | 0.00% <0.00%> (ø) |
|
...ges/mermaid/src/diagrams/state/stateRenderer-v2.js | 0.00% <0.00%> (ø) |
|
packages/mermaid/src/utils.ts | 41.60% <12.50%> (-0.51%) |
:arrow_down: |
@igorwessel, 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.
@sidharthv96 could we include it in a minor release? I can do a double-check and look to see if any breaking changes were introduced.
Current develop has breaking changes, slotted for v11. So we'll have to extract your changes and rebase onto master to make a new release. We are only doing v10 security releases now.
@sidharthv96 is there an RC version that we can use to unblock and test these changes ?
@sidharthv96 I realized that this modification was not in the release, I will open a PR again by inserting the IDs. 😆
Everything that was merged should have been out in v11 release. I'm on my mobile rn, so can't check what happened.