superlistapp / super_editor

A Flutter toolkit for building document editors and readers
https://superlist.com/SuperEditor/
MIT License
1.68k stars 245 forks source link

[SuperEditor] - Drag and Drop node re-ordering #2275

Open matthew-carroll opened 2 months ago

matthew-carroll commented 2 months ago

Add tools necessary for apps to implement drag-and-drop node re-ordering.

To prove the viability, create an example that uses long-press on mobile to re-arrange nodes. The original node should remain visible, but in a ghosted visual state. The node being re-ordered should appear in the overlay in a unique visual state. A separate decoration should be painted at the drop zone.

In the case of list items, and other nodes that are inherently parent nodes, the full hierarchy should move with the reorder.

Stretch goal: animate the node into overlay. Animate all the nodes that move down.

alterhuman commented 2 months ago

@matthew-carroll If it helps: https://github.com/superlistapp/super_editor/discussions/1129#discussioncomment-8510344