Open austincondiff opened 4 months ago
https://github.com/user-attachments/assets/0dc4f7e1-63fb-44b8-b154-18f20cbc9ab1
I have a new implementation getting going. Here's the initial drag interaction updated from the existing one. Needs a few adjustments for the drop animation and I'd like to add a little plus symbol on the cursor while dragging
For the drop I still need to implement the drop interaction on the textview but that is next.
An interesting thing to note: the drag and drop interaction will need to cut the contents of the drag when dragging inside the editor, but just copy the contents when dragging outside the view.
Nice work so far and good observation one the cut vs copy! The cursor plus symbol should probably only appear when holding ⌥ while dragging to duplicate the selection when dropped. Which adds another piece of criteria...
Upon dragging selected text...
I will update the issue description with this.
Description
This feature enables users to drag and drop selected text within the editor, enhancing the flexibility and ease of text manipulation. Users can quickly rearrange, duplicate, or relocate content without relying solely on traditional cut, copy, and paste commands.
Behavior on Drag
Text Selection (Range):
Line Selection:
Modifier Key:
Cancel Action:
Behavior on Drop
Drop Inside the Editor:
Drop Outside the Editor:
Invalid Drop Locations:
Cancel with esc:
Additional Considerations
Visual Feedback:
Error Handling:
Screenshots
https://github.com/user-attachments/assets/7809451d-8be4-416b-b0c9-5f362138eaeb
https://github.com/user-attachments/assets/f98869b4-f736-4d13-9887-4c296556b3f1