-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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: restore curve type configuration functionality for flowcharts #6408
Conversation
🦋 Changeset detectedLatest commit: f8e329f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
commit: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6408 +/- ##
==========================================
- Coverage 3.86% 3.86% -0.01%
==========================================
Files 412 411 -1
Lines 43160 43178 +18
Branches 664 664
==========================================
Hits 1670 1670
- Misses 41490 41508 +18
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
This pull request addresses the issue with curve type settings not being applied correctly for flowcharts in Mermaid. The changes include restoring the curve type configuration functionality and adding support for additional curve types.
Fixes and Enhancements:
.changeset/curve-interpolation-fix.md
: Documented the fix for restoring curve type configuration functionality for flowcharts. This ensures that curve type settings are applied correctly when configured through various methods.Codebase Updates:
packages/mermaid/src/config.type.ts
: Expanded thecurve
property inFlowchartDiagramConfig
to include additional curve types such as 'bumpX', 'bumpY', 'catmullRom', 'monotoneX', 'monotoneY', 'natural', 'step', 'stepAfter', and 'stepBefore'.packages/mermaid/src/diagrams/flowchart/flowDb.spec.ts
: Added tests to verify that the default and edge-specific interpolation settings are applied correctly.Implementation Details:
packages/mermaid/src/diagrams/flowchart/flowDb.ts
: Updated theFlowDB
class to ensure that theinterpolate
property is correctly set for edges, and that the curve type is determined based on edge-specific or default settings. [1] [2]packages/mermaid/src/rendering-util/rendering-elements/edges.js
: Imported additional curve functions fromd3
and updated theinsertEdge
function to handle the new curve types. [1] [2]Schema Update:
packages/mermaid/src/schemas/config.schema.yaml
: Updated the JSON schema to include the new curve types in theenum
for flowchart curve configuration.Resolves #6193
📏 Design Decisions
Describe the way your implementation works or what design decisions you made if applicable.
📋 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:
.