-
Notifications
You must be signed in to change notification settings - Fork 63
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
Feature Request: Improve Diagram Layout #33
Comments
Might be useful to implement some pathfinding algorithm to find the most optimal path around state nodes to a target state node which avoids "areas of interest" (such as state names, event labels, actions, etc.) |
Integrating cola.js into the cytoscape-based graph viz may be enough to make nice force-directed graph layouts. This example could be useful: https://js.cytoscape.org/demos/colajs-graph/ Unfortunately I don't have a ton of time out of work to implement something like this, but I'll subscribe to this issue so that I can come back to it during Hacktober or something |
I was playing with https://github.com/OpenKieler/elkjs and it works pretty well. SCION a project in which XState is a backer, has a visualizer https://gitlab.com/scion-scxml/schviz which uses KlayJS that is an older version of ELKjs and it works. One option I evaluated is to modify https://gitlab.com/scion-scxml/schviz to support the XState format and this way we could reuse the layout logic. |
If we want to go one step further and want to have an bidirectionnal editing experience (from diagram to code), do we want to reinvent the wheel ? Could we investigate a more robust diagram base, so we can plugin graph layouts and interactivity ? @davidkpiano thoughts appreciated. anyway I'd like to experiment on that. |
@tclain, I think https://github.com/OpenKieler/elkjs works pretty well. I am not sure but I think @davidkpiano is working on an improved visualizer, I saw something about it on Twitter. |
thanks @carloslfu ! I'm investigating:
I think that having stable xstate viz/editor will be definitely a huge step. @davidkpiano I'm working and researching on that personnally, if there is an ongoing effort and I can help in any way let me know. |
Description
Currently, the Visualizer layout algorithm isn't producing very readable diagrams.
The following is a comparison between a diagram produced by PlantUML to one made by XState-Viz:
Details
Suggestion
Two possible approaches:
The text was updated successfully, but these errors were encountered: