-
-
Notifications
You must be signed in to change notification settings - Fork 8k
fix: trim the direction string in flowchart #6739
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: trim the direction string in flowchart #6739
Conversation
🦋 Changeset detectedLatest commit: 98bf9b4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
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 project configuration. |
@mermaid-js/examples
mermaid
@mermaid-js/layout-elk
@mermaid-js/mermaid-zenuml
@mermaid-js/parser
@mermaid-js/tiny
commit: |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6739 +/- ##
=======================================
Coverage 3.85% 3.85%
=======================================
Files 455 455
Lines 44772 44772
Branches 707 707
=======================================
Hits 1725 1725
Misses 43047 43047
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 ↗︎
|
@kriss-u, Thank you for the contribution! |
📑 Summary
This PR fixes the wrong behavior of direction
TD
which should've behaved likeTB
.In
flowDb.ts
, the methodsetDirection
takesdir
string argument representing the direction. The data received had an extra space' '
before the direction identifier, e.g." TD"
. There is a check if the direction isTD
, convert it toTB
with strict equality check.Resolves #6681
📏 Design Decisions
In
flowDb.ts
, the methodsetDirection
takesdir
string argument representing the direction. The data received had an extra space' '
before the direction identifier, e.g." TD"
. There is a check if the direction isTD
, convert it toTB
with strict equality check. Thus," TD" === "TD"
is always false, hence not converted to "TB" as shown below.To fix this, trimming the string is the best way instead of changing the right hand side of the equality check or using another condition.
Test with the following:
📋 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:
.