Skip to content
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

Plans to update to work with Elm 0.17.0? #2

Closed
GetContented opened this issue May 12, 2016 · 6 comments
Closed

Plans to update to work with Elm 0.17.0? #2

GetContented opened this issue May 12, 2016 · 6 comments

Comments

@GetContented
Copy link

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

@GetContented GetContented changed the title Plans to 0.17.0? Plans to Elm 0.17.0? May 12, 2016
@GetContented GetContented changed the title Plans to Elm 0.17.0? Plans to update to work with Elm 0.17.0? May 12, 2016
@jvoigtlaender
Copy link
Owner

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.

@GetContented
Copy link
Author

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.

@jvoigtlaender
Copy link
Owner

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.

@GetContented
Copy link
Author

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.

@eugene-nikolaev
Copy link

eugene-nikolaev commented Oct 19, 2016

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...

@jvoigtlaender
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants