nelson137 / repo-list

0 stars 0 forks source link

Better card reordering animation #4

Open nelson137 opened 1 year ago

nelson137 commented 1 year ago

Currently, when a card is dropped within a list to reorder, on drop it snaps back to its original position and they all animate at the same time to their new position. This is fine, but it could be better.

Instead, the card should animate directly from the mouse to its new position.

Possible implementation

The card is replaced with an invisible one and absolutely positioned to the mouse.

This is certainly more complex than it sounds. Will the browser drag & drop play well with cards being absolutely positioned out of the list? What if they have to be removed as a child element for this to work? Will the FLIP animation work as expected moving the card back into the list? Will this affect other animations (e.g. moving cards between lists)?

nelson137 commented 1 year ago

This may be superseded by #14, though that one is also On Hold for now, waiting for the new List Edit Mode to land. If something changes this may come back, but if things continue as planned this will not be implemented.