-
-
Notifications
You must be signed in to change notification settings - Fork 8.3k
6920: Fix Gantt chart crashes in Obsidian and browser #6945
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
Conversation
🦋 Changeset detectedLatest commit: d318f1a 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 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✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #6945 +/- ##
=======================================
Coverage 3.56% 3.57%
=======================================
Files 473 474 +1
Lines 47198 47212 +14
Branches 728 730 +2
=======================================
+ Hits 1684 1687 +3
- Misses 45514 45525 +11
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 ↗︎
|
on-behalf-of: @Mermaid-Chart <[email protected]>
on-behalf-of: @Mermaid-Chart <[email protected]>
dd9363d to
d318f1a
Compare
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.
Pull Request Overview
This PR fixes a crash in Gantt chart rendering caused by an Invalid array length RangeError when using numeric timestamps with dateFormat 'x' or 'X'. The fix adds proper handling for numeric timestamp parsing.
- Added numeric timestamp validation and parsing for dateFormat 'x' and 'X'
- Included comprehensive test coverage for both 'x' and 'X' dateFormat scenarios
- Created appropriate changeset documenting the bug fix
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/mermaid/src/diagrams/gantt/ganttDb.js | Adds numeric timestamp parsing logic for 'x' and 'X' dateFormats |
| cypress/integration/rendering/gantt.spec.js | Adds test cases to verify numeric timestamp handling |
| .changeset/moody-fans-try.md | Documents the bug fix in changeset |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
📑 Summary
This PR fixes a crash in Gantt chart rendering caused by an Invalid array length RangeError. The issue occurred during axis and tick calculations
Resolves #6920
📏 Design Decisions
Describe the way your implementation works or what design decisions you made if applicable.
📋 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:.