fix(state): apply state config spacing to dagre layout#7490
fix(state): apply state config spacing to dagre layout#7490adi-rajput wants to merge 2 commits intomermaid-js:developfrom
Conversation
|
✅ 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 #7490 +/- ##
==========================================
- Coverage 3.52% 3.51% -0.01%
==========================================
Files 509 509
Lines 49790 49832 +42
Branches 785 785
==========================================
Hits 1754 1754
- Misses 48036 48078 +42
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 ↗︎
|
|
If the tests are required for the patch then i will add some tests. |
Summary
Fix excessive spacing in state diagram layouts so
state.nodeSpacingandstate.rankSpacingare respected by the Dagre layout engine.Currently, state diagrams may render with unnecessarily large gaps between nodes, producing long arrows and oversized diagrams. This change ensures the spacing configuration defined in
stateis applied when constructing the Dagre graph layout.Safe defaults are used when values are undefined and spacing values are clamped to avoid extreme layouts.
Resolves #7381
Design Decisions
state.nodeSpacingandstate.rankSpacingto the Dagre graph layout.30when configuration values are not provided.10and200to prevent invalid or extreme layouts.Tasks
Make sure you
MERMAID_RELEASE_VERSIONis used for all new features.pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.