OpenFn / lightning

OpenFn/Lightning ⚡️ is the newest version of the OpenFn DPG and provides a web UI to visually manage complex workflow automation projects.
https://openfn.github.io/lightning/
GNU Lesser General Public License v3.0
126 stars 34 forks source link

workflow diagram: create nodes and edges with the same button #2175

Open josephjclark opened 3 months ago

josephjclark commented 3 months ago

I've just added a second hover button to a node, so that now you can add a new child node or an edge

An improvement would be to only have a single + button (as originally so), which creates an edge with a ghost node on the end. If you release the mouse on the canvas, a new placeholder node will be created. If you drag to valid node, a new edge will be created.

This should be a nice slick UX. New placeholders are easy to dismiss (just click the canvas again).

One issue is that the node won't be created where you drop it, it'll be subject to the layout. That could be annoying.

josephjclark commented 3 months ago

This may have to wait until we're able to let users move nodes around. Then we can drop the node where the user wants it, and trust manual layout and persistent positions to give a consistent experience.

Also if you drop the nodes somewhere random and auto-layout is enabled, at least the subsequent layout is justified. It's what you the user asked for (even if you didn't really)

josephjclark commented 3 months ago

Alternatively we only run layout after the job is named and the placeholder committed. Still a little weird but maybe ok?