-
-
Notifications
You must be signed in to change notification settings - Fork 7.4k
fix(flowchart): make subgraphs inherit global graph direction by default #6435
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
fix(flowchart): make subgraphs inherit global graph direction by default #6435
Conversation
|
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
commit: |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6435 +/- ##
=======================================
Coverage 3.86% 3.86%
=======================================
Files 412 412
Lines 43189 43189
Branches 664 664
=======================================
Hits 1670 1670
Misses 41519 41519
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
The Argos visual diffs are expected due to the fix for subgraph direction inheritance. Subgraphs now inherit the global graph direction instead of defaulting to TD, which changes their layout. Please accept these changes in Argos or mark them as expected. |
@ashishjain0512 can you please review the argos changes ? |
@nour0205 I looked at the PR and I think this is a welcome change, and agree that there can we some scenarios where the users would want same direction throughout the flowchart. However, it was a conscious decision to have it implemented in the current state, where each nested layer of sub-graph alternates the directions to utilize space and let the diagram grow both vertically and horizontally. Also, we believe any new changes should have a minimum impact on existing diagrams, and this change could impact all flowcharts with sub-graph. I propose we add a flowchart config option Once this is driven via configuration, and you add some rendering and spec test around it, we will be happy to merge. If you have questions, you can reach out here. CC: @knsv |
Closing this in favor of your new PR #6470 |
📑 Summary
Fixes an issue where subgraphs in flowcharts always default to
TD
(top-down) layout, ignoring the global graph direction (LR
,RL
,BT
).Resolves #6428
📏 Design Decisions
Modified
flowDb.ts
to assigndir = getDirection()
when the subgraph's direction is not explicitly set.**before

**after
📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.