-
Notifications
You must be signed in to change notification settings - Fork 375
feat(DragDrop next): add multiple drop zone support #10614
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
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. |
nicolethoen
left a comment
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
| * Default and defaultWithHandle varaints wrap the draggable object in a div. | ||
| * DataList vairant wraps the draggable object in a DataListItem | ||
| * DualListSelectorList variant wraps the draggable objects in a DualListSelectorListItem and a div.pf-c-dual-list-selector__item-text element | ||
| * 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.
mcoker
left a comment
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 operationsDroppableto be functional (was a placeholder component)DraggableObjectidto bestring | number(fromstring) to match dndkit'sUniqueIdentiferthat is used for identification, and moved it toDragDropContainer.DataListandDualListSelectorListto work withDroppablestructure and hooks (DataList - reformatted to functional component, DualListSelectorList - added forward ref).DragDropSortto useDragDropContainerunder 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.nextfolder whereDroppablecollides withreact-core'sDroppable. I could only resolve this by aliasingDroppablein the examples, but this should only be an issue with our docs framework and not required by a user.