mermaid-js / mermaid

Generation of diagrams like flowcharts or sequence diagrams from text in a similar manner as markdown
https://mermaid.js.org
MIT License
68.79k stars 6.08k forks source link

Feature/4060 gantt working hours #5403

Open robo1200 opened 3 months ago

robo1200 commented 3 months ago

:bookmark_tabs: Summary

First contribution to the community but a long time user and want to start providing some added benefit. Only a hobbyist developer so apologies in advance if some of this is not right first time. Updated the Gantt chart to allow workday start and end times to be entered and for the gantt chart to then uses them for calculated task end dates assuming durations in hours and or minutes are provided.

Resolves #4060

:straight_ruler: Design Decisions

Added options to the parser for a Working day start time and working day end time

Ammended the GetEndDate function to be able to calculate task end dates and times using working hours if provided by the user alongside a task duration. Ensured through testing that other elements of the gantt chart functionality such as inclusive / exclusive weekends can still be used in conjuction

Added applicable tests for both the parser and the ganttDB file.

:clipboard: Tasks

Make sure you

netlify[bot] commented 3 months ago

Deploy Preview for mermaid-js ready!

Name Link
Latest commit 97aa491a7224bb69f158de401b32ef470a404774
Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/667086102591410008f18387
Deploy Preview https://deploy-preview-5403--mermaid-js.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

robo1200 commented 3 months ago

@sidharthv96 My apologies but I have quite a lot of conflicts with my branch. It this something relating to my request or something that should occur? Happy to make changes if this on me to fix. If so can someone point me in the right direction. thanks :)

codecov[bot] commented 2 months ago

Codecov Report

Attention: Patch coverage is 84.21053% with 12 lines in your changes missing coverage. Please review.

Project coverage is 5.87%. Comparing base (d6ccd93) to head (f344cfa). Report is 2 commits behind head on develop.

:exclamation: Current head f344cfa differs from pull request most recent head 97aa491

Please upload reports for the commit 97aa491 to get more accurate results.

Additional details and impacted files [![Impacted file tree graph](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5403/graphs/tree.svg?width=650&height=150&src=pr&token=BaET4V1BdM&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js)](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5403?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js) ```diff @@ Coverage Diff @@ ## develop #5403 +/- ## ========================================== + Coverage 5.73% 5.87% +0.13% ========================================== Files 278 277 -1 Lines 41999 42060 +61 Branches 490 524 +34 ========================================== + Hits 2409 2470 +61 Misses 39590 39590 ``` | [Flag](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5403/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js) | Coverage Δ | | |---|---|---| | [unit](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5403/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js) | `5.87% <84.21%> (+0.13%)` | :arrow_up: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5403?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js) | Coverage Δ | | |---|---|---| | [packages/mermaid/src/diagrams/gantt/ganttDb.js](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5403?src=pr&el=tree&filepath=packages%2Fmermaid%2Fsrc%2Fdiagrams%2Fgantt%2FganttDb.js&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js#diff-cGFja2FnZXMvbWVybWFpZC9zcmMvZGlhZ3JhbXMvZ2FudHQvZ2FudHREYi5qcw==) | `78.06% <84.21%> (+0.58%)` | :arrow_up: | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/mermaid-js/mermaid/pull/5403/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=mermaid-js)