-
Notifications
You must be signed in to change notification settings - Fork 39
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
Workflow Diagram: "edge merging" (new edge creation) #2160
Conversation
Very suboptimal implementation, but it works
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2160 +/- ##
==========================================
+ Coverage 89.60% 89.61% +0.01%
==========================================
Files 269 269
Lines 8947 8958 +11
==========================================
+ Hits 8017 8028 +11
Misses 930 930 ☔ View full report in Codecov by Sentry. |
Removal of edges is going to have to happen from the lightning side I think - just like how we remove steps. I'll need help with that. |
Encountered a big problem with the layout. We are using the dagre algorithm to run layouts now. This can handle simple graphs in a way that d3's tree layout cannot (to be fair I haven't actually tested this..) The problem with dagre is that when you add nodes, it has tendency to switch nodes orders around more or less at random. Looks like d3 is doing this in production too - maybe not quite as badly as dagre on this branch. Now we can fix this by setting This option was exposed in fairly recent PR: dagrejs/dagre#263. I've reproduced this locally by hacking the code, so I know it works. But here's the fun bit! Due to what looks like a bug in the release, the options object doesn't actually get passed through to the layout algorithm. It basically looks like half the fix PR got merge conflicted out, or something. It's totally borked. Dagre is basically in maintenance mode and only gets very sporadic updates. I don't expect much of a response if we turn to the community. So here are our options:
What do you reckon @stuartc ? I say FORK IT |
This comment was marked as resolved.
This comment was marked as resolved.
I've added controls. I kinda think the options we need are:
Which is too many buttons really. But both layout and view you need to be able to separately run once and set the behaviour when adding new nodes/edges. The behaviour for adding new nodes with view-fit off is terrible by the way. Especially if the layout goes haywire. I wonder if the auto-view behavior is: zoom to fit all nodes visible now, PLUS this new one. That seems like a good compromise but it's a new feature really. Might be hard to implement. I'd really, really like to avoid supporting manual layout. |
This comment was marked as resolved.
This comment was marked as resolved.
Just for the record, if we use d3 hierarchy, it seems to only use the first edge to work out the hierarchy. So it basically won't layout at all, it assumes a single parent |
This comment was marked as resolved.
This comment was marked as resolved.
So we just need to support edge removal and this is good to go. I am going to take a look at a better autofit in another PR tomorrow - I have a feeling I can turn it around quickly. But it should not block this release. Suggest we stick with autolayout for now |
Allow new edges to be created in the workflow diagram. Also enables the removal of edges (removing an edge should not remove the steps at either end)
Edges can only be created between two steps:
Changes in this PR
Issue
#2008 #2006
TODO