-
Notifications
You must be signed in to change notification settings - Fork 357
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
feat(DragDrop next): add multiple drop zone support #10614
Conversation
Preview: https://patternfly-react-pr-10614.surge.sh A11y report: https://patternfly-react-pr-10614-a11y.surge.sh |
Opened patternfly/patternfly-design#1313 for drop zone styling. |
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.
Small nit but this looks really good to me! :) Awesome work
@@ -57,6 +26,8 @@ export interface DragDropSortProps extends DndContextProps { | |||
* TableComposable variant wraps the draggable objects in TODO |
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.
Theres is a lingering TODO in this prop description. I wonder if it could be cleaned up.
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.
LGTM!
Your changes have been released in:
Thanks for your contribution! 🎉 |
* feat(DragDrop-next): add multiple drop zone support * update dupe ids * pass 2 - fixed collision bugs and ref passthrough * refactor DragDropSort to use DragDropContainer * move DraggableObject to Container * updated import, remove unused context * remove green styling for dragover * fix overlay styling, glob import * lock * revert glob * update type
* feat(DragDrop next): add multiple drop zone support (#10614) * feat(DragDrop-next): add multiple drop zone support * update dupe ids * pass 2 - fixed collision bugs and ref passthrough * refactor DragDropSort to use DragDropContainer * move DraggableObject to Container * updated import, remove unused context * remove green styling for dragover * fix overlay styling, glob import * lock * revert glob * update type * fix doubled directory and merge changes into base * lock * fix var/tokens, remove double example, fix DLS context import * fix variant descriptions, remove TableComposable variant * snap
What: Closes #10524
DragDropContainer
, a more general-use container for drag operationsDroppable
to be functional (was a placeholder component)DraggableObject
id
to bestring | number
(fromstring
) to match dndkit'sUniqueIdentifer
that is used for identification, and moved it toDragDropContainer
.DataList
andDualListSelectorList
to work withDroppable
structure and hooks (DataList - reformatted to functional component, DualListSelectorList - added forward ref).DragDropSort
to useDragDropContainer
under the hoodDroppableContext
(was placeholder and unneeded)Open questions/issues:
@dnd-kit/
dependencies #10590 (review) so I don't think it's related to the specific changes in this PR. cc @mcoker any thoughts about this? You can inspect the drag overlay by using the keyboard to initiate a drag (space) and then inspecting the element.next
folder whereDroppable
collides withreact-core
'sDroppable
. I could only resolve this by aliasingDroppable
in the examples, but this should only be an issue with our docs framework and not required by a user.