Closed JReinhold closed 5 years ago
I don't think it would be in the core library and multi-drag is a pattern. But it might be possible to do as an addon
Challenges:
We are closing this issue due to inactivity. If you would like to continue the conversation feel free to reply to this issue and we can reopen it if needed.
Bug or feature request?
Feature request
Multi drag piles
This library is highly based on great philosophical and UX decisions, which have set the tone for how the library functions. This is great, and with this feature request I want to expand on that.
Currently in the examples, when dragging multiple elements, the number of elements are shown in the top right hand corner of the
Draggable
. this is great from a user's perspective, but it doesn't really translate to the real world. When we move multiple things in the real world, say papers, we move a "pile" (or stack) of things. I think it would be great to simulate this feeling of the "pile". We could show duplicates of theDraggable
underneath the original, to simulate this.Below is a quick mock-up I've made to explain what I'm trying to say.
I think this would fit perfectly into the whole physicality philosophy that drives this library.
Technical challenges
How would we render the "duplicates" underneath?
Draggable
fetching stuff on mount.Draggable
, so we are just rendering an empty "container" 3 times behind theDraggable
? Then how do we manage the size of the empty "container", if it is based on the original content? could we maybe compute the static size on the fly, or would that take a big hit on performance?As I write this, I may come to the conclusion that rendering the pile might not be the responsibility of this library, but something that is implemented in userland. But should we then at least provide an example of the feature, in Storybook?
Anyway, this was just a braindump, I'd love to get input on this!