-
-
Notifications
You must be signed in to change notification settings - Fork 8.4k
fix: throw errors for invalid duration tokens in Gantt diagrams #7227
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
base: develop
Are you sure you want to change the base?
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 #7227 +/- ##
==========================================
+ Coverage 3.56% 3.58% +0.01%
==========================================
Files 473 473
Lines 47566 47577 +11
Branches 734 738 +4
==========================================
+ Hits 1696 1705 +9
- Misses 45870 45872 +2
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 ↗︎
|
…Duration function
omkarht
left a comment
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.
Implementation is excellent, but test coverage is insufficient, please add tests for all invalid patterns mentioned in your comments plus regression tests for valid duration and edge cases (currently 1 test, need 5+).
Thank you! Added some more pattern tests, as well as some regression tests for sanity check. Let me know if you need anything else! |
📑 Summary
These fixes ensure that if there are extra characters after a task duration, an error is thrown instead of failing silently.
We also added a test to ensure that it throws errors on invalid duration tokens.
Resolves #6586
In association with the following doc pr: #7212
📏 Design Decisions
Added conditional logic in
mermaid/src/diagrams/gantt/ganttDb.json line 394 to ensure an error is thrown if check fails.Our comment:
📋 Tasks
Make sure you
MERMAID_RELEASE_VERSIONis used for all new features.pnpm changesetand following the prompts. Changesets that add features should beminorand those that fix bugs should bepatch. Please prefix changeset messages withfeat:,fix:, orchore:.