-
Notifications
You must be signed in to change notification settings - Fork 841
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
Drag and Drop #1733
Drag and Drop #1733
Conversation
src-docs/src/views/drag_and_drop/drag_and_drop_custom_handle.js
Outdated
Show resolved
Hide resolved
src-docs/src/views/drag_and_drop/drag_and_drop_custom_handle.js
Outdated
Show resolved
Hide resolved
Naturally, the latest minor release of react-beautiful-dnd breaks my clone/copy extension. |
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.
Starting with review on docs before deep diving into all the codes
@cchaos 1 & 3 will require some more CSS animation hacking. I'll look into those. |
I was hoping for a simple cursor type change, but there's nothing that suits. What about doing something like adding a badge that says "remove" once you're outside of the bounds? @snide @ryankeairns Thoughts? |
@cchaos is that a destructive action or does the item get placed back into the left hand list? |
@ryankeairns Depends on the consumer, but most likely undoable. We just need to signify that dragging outside of the droppable area would result in removal of the item. |
Flexbox plus a width discrepancy because of the panel border. Fixed
react-beautiful-dnd native drop animation. What I did was add a prop to |
Thoughts about indicating removal from simple to more complex:
|
Thanks @ryankeairns
That being said, I'm not really sure how scaling indicates removal. Seems like an arbitrary animation
The cross is just an example of how to add distinguished buttons for removing options. It's not forced by the component.
I thought about this as well, but it's a bit beyond this scope to create that atm. Any thoughts on the badge idea? |
@cchaos The badge works well enough. It's an atypical use of a badge, but then it literally says 'Remove' on it and it's red, both clearly foretelling what's about to happen. As for the shrinking, it implies that the held item has left the dropzone and it could be further animated upon release where it shrinks and fades to nothingness. In that way, the initial scaling indicates pending removal. |
Hmmm, adding that extra animation of shrinking until non-existent could make that initial shrink more intentional. @thompsongl By looking at your overriding of the transforms do you think this would even be possible? |
One last thought, maybe just show a trash can icon instead of a badge. What you have works, I thought you were looking for other ideas :) |
FYI: We've decided to punt on figuring out the design of removing an item as it'll be an additive feature and don't want to hold up this PR for that. |
Reverted using EuiListGroup for custom handle doc
I wanted to prove out that table dragging can be achieved with little changes (and no breaking) to this setup. chandlerprall@3b1ac3a Changes:
My changes aren't production-ready, but I feel it proves a future approach well enough to not block this PR. |
This reverts commit 3fcfd01.
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 (as beta) 🎉
Summary
Reference: #1651
Drag and Drop support consisting of 3 main components (The docs are the best place to look for descriptions and intended use for each):
EuiDragDropContext
EuiDraggable
EuiDroppable
Help Wanted
💡 Ideas for improvement
👩🎨 Design
🔮 Future
Checklist
- [ ] This required updates to Framer X components