dwyl / learn-elm

:rainbow: discover the beautiful programming language that makes front-end web apps a joy to build and maintain!
https://github.com/dwyl/learn-elm
480 stars 41 forks source link

Drag & Drop Example #80

Open nelsonic opened 7 years ago

nelsonic commented 7 years ago

We need to do a "Spike" to investigate and write-up an example of doing Drag-and-Drop in Elm (it will be very useful for the work we are doing next month ... but nice UI/UX learning in any case)

Specifically:

Please start interacting with this issue by sharing links to other people's work (modules, projects, blog posts etc.) to get the discussion going. Only once we have a better understanding of what is already possible we'll be in a much better position to estimate how long the spike should take to complete. (thanks!)

Remember: this is a discovery, documentation & demo exercise and must include tests. Share links and updates to this issue so if you are unable to "finish" the work, someone else can continue working on it when you have to get back "client work"...

CC: @naazy, @SimonLab, @shouston3, @ivanmauricio, @andrewMacmurray & @gabrielperales (please update this "CC" list with who ever elseyou know is keen on advancing their Elm skills!)

newswim commented 7 years ago

Neat!

Curious about one point, is the idea to make a drag-and-drop file-uploader kind-of-thing? Or, something that's just moving elements around the document, similar to Dragula but for Elm.

Or, you may want both. Extending the first would probably be a matter of having a draggable element listen for when it is within a certain boundary, then firing when the mouse is released. All things that the mouse package will handle, (it even says "Implement drag-and-drop for something" in the Readme.

Here's a few examples which address your second question:

šŸ WINNER: The best seems to be Elm-Draggable, with a well-documented API and TESTS.

iteles commented 7 years ago

@newswim Thanks for this! To clarify, our original thinking for this was moving elements around a page as you do in Github for example when you move an issue up and down within a milestone

ZooeyMiller commented 7 years ago

I don't know if it's still relevant, but there is a talk at Elm-Europe today titled "Building Reorderable UI in Elm". The live stream for the conference is here and the schedule is here. The talk is scheduled to start at 10:40am (I assume that is CEST, so 9:40 GMT).

nelsonic commented 7 years ago

@ZooeyMiller thanks for sharing / reminding us! we're at client office today so unable to watch the live stream. expecting them to record it can't wait to watch the "Building Reorderable UI in Elm" talk! ā¤ļø Hope you have a great day! šŸ‘