fix(elk): scope rounded edge curve to ELK layout only#7454
fix(elk): scope rounded edge curve to ELK layout only#7454ashishjain0512 merged 1 commit intomasterfrom
Conversation
Reverts the global flowchart curve default from 'rounded' back to 'basis' and instead sets edge.curve = 'rounded' on each ELK edge right before insertEdge. This ensures ELK's orthogonal routes render with right-angle segments and rounded corners, without changing the default for non-ELK layouts. Fixes #7213 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #7454 +/- ##
=========================================
- Coverage 3.59% 3.53% -0.06%
=========================================
Files 475 493 +18
Lines 47191 49010 +1819
Branches 735 769 +34
=========================================
+ Hits 1696 1734 +38
- Misses 45495 47276 +1781
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
ashishjain0512
left a comment
There was a problem hiding this comment.
[sisyphus-bot]
Clean, focused fix — this is exactly the right scope for the ELK edge curve issue.
Note: PR targets master. This appears to be an intentional hotfix by the maintainer. Also note that PR #7452 covers this same fix bundled with other changes — worth clarifying which PR supersedes the other.
What's working well
🎉 [praise] Excellent scoping — the fix is isolated to just 3 files with no collateral changes. Reverting the global default to basis in config.schema.yaml:2160 and setting edge.curve = 'rounded' only in the ELK render path (render.ts:1073) is the cleanest possible approach.
🎉 [praise] Good explanatory comment on the edge.curve = 'rounded' line — "ELK produces orthogonal edge routes" explains the why, not just the what.
🎉 [praise] The changeset correctly scopes to both mermaid and @mermaid-js/mermaid-layout-elk packages with patch bumps. The description clearly communicates what changed and what's unaffected.
Things to address
🟡 [important] The PR checklist shows unchecked items for Cypress e2e snapshots and CI. Since this changes the rendering behavior of ELK edges, visual regression verification is important — especially to confirm that the original issue (#7213, curved ELK edges) is resolved and that non-ELK flowcharts are visually unchanged. It would be great to confirm CI passes cleanly before merge.
💡 [suggestion] Consider adding a Cypress e2e test case using the reproduction diagram from issue #7213 (the flowchart with subgraphs G1/G2 and repeated N11 --- N22 edges). This would prevent regression of this specific fix and serve as documentation that ELK edge routing is intentionally orthogonal.
Security
No XSS or injection issues. This PR only modifies a config default value and sets a string property (edge.curve) on an internal edge object. No user input handling, DOM manipulation, or sanitization changes.
Self-check
- At least one 🎉 [praise] item exists (3)
- No duplicate comments
- Severity tally: 0 🔴 blocking / 1 🟡 important / 0 🟢 nit / 1 💡 suggestion / 3 🎉 praise
- Verdict: COMMENT (1 🟡 — e2e verification pending)
- Not a draft PR
- No inline comments used
- Tone check: constructive, appreciative
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
|
@knsv-bot, Thank you for the contribution! |
* 'master' of https://github.com/mermaid-js/mermaid: fix(gantt): restore readable outside-text for done tasks in dark mode (#7456) fix(elk): scope rounded edge curve to ELK layout only (#7454)

Summary
Scopes the fix from #7425 (issue #7213) so that the
roundedcurve is only applied when the ELK layout algorithm is used, rather than changing the global default for all flowcharts.flowchart.curvedefault from'rounded'back to'basis'edge.curve = 'rounded'on each ELK edge right beforeinsertEdge, ensuring ELK's orthogonal routes render with right-angle segments and rounded cornersResolves #7213
Test plan
🤖 Generated with Claude Code