-
Notifications
You must be signed in to change notification settings - Fork 8
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
Select and implement node graph component #2459
Comments
Prototyped a bit with https://github.com/hustcc/echarts-for-react. This works pretty well for layout and basic functionality, but it's very difficult to get more complex data into the nodes themselves, so it'd be hard to visualize things like "here are all the decls of type What was really nice with echarts was having an auto layout mechanism. It looks like there are actually a few options for auto layout with ReactFlow documented here, so I'll take a stab at that next, starting with Dagre. I suspect we could even get subgraphs (i.e. decls as nodes grouped within a module) to lay out nicely by running Dagre recursively, but I'll skip prototyping that since it's such a long-tail sort of feature. Implementation notes for future me: compute size bounds for each subgraph as a function (sqrt?) of node count, make each subgraph a parent node assigned aforementioned size, tell Dagre to lay out the parent nodes, within the full page, and then iterate over each parent node, telling Dagre to lay out the child nodes, but constraining the perimeter to just the space for that parent node. Rendering nice little popups should be easy enough, compared to all the layout math, so if I can get that working well, we could stick to ReactFlow (which seems like the best of all the options for actually rendering complex nodes). |
Dagre was nice until I got to laying out the decls within the module. It doesn't support subflows at all. Switching to Elk. |
We need something better for the current "Console" page which is showing a node graph of the system.
One option might be Apache ECharts.
Ideally, we can view everything about the system visually with some basic interactions to start. I think being able to show a popup window for different nodes, or showing in the right sidebar would be a useful start.
Grafana has a nice "Service Graph" as well, which is nice and simple with popups when clicking on Nodes.
The text was updated successfully, but these errors were encountered: