Auto move group when overlap

A nice feature would be that group cannot overlaps and that other groups move down when one is increased in size. Maybe a setting that force groups to have specific number of row (grid row) in between them so if I increase the size of the first group, and it get big enough (in height) to go beyond the pre-defined number of row between groups, it move the following group(s) down.

It could also force the maximum number of row between groups.

This way when we add new node to a group, or remove some, we don't need to re-adjust all other groups manually.

1 Like

Are you sure? Does EVERYONE want that?

Personally, I'm not convinced. While I would normally avoid overlapping groups, I don't think I'd like to be completely blocked from doing that.

I certainly would not want an enforced separation. However, it is true that if a group expands and isn't overlapping another, nearby group, it would be nice for Node-RED to move that other group down to make room. If it is overlapping, it should probably leave the overlapping group alone.

No idea how easy that would be to do though. I suspect really very hard.

What I do is to zoom right out, select everything to move and move it all at once.

By default overlapping should be avoided by moving groups but there is a case where overlapping is wanted to merge the selection.

I sometimes add a node to a group and the group extends and overlaps another one. So I have to move that last group... so yes I have a use case.

Normally no, each group has a depth. This is the theory for now :joy:

And moving a single adjacent group would certainly be easy. But that isn't really the issue. It requires a cascade of moves. Each move has to check for overlaps - and what happens if there is an overlap to the side that also overlaps part of the bottom and only the bottom is growing? Then it has to calculate one or more moves of the next adjacent groups but that move also has to check further down - and repeat until no further groups.

Also, are the canvases infinite now? Previously I know they weren't and so the cascade would have to check all the way down to see if the move was possible before even starting the move.

Are you sure? Does EVERYONE want that?

Personally, I'm not convinced. While I would normally avoid overlapping groups, I don't think I'd like to be completely blocked from doing that.

Making it an optional setting would fix this problem.

What is certain is that it will not be for v4.1.
To see with Nick what is possible to do without adding too much work :wink:

A possible solution would be a command to select everything below a selected node or group, or something similar. Then one could manually move everything below down when necessary.

1 Like

and what about moving "up" - what happens when the ripple crashes the top border ? Does it push back and stop you moving things ? And if I push a group down - then move it back up because I'm clumsy and overshoot - do the rest all come back up as well ?

Would need a good bit of design before rushing in.

1 Like

A less radical tweek might be a shortcut to invert the current selection?

Then we could select the group which has got larger, invert the selection to grab everything else instead and move it all with the mouse or ctrl-down arrow.

Not perfect if there are groups both above and below the one that's too big for it's space, but combined with ctrl-clicking it would make shuffling things around easier.