elm-drag icon indicating copy to clipboard operation
elm-drag copied to clipboard

Plans to update to work with Elm 0.17.0?

Open GetContented opened this issue 8 years ago • 6 comments

Just wondering if you have plans to update this to work with 0.17.0?

GetContented avatar May 12 '16 01:05 GetContented

It is not clear to me how an update to 0.17 would look like. Signals are gone from Elm 0.17, so a lot of the API of this package here does not make sense anymore. Also, the package's primary use case was to realize dragging when all information one has is the mouse movements/buttons plus when the mouse is hovering over something. That is, something like Graphics.Input.hoverable. But Graphics.Input is also gone. Instead, people can only work with html for stuff like this now. And in html, they have a different option than basing drag actions on hovering. Namely, they can directly detect when the mouse button is pressed within a certain element. There is a 0.17 example doing mouse drag here: http://elm-lang.org/examples/drag (source). Given that "new" way of doing things, I am not sure this package here still has a meaningful role to play.

But having said all that, if you do have a use case for at least part of the package, and can tell me what API or parts of the API you would want, I can update the package.

jvoigtlaender avatar May 12 '16 07:05 jvoigtlaender

Fair enough. I was interested in doing some drag and drop reordering on a toy project I was working on (am working on). Not sure how to do that anymore, really.

GetContented avatar May 12 '16 08:05 GetContented

Turns out what I said above is not the full story. The drag example there is using Html.Events.on, but since there is no corresponding Svg.Events.on, that "0.17 solution" is not applicable to svg stuff. So if one wants to drag svg stuff around, there may still be a role to play for this elm-drag package here. But I still don't know how exactly the API would look for that.

jvoigtlaender avatar May 13 '16 16:05 jvoigtlaender

I'v never actually used your library. What I was interested in, though, was tracking positioning information within my app. Do you see that as something that this code would avail? This might be a discussion better off had in the elm slack assuming you're on it.

GetContented avatar May 13 '16 21:05 GetContented

As an Elm newbie I have a lack of a DnD library now. Wanted to use this one...

In the example there is only "drag" not "drop". It will take some time for me to figure out how to implement "drop". Also, I have some doubts if the solution will be a cross-browser one.

And I do not want to get half of my applied module code to be related to DnD. At react + redux I used react-dnd and it looked a bit cumbersome but worked.

Now I am trying to use jquery-draggable (+ droppable) via ports. Of course it is not on the Elm way and it is sad and not good but this way I can easily get revert, helpers, handlers etc...

eugene-nikolaev avatar Oct 19 '16 11:10 eugene-nikolaev

For the record, what I said in my last comment above is not anymore true, since the svg package has since added the Svg.Events.on function.

So for both html and svg we are in the situation now that the approach from http://elm-lang.org/examples/drag can be used, with both Elm 0.17 and Elm 0.18.

Hence, what I said further above about there not being a convincing case, or even just a general strategy, for updating this package here to anything beyond Elm 0.16, does stand.

jvoigtlaender avatar Nov 24 '16 06:11 jvoigtlaender