-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
refactor: Unify the edgeMarker adding logic #4837
Conversation
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## develop #4837 +/- ##
===========================================
- Coverage 77.35% 75.44% -1.91%
===========================================
Files 164 165 +1
Lines 13869 13845 -24
Branches 698 702 +4
===========================================
- Hits 10728 10446 -282
- Misses 2987 3228 +241
- Partials 154 171 +17
Flags with carried forward coverage won't be shown. Click here to find out more.
|
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 will make the code a lot more maintainable! The only issue I see is that the current code ignores invalid values (like ) url(https://my-malicious-url.example)
, but your proposed code adds a marker with that value.
My recommendation is to either:
- keep the old behavior and ignore invalid values (see my comment for details), or
- if we know that invalid values will never be used, we should probably change the TypeScript type from
string
to"arrow_cross" | "arrow_point" | "aggregation" // etc
.
Co-authored-by: Alois Klink <alois@aloisklink.com>
* develop: (155 commits) chore(deps): update all patch dependencies chore: release v10.6.1 fix(flow): fix invalid ellipseText regex review fixes Update XYChart's nav link in the docs template add comment for ts ignore move decodeEntities to utils review fixes chore(deps): update all minor dependencies chore: Point to correct changelog add spec fix: getMessageAPI so it considers entity codes chore(deps): update all patch dependencies Update integrations-community.md docs: upate the list of tools with native support of mermaid Fix typo in build-docs.yml Updated mermaid version Limiting the number of edges that are allowed in the flowchart Update README.md Update README.md ...
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.
Thanks for making those changes. It all looks good to me :).
I think you're good to merge now, but before we merge, my gut feeling is to add a Skip changelog label to this PR, since it seems like a lowish risk refactoring change. But 🤷, it's up to you.
Edit: At some point, we probably should write a "Reviewing PRs" guide for maintainers, including when to put labels on PRs.
📑 Summary
Simplify and unify the logic to add edgeMarker
📏 Design Decisions
Keeping it separate will add more bugs when a PR modifies only one place.
📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.develop
branch