paddy2-beta icon indicating copy to clipboard operation
paddy2-beta copied to clipboard

[Enhancement] Stacks: maintain position when reordering

Open aparajita opened this issue 6 years ago • 12 comments

When dragging a layer in a stack to reorder them, the position of the stack should not change.

For example, I have a vertical stack of layers representing a list, and the stack is positioned within a container. In order to reorder a layer to the top of the stack, I have to drag the layer past the top of the stack, which currently has the effect of changing the Y position of the entire stack.

What should happen is the stack should keep it's position and just reorder the containing layers. This is how Anima does it, and it feels like the right behavior.

aparajita avatar May 22 '18 17:05 aparajita

Actually, it's worse than I thought. Even when I drag to reposition layers below the top layer of the stack, it ends moving the entire stack up.

aparajita avatar May 22 '18 17:05 aparajita

Oops. Thanks for this @aparajita. Yeah, it looks like I broke that logic in v0.3 🙃

So for stack groups; after moving any layer, the group should reset back to the same position?

DWilliames avatar May 23 '18 07:05 DWilliames

Yes, see here: https://youtu.be/DiCXg17CwIY?t=799

aparajita avatar May 23 '18 15:05 aparajita

v0.4 should fix this; to have the same behaviour as in that video. As far as I'm aware. Can you please confirm that it's working as you'd expect?

DWilliames avatar May 30 '18 11:05 DWilliames

For me it's still broken. Screen recording and original file:

Paddy 2 stack reorder test.zip

aparajita avatar May 30 '18 18:05 aparajita

I think in v0.4 I fixed a couple of issues with this... but the not the exact issue you have found.

The top of the stack will always remain at the same Y position after moving any of the below layers... however, if you move the top layer; the stack group Y position will now begin at the top layer's Y position.

This is actually the same behaviour as Anima App; and in the video shared above.

Would you expect that even after moving the top layer somewhere else it would snap back to where it was? Or is this purely for the use case of trying to move a new layer to the top of the stack?

DWilliames avatar Jun 04 '18 12:06 DWilliames

You're right, Anima does the same as Paddy does; when I drag a lower layer above the top layer or drag the top layer below a lower layer, it moves the stack. But I would argue that isn't desired behavior; most of the time when I'm dragging a layer within a stack I just want to reorder them, not change the position of the stack.

So maybe there can be a checkbox that is checked by default called "Maintain position on reorder", which will snap the stack back to its previous position on any reorder.

aparajita avatar Jun 04 '18 13:06 aparajita

This has drove me nuts too, I'm not even sure you would need a setting to start. I think the 80% case is you just want to reorder them, not reorder AND reposition.

On Mon, Jun 4, 2018 at 9:48 AM Aparajita Fishman [email protected] wrote:

You're right, Anima does the same as Paddy does; when I drag a lower layer above the top layer or drag the top layer below a lower layer, it moves the stack. But I would argue that isn't desired behavior; most of the time when I'm dragging a layer within a stack I just want to reorder them, not change the position of the stack.

So maybe there can be a checkbox that is checked by default called "Maintain position on reorder", which will snap the stack back to its previous position on any reorder.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/DWilliames/paddy2-beta/issues/22#issuecomment-394360920, or mute the thread https://github.com/notifications/unsubscribe-auth/AArzZGoEJRwc_4OJjG0oBxBXvWd5nvaYks5t5TqtgaJpZM4UJEYa .

tschmeisser avatar Jun 05 '18 13:06 tschmeisser

I agree, on second thought it really should never move when reordering. If you want to move you just move the group.

aparajita avatar Jun 05 '18 13:06 aparajita

Cool. Yeah I agree! It's gonna require a bit of rework to handle this case; but I think it makes the most sense.

DWilliames avatar Jun 10 '18 07:06 DWilliames

Oh yes please! Looking forward to this feature. I really appreciate your plugin. It's already my favourite one. Keep it up :)

Pixelpusher93 avatar Jun 13 '18 11:06 Pixelpusher93

Sorry, it's been a big delay since my last update on this.

For this one; it seems quite simple in concept, but it's actually quite complex. TO be able to handle all the nuances; e.g. worst case – a stack group that has some padding layers and some layers to 'ignore' that are 'higher' vertically than all the other layers; it makes it quite difficult to re-shift all the layers based on what they were at the point you selected a layer to begin moving it, before you move it :P

I'm sure that doesn't make sense — but in a nutshell; it's more complex than I thought... and I've had to park it for now. I'll look into it again hopefully for v0.6

DWilliames avatar Jul 23 '18 11:07 DWilliames