Open ceddlyburge opened 1 year ago
Hi @annaghi , I think this is ready for review now.
All the examples can now be used with touch, and I went through them all to check that they all work.
There is now a create
function, which is the same as it was previously. It only works with mouse, but doesn't require any ports so is easy to integrate.
There is also a createWithTouch
function that works with pointer events and hence supports touch.
Some notes:
Any update on this? <3
I haven't heard from Anna for a while, or seen her active on slack. I assume she is in the middle of something that is taking up all of her time. This works though, so you could copy / paste the code in to your app as a temporary solution?
Hi @annaghi, I've fixed that problem we saw. I think it was a race condition. Being as the pointer events are different, come in through ports and have the 'releasePointerCapture' complication, I can easily imagine that they come in a different order to the mouse events sometimes. Anyway, everything works now, and you can give it a look on my fork at:
Hi Cedd, great work!
I will review it in pieces, the first request is to create a Port module similar to this PR: https://github.com/annaghi/dnd-list/pull/86/files
Hi Anna, the ports are already in this PR, but in Home.elm (instead of inPort.elm as in that PR you linked to), is this an important difference? They are both in the examples directory, so not available to users of the package.
Thank you for incorporating the ports into the Home.elm
module. However, to maintain a clear separation of concerns and keep the codebase organized, I would prefer having the ports in a dedicated module. Let's introduce a new module named Port.elm
, similar to the structure of this PR https://github.com/annaghi/dnd-list/pull/86/ This approach will help keep Home.elm
focused on its primary functionality, and Port.elm
can handle all the ports.
Ok, this is done. Cheers, Cedd
In the other PR I have added an example for no-touch: examples/src/Introduction/Basic_NoTouch.elm Can you please add it here too?
Ah yes, I remember you asked me to do this a long time ago, and I did! But its on the other branch where we were thinking about a different way to do the ports. I've pulled it in to this branch now.
Hi @annaghi, do you have any other comments? Thanks, Cedd
This works for the basic example, but still wants a bit of work / thought