-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
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
Add hex shape for flow charts #970
Conversation
…arser. Need to work on properly sizing it.
Pull Request Test Coverage Report for Build 1053
💛 - Coveralls |
The hexagon shape in flow chart now fits the width and height independently, so it can better fit large content without taking up too much space.
The "corner" triangles are a fixed ratio to the height, so the triangles will always be mathemtically similar.
Probably won't be able to work on this until tomorrow night, but should be able to wrap it up then. |
Hey, thank you very much for the work you've done so far! Looking forward to seeing it complete and merging it! As a side note, just in case you were not aware, when you do a pull request (even a draft) and then do commits to it, everyone that's subscribed to the repository (mostly collaborators) gets a notification (email or any other type) per each commit so, if possible, avoid doing so. If you need to do it for a specific reason, or to make your work easier, that's more than fine! It's not a big deal! |
Nice, docs and all! Let me know when done. Will merge this to develop. Collecting changes for version 9 there. Good to have master ready for critical bug fixes. |
Eek, sorry about that @dunning-kruger, didn't realize it would be so noisy. Is there any way to get coveralls to run for me without pushing commits? |
@mearns I don't think there's an easy way. I believe or current setup is building in travis then pushing the coverage to coveralls, which means that you would have to set up both in your fork. |
So a little more clean up to do, but I've added some new simple tests for the flow chart shape rendering functions, which required a light refactor (specifically pulling this out into |
I'm done with initial development on this, it's ready for review. I implemented the hexagon shaping using double curly braces as the markup, sort of in the spirit of "round" versus "circle", but if you have an alternative you'd prefer, let me know:
vs.
Here's a screenshot of the new element. It's designed to have the side "triangles" always a similar shape (the angles are always fixed). That means it will still grow horizontally as it grows vertically, but not nearly as aggressively as the diamond. I chose this so that the angles don't become too shallow in tall elements, which would make the hex and a rectangle harder to distinguish. For reference, here's the diamond with the same contents: I noted above a light refactor of the flowRenderer, to pull the shape-rendering functions out into a separate module. The immediate impetus for this was to make up for a decrease in code coverage that came from decreasing the total number of lines (which itself was triggered by codeclimate complaining about the same code appearing multiple times 🙁). I think the refactor is a positive change overall, but if you have other ideas just let me know =) |
Good job @mearns ! I appreciated your refactoring, it improved the code! I also like that you added many unit tests. |
Working on issue #530.