Skip to content
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

converting ganttdb to typescript #5774

Open
wants to merge 11 commits into
base: develop
Choose a base branch
from

Conversation

Austin-Fulbright
Copy link
Contributor

📑 Summary

Converting the ganttDb.js to ganttDb.ts. This is a two part process that will eventually lead to converting gantt jison to langium. I will also try and fix as many bugs that exists in gantt while I convert this to typescript and then create the parser for langium.

Resolves #

📏 Design Decisions

Converting to typescript

📋 Tasks

Make sure you

  • 📖 have read the contribution guidelines
  • 💻 have added necessary unit/e2e tests.
  • 📓 have added documentation. Make sure MERMAID_RELEASE_VERSION is used for all new features.
  • 🦋 If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpm changeset and following the prompts. Changesets that add features should be minor and those that fix bugs should be patch. Please prefix changeset messages with feat:, fix:, or chore:.

Copy link

changeset-bot bot commented Aug 25, 2024

⚠️ No Changeset found

Latest commit: 32167d9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

netlify bot commented Aug 25, 2024

Deploy Preview for mermaid-js ready!

Name Link
🔨 Latest commit 32167d9
🔍 Latest deploy log https://app.netlify.com/sites/mermaid-js/deploys/66ce215729b3b100087be2a2
😎 Deploy Preview https://deploy-preview-5774--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.

@Austin-Fulbright
Copy link
Contributor Author

I made this a draft because there is a lot of refactoring that needs to be done.

Copy link

argos-ci bot commented Aug 25, 2024

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Aug 27, 2024, 7:07 PM

Copy link

codecov bot commented Aug 25, 2024

Codecov Report

Attention: Patch coverage is 83.61858% with 67 lines in your changes missing coverage. Please review.

Project coverage is 5.48%. Comparing base (2d481c4) to head (32167d9).

Files Patch % Lines
packages/mermaid/src/diagrams/gantt/ganttDb.ts 78.66% 64 Missing ⚠️
...ckages/mermaid/src/diagrams/gantt/ganttRenderer.js 0.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           develop   #5774      +/-   ##
==========================================
+ Coverage     5.20%   5.48%   +0.28%     
==========================================
  Files          322     323       +1     
  Lines        46129   46262     +133     
  Branches       561     565       +4     
==========================================
+ Hits          2402    2539     +137     
+ Misses       43727   43723       -4     
Flag Coverage Δ
unit 5.48% <83.61%> (+0.28%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
packages/mermaid/src/diagrams/gantt/gantt.type.ts 100.00% <100.00%> (ø)
...ckages/mermaid/src/diagrams/gantt/ganttRenderer.js 0.00% <0.00%> (ø)
packages/mermaid/src/diagrams/gantt/ganttDb.ts 74.55% <78.66%> (ø)

... and 1 file with indirect coverage changes

@Austin-Fulbright Austin-Fulbright changed the title convertting ganttdb to typescript converting ganttdb to typescript Aug 25, 2024
@Austin-Fulbright Austin-Fulbright marked this pull request as ready for review August 27, 2024 18:56
@Austin-Fulbright
Copy link
Contributor Author

I am not satisfied with how I am handling the task types. I think I can make raw tasks a subset of type task and I might not even need the base class.

@Austin-Fulbright
Copy link
Contributor Author

I need to get a better understanding of why we need to have two different types of tasks in the first place. And I might do some refactoring around that. The startTime and endTime delima should not be different types of variables on different task types.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants