Jump to content

Auto-layout (or better layout) of workflow nodes


Recommended Posts

I seem to remember this being briefly discussed but I’m not finding it on a preliminary search (not sure even if it was a full topic or a post), so here it is in greater detail.
 
Laying out nodes in a workflow is for me a pain point in Alfred. Perhaps I’m the oddball, here, but I like to have everything extremely clear. Case in point, WatchList:
xt5vzHw.png

In case you’re wondering, yes, every row has the exact same distance from the others. Again, maybe I’m taking this to an extreme, but when a workflow reaches that degree of complexity, organisation becomes imperative. It is that organisation that makes it easier to add a node later on, but it also makes it a bore if that node is added to one of the earlier options, since bringing everything has to be made with care.

I also loathe when I see something like this:
6XkTwWY.png

That is not an exaggeration, I’ve found workflows exactly like that — only two nodes, both with some distance from the top, and not even aligned with each other. I wouldn’t blame you if you questioned the quality of the code inside.

Yes, some workflows are hard to keep to a grid in a good way, if for example multiple nodes link to multiple others (instead of a more one-to-one relation), but I feel something could be worked here, still. I’d like to have either:

  • Auto-layout option: press something, and Alfred auto-arranges everything itself. This is a bit more complex — decisions would have to be opinionated, and could lead to more work (bug reports to things not being laid-out accurately) in the future.
  • Snapping: currently, when Alfred makes a new node, it is always in a certain position relative to the preceding one. However, we drag them in small increments. What if we had an option (say ⇧+drag, or even using the arrow keys, since they currently do nothing) that would nudge nodes up an down on this predefined grid?

Second option should be way easier to accomplish, and there’s little room for messing up. We’d still be arranging everything ourselves, but the most obsessive amongst us would have a way better time doing so, and perhaps even the less obsessed would join in.

Link to post
Share on other sites

Agree entirely regarding the difficulty of laying out a workflow.

 

For me, the pain comes when I decided to add new elements between existing ones because this means I have to shift all the other elements up/down.

 

As a result, I'd prefer option 1 — some form of auto layout. Ideally, it would retain the vertical order I have elements in and just ensure that they are appropriately spaced.

Link to post
Share on other sites

Actually, it was one of your workflows that made me think option 2 would be better.
OAXwsV8.png

Auto-layout would have to make a lot of decisions there that could or not work correctly. Although I can clearly understand the connections and what is doing what, they are complex and an automatic decision of how to space these could not adhere to the preferences of every user. For example, glosbhelp and its connecting node are on different vertical levels; yes, the /bin/bash it connects to can still be higher up and the connection is still very clear, but my preference would be to have them both on the same line (if I were constructing it, naturally, since it’s done it doesn’t make so much of a difference).

The second option still makes life way easier for us, and we’re not beholden to the choices made by the software. What worries me there is by choosing option 1 there would be new topics/bugs/requests open to discuss particular decisions. I say it worries me since I’m thinking this will be very low priority for Andrew and Vero, so I’m hoping Andrew can at least look at option 2 and think “meh, easy enough without any downsides, let’s do it” and we actually have something soon, instead of waiting indefinitely on a feature that is never done because its ambition is bigger than its priority.

Link to post
Share on other sites

To be honest, I could have organised the elements of the Glosbe workflow in a few different ways, and I don't actually care too much about that. As you can see by the lowest row of elements, I'm not very OCD about it (I'm surprised you haven't dragged that final Run Script down to keep the line straight in your copy :D).

I only desire two things:

Firstly, I hate having to move everything around when I want to add something vertically between two existing elements.

Secondly, I think it's very important that the connecting lines and their modifiers can be easily distinguished and clicked on.

The first would be of significant benefit to the Glosbe workflow because it's expected that users will add extra Script Filters to add other language combinations. Now that I think about it, I really should have put the "glosbelang" and "glosbehelp" elements at the top…

As long as Alfred kept your ordering of the elements, I'm not sure that any complaints would be real problems as opposed to nitpicking.

Edited by deanishe
Link to post
Share on other sites

I'm not very OCD about it (I'm surprised you haven't dragged that final Run Script down to keep the line straight in your copy :D).

I would if I had been the one to build it, but since it was someone else, it doesn’t really bother me.

 

As long as Alfred kept your ordering of the elements, I'm not sure that any complaints would be real problems as opposed to nitpicking.

Agreed there. To be clear, if auto-layout were a thing I’d just stick to whatever it did. But perhaps there’s someone that cares about that, and I really do not Andrew to not build it because he thinks that could be an issue.

 

I only desire two things:

Firstly, I hate having to move everything around when I want to add something vertically between two existing elements.

Secondly, I think it's very important that the connecting lines and their modifiers can be easily distinguished and clicked on.

Yep, we’re also agreed there, that would also suffice for me.

Link to post
Share on other sites
  • 4 years later...

I think the auto layout here can be gradually improved, starting from the details.

 

for example, when dragging a node, I can display the alignment line, and then can have the adsorption function to make the node very good horizontal or vertical alignment. just like PhotoShop or Omni app

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...