-
-
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
Gantt milestones #788
Gantt milestones #788
Conversation
If a task is a milestone, the rect shape will be square in the center of the original width of the rectangular calculated if it weren't a milestone. The placement of the label text is adjusted accordingly. Both the rect and the text get a 'milestone' and 'milestoneText' class accordingly. The scss rotates the square and scales it a bit down, so that it's a diamond, which appears to be the defacto standard for milestone icons. The label text is put in italics. The rotational transform is done in the scss, so that it's easy for users to create their own milestone icon-style.
Pull Request Test Coverage Report for Build 730
💛 - Coveralls |
The allowed tags are now a const at the top of the code. Adding a tag there, automatically assigns the property to the javascript object, if the tag is present in the data.
To reduce the dependencies of the Jest test cases, the moment dates in both Jest test files are replaced with native javascript. Also the physical file gantt.spec.js is moved to be in the same folder as gantt.js
What are the chances this can be merged? |
Thanks for this Gijs! I just merged this. Would you add some description for this in the docs? I am sure many will want to use milestones but wont know about them otherwise. Also, since you made the pull request I have added an e2e section. It is still WIP but if you add a test for the milestones it will make sure that they will render fine going forward. Its is quite easy, one just adds a diagram and an image snapshot will be made and if it suddenly renders differently the test will break. Its WIP as images depend on environment so snapshots generated in macos does not match snapshots generated in linux dure to fons ans anti-aliasing ans such. Still they help me when I merge pull requests. If thats to much work just send me a gantt you think is suitable for the test as text to [email protected] And... thanks for you effort! |
I'm proud as a small child now that you have merged this. Will look into documentation and e2e testing later this week (hopefully). I'll create a separate PR when done. |
…yarn/develop/cypress-9.6.1 chore(deps-dev): bump cypress from 9.6.0 to 9.6.1
This is my first PR for this project, so be gentle.
I've added the possibility to mark tasks in a Gantt chart as milestones.
What this does is the following:
It's backwards compatible, so if the milestone tag isn't there, it should work as expected.
Milestones with a task duration of several days don't really make sense, but it would still work. You just get a lot of padding to the left and right. This also happens when the timescale is very wide, like so: