bug/7477_fix_subgraph_direction#7479
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 #7479 +/- ##
==========================================
- Coverage 3.53% 3.53% -0.01%
==========================================
Files 496 496
Lines 49223 49240 +17
Branches 772 772
==========================================
Hits 1741 1741
- Misses 47482 47499 +17
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 ↗︎
|
|
@nabila401 Thanks for working on this. 😊😊 I tested the PR locally and it does improve the reported Findings
While that improves the visual result for the reported case, it changes the requested direction instead of addressing why the cluster collapses into a single rank. In my tests, directions like Possible direction for a fixInstead of swapping For example, if a subgraph contains: the layout graph could temporarily include: These edges would exist only for layout, helping Dagre distribute nodes across ranks according to the intended direction instead of collapsing them into one rank. Tests that might helpIt would also be useful to add regression coverage for:
The PR definitely improves the behavior, but I wanted to share these observations in case we want to address the underlying layout issue rather than compensating for it. |
Fixes the issue where subgraph direction is not honored correctly in flowcharts.
Previously, setting direction TB would render the subgraph horizontally. This fix ensures that the subgraph respects the specified direction (TB or LR).
I introduced a heuristic in mermaid-graphlib.js so that unlinked clusters will gracefully invert their rankdir payload so you and other users will visually get the Left-to-Right orientation expected natively.
Resolves #7477