To provide some context for this, Atlassian originally created a drag and drop library called react-beautiful-dnd. A few years ago they stopped maintaining the library, and some community forks took over (I think @hello-pangea/dnd is the most popular).<p>In the interim I've found <a href="https://dndkit.com" rel="nofollow">https://dndkit.com</a> a _really_ nice solution, but it's only available in React-land.<p>Looks like this new library was written at least in part by the same guy who wrote react-beautiful-dnd, so my hopes are high (as long as this one stays maintained...)
Hi all,<p>I am one of the creators of Pragmatic drag and drop (and react-beautiful-dnd).<p>Thanks for the post @NeilSmith2048!<p>I have had a quick read over the comments on this thread, and here is some information that folks might find helpful:<p>- The web platform has powerful built in drag and drop functionality. Sadly though, that functionality has historically difficult to be successful with due to bugs, inconsistencies and API friction.<p>- Pragmatic drag and drop is low level wrapper around web platform drag and drop and is attempting to provide a fast, safe and (hopefully) easy way to successfully unlock the power of the web platform<p>- You can use Pragmatic drag and drop with any tech stack (svelte, vue, react, vanillajs etc) and you can use it to build _any_ drag and drop experience you like<p>- We have optimised Pragmatic drag and drop for performance and flexibility. It consists of a small core and lots of optional pieces. The big idea is that folks only ever need to include the code they need for their experience. Small pieces also allows folks to borrow as much as they can and only build the specific pieces they need for bespoke experiences. More details: <a href="https://www.youtube.com/watch?v=5SQkOyzZLHM" rel="nofollow">https://www.youtube.com/watch?v=5SQkOyzZLHM</a><p>- We make it easy to attach data for external windows and applications, and to receive data from them (and you only pay code for that functionality if you want it!)<p>- Pragmatic drag and drop is already powering drag and drop in some of the biggest software products, including Trello, Jira and Confluence.<p>- We have design guidance and accessibility guidance and outputs which folks are welcome to use, or you can create your own design and accessibility solutions<p>- It works with multi drag. We already have multi drag in a few places in production, but we currently don't have public guidance or an example (work in progress!)<p>I am happy to answer questions folks might have. It's a public holiday here in Australia, so I might not be able to reply to things until tomorrow.<p>Cheers
I got to work with Alex on the precursor to this while I was at Atlassian. He's such a delight to work with. I was a prototyper at the time and I was always surprised about the types of edge cases he would come to me with - things I would have never even considered testing. There's so much work behind the scenes that happens to make these drag and drop interactions feel natural.
We've been using SortableJS for years for similar functionality.<p><a href="https://sortablejs.github.io/Sortable/" rel="nofollow">https://sortablejs.github.io/Sortable/</a>
I can't get this to work reliably on mobile firefox, and I don't see any non-react examples which is strange given their value pitch is "use any front-end". Sortable works everywhere and has nice simple examples: <a href="https://github.com/SortableJS/Sortable">https://github.com/SortableJS/Sortable</a>
This is off topic a bit, and not a criticism of this library or its authors, but: I do think that DnD is bad for accessibility. Especially on mobile, where it's much harder to precisely click, so the deadzone required to distinguish a click from a drag has to be much larger.<p>But whether it's on a mouse, trackpad, touchscreen, trackpoint, or other more esoteric system, it requires a muscle hold while doing a precise movement along another axis. And this can be more difficult and RSI-inducing. God help you if you're trying to drag on a <i>resistive</i> touchscreen where more force is required, too.<p>I feel that the copy-paste workflow of pick source -> copy -> pick destination -> paste is actually easier (and much more prevalent!) than pick -> hold AND move -> drop. It also works better in windowed systems because you can more easily interact with the window system while "holding" the thing; this is often impossible or more difficult while using DnD and having to hold down the primary button.<p>(some drawing tools actually recognize this by having different tools/cursors for "select items" and "move item(s)". The old Acorn Archimedes used a different mouse button (middle) reserved for DnD. I feel it could work well with a stylus with a button too. But in both those cases I would prefer "click to pick up, click to drop" to holding.)
This looks really good. Much better than react-beautiful-dnd which was sheer madness IMO. They were reimplementing most of the stuff browser does for you. Sadly I just built my own stuff on top of native browser drag-and-drop, but might look into changing to using this eventually.<p>The browsers inconsistencies are pretty annoying. Especially the weird Chrome stuff when you remove the draggable from the DOM during drag. Great to see their lib hiding this.
Maybe it's totally unjustified, but I instinctively shudder seeing "UI" and "Atlassian" in the same context. Jira might be the only thing worse than MS Teams that I [am forced to] use on the daily basis.
Drag and drop between tabs/windows is pretty remarkable, though I wonder if users would even try such a thing to justify the increased complexity.
I'm here for the phenomenon of the GitHub stars on this repo. Which was quite a weird event. Even with just the readme in the repo they got a crazy number of stars and were on GitHub trending for a day or two. What's with that? Are there just so many front-end developers, is it possible that DND is such a huge unsolved pain, is it just cause its Atlassian, did they sent a mass e-mail? I am honestly confused? What's the value of stars these days for an individual developer consuming the code?
Looks like it's the successor to <a href="https://github.com/atlassian/react-beautiful-dnd">https://github.com/atlassian/react-beautiful-dnd</a> given <a href="https://github.com/atlassian/pragmatic-drag-and-drop/tree/main/packages/react-beautiful-dnd-migration">https://github.com/atlassian/pragmatic-drag-and-drop/tree/ma...</a>
Are we expected to be able to drag and drop elements in the List and Board examples, on mobile browsers? I can't, but I look forward to trying on a computer.<p><a href="https://atlassian.design/components/pragmatic-drag-and-drop/examples/" rel="nofollow">https://atlassian.design/components/pragmatic-drag-and-drop/...</a>
I tried the examples on mobile device and it takes awhile for component to recognize its “picked up”. Have to wait what seems like half a second. If I move before then, it doesn’t do anything or it highlights content when I try to drag.<p>I hope that can be tuned with the library but otherwise it looks pretty good.<p>edit: I really wish there was an ability to move multiple items at once. Or maybe I haven’t figured it out on mobile.
I spent the afternoon editing a document in Atlassian Confluence ... It reminded me of the old MS-DOS days when I could occasionally out-type the computer (only slower.) I hope they use this to improve their own products!