-
Notifications
You must be signed in to change notification settings - Fork 97
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
Improve Types/Docs #113
Comments
I'm not going to comment further on the state of the documentation :). I agree that it's hard to find the right options and that explanations could be improved. Our try to automate as much as possible with the given capacities we had, resulted in the layout option reference. Regarding typescript types: I believe your suggestion would be a valuable improvement (as an alternative to the string-based option names). For it to be maintainable, I think the type defs must be generated automatically. Also, the json graph parser must be made aware of the fact that options can be nested objects. Hence, I see two tasks: First, allow nested options. I believe, I created a ticket for this a while back (can't find it right now) or at least had this in the back of my head. Second, the typescript definitions must be generated. We already generate the Java Code for the layout options based on |
@uruuru - understand completely. I've done a LOT of graphs and this is BY FAR the best graph engine compared to libs like dagre, however, due to the issues with the docs its very difficult to use which would really hurt adoption. Sadly I have zero experience with Java so if the requirement is dynamically generated based on that I won't be able to help. Wish there was something I could do to help outside of that though. |
If you guys figure out what the TypeScript files will have to look like, I'm happy to help figure out how to auto-generate them. 🙂 |
I'm also lost in the documentation. @amcdnl In your example, you define
Why does it use Right now, I'm kinda throwing options randomly and see if they have any effect, I wish there was a proper TS type for the |
@Vadorequest the front part of a layout option identifier can be omitted as long as the remaining part is unique. |
Request
The documentation is quite difficult to use - even after building an entire project with it I'm still unsure of many of the options I have available. I find myself quite a bit searching Github code repos for combinations along with digging through source code. The docs for the Java project are not very helpful either since you have to guess namespaces/etc how they translate.
I think improving the types would also be very beneficial as they are not even complete and cause conflicts when using props not on them.
I would be happy to help make this happen but I'm not quite equipped to help guide the way. Maybe if someone on the team could kick this off and the community can help follow.
Suggestion
Here is a list of options I currently use but I'm not even sure what some of them do besides adding/removing them to see different layouts.
I think it would also be very helpful if they were real objects rather than dot notation props. I could imagine the above to be something like:
You could very easily use a flattening npm package to turn those objects into dot notation props automatically.
The text was updated successfully, but these errors were encountered: