OpenFn / OpenFn/lightning

Workflow Diagram: Autolayout fails to fit the view when zoomed in

Open
#3,376 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Elixir
Stars
296
Forks
86
Avg merge
1d 13h
Merged PRs (30d)
50

Description

There's a small issue in the Diagram where if you hit the "Run Auto Layout" control, and you're not at standard zoom, the view won't fit to the right place.

What I expect is that the whole workflow will fit on my canvas, I can see the whole thing.

But what happens is that the view will fit an apparently random set of nodes.

I think what's actually happening is that the component is trying to fit all the currently visible nodes - not the whioe thing

I actually thought this was fixed so it's a little confusing 🤷 This was seen on 2177-workflow-diagram-add-undoredo, but I assume it's on main too

To repo:

  • Open any workflow with Auto Layout (ideally something with a decent tree)
  • zoom in so that some nodes are out of sight
  • Hit the Run Layout button
  • The layout will run (and do nothing) and the view will move to a random place

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce this in a workflow with Auto Layout by zooming in until nodes are out of view, then using the Run Layout control. Compare the result with standard zoom; done means the entire workflow fits visibly on the canvas regardless of the starting zoom level.

Written by the indexing model from the issue text.

Assessment

Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.