-
Notifications
You must be signed in to change notification settings - Fork 1.3k
ListView: Draggable Rows #2593
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ListView: Draggable Rows #2593
Conversation
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
This reverts commit 4438f2b.
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
we only import types from these packages so put them as dev deps
6febfda
to
d36779c
Compare
Build successful! 🎉 |
@@ -143,7 +143,8 @@ export interface DraggableCollectionProps { | |||
onDragStart?: (e: DraggableCollectionStartEvent) => void, | |||
onDragMove?: (e: DraggableCollectionMoveEvent) => void, | |||
onDragEnd?: (e: DraggableCollectionEndEvent) => void, | |||
getItems: (keys: Set<Key>) => DragItem[], | |||
getItems?: (keys: Set<Key>) => DragItem[], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: this should not be optional
getItems?: (keys: Set<Key>) => DragItem[], | |
getItems: (keys: Set<Key>) => DragItem[], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than one small nit above, looks good!
Build successful! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy to discuss and dismiss. Does the order of events seem a little strange? (Read bottom up like a console output)
dragEnd
onDrop
onDropExit
onDropActivate
onDropEnter
dragStart
I think I'd have expected
dragEnd
onDropExit
onDrop
onDropActivate
onDropEnter
dragStart
Though I may just not know enough about dnd native event orders.
Why can't I drag and drop two items into the textfield in https://reactspectrum.blob.core.windows.net/reactspectrum/99a6ff0791b2b98ae068feec9892fe871aaf14c3/storybook/index.html?path=/story/listview--draggable-rows I have to delete the contents before I can do it again with another item and sometimes it shows a focus ring when I drag something over it?
I can get stuck in drag and drop mode pretty easily if I try to use the mouse, should using the mouse cancel the dnd mode? I also can't get to the textfield using the keyboard to drop it on that.
Focus ring on safari is a bit janky
Otherwise, working with mouse/keyboard on Chrome and Safari
Closes #2495
Notes:
@spectrum-icons/workflow
is outdated. We can use that once it is updated.Known issues:
clicking to drag an item will toggle selectionclicking on the action menu button doesn't open the menu✅ Pull Request Checklist:
📝 Test Instructions:
Test draggable stories at ListView -> Draggable Rows:
🧢 Your Project:
RSP