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
115 stars 31 forks source link

Workflow Diagram: Add dynamic zoom #2174

Open josephjclark opened 3 weeks ago

josephjclark commented 3 weeks ago

In the workflow diagram, when you add a new node, the current behavior is to zoom to fit the whole chart.

This is super annoying on large charts if you've zoomed into a corner of it, because you'll be zoomed out. In order to edit the placeholder you have to zoom right back in again.

Workflows don't even have to be particularly big before this becomes a problem.

We could add buttons somewhere to zoom to fit and toggle auto zoom - but these feel clumsy. They're hard to communicate (what icon would you use?) and it's fiddly to keep adjusting settings.

I think the answer is a dynamic zoom. When you add a node, we zoom the diagram to fit whatever steps you can see now, PLUS the new step.

These kind of behaviours are fiddly to implement, but if we can at least reduce the amount of zoom movement on add, we'll greatly improve the user experience.

josephjclark commented 3 weeks ago

Would also close #2005