Kanban with mobile drag-and-drop

I had a go at the long talked about drag-and-drop mobile feature for the Kanban plugin. I cant see any bugs but i’ve not tested it in depth yet.

I think it’s pretty self explanatory. Long press to pick up a card. Scroll as normal. Click the button to put the card somewhere else.

Have a look and see what you think: https://github.com/AndyatFocallocal/discourse-kanban-theme/tree/master

You can also see it live here: Apps - Public Happiness

@david i think it’s your component. If you’re happy with the changes would you like me to push them to the main repo?

לייק 1

I just tried your testsite on mobile and tablet and it doesn’t work well at all for me, or I don’t understand the mechanism – sorry to say :confused:

  1. The first problem is it tries to open the preview on long press. Trying to press slightly shorter, doesn’t work of course and opens the topic.
  2. And then it simply does not move after pressing drop either

This is what I’m getting: (I’m targeting the top card titled : “Getting started Guide: App Devs”)

I’m testing on iOS (18.7) – could be a version issue, so I wonder if you have tested on iOS too, or only Android so far?

לייק 1

only android. it was a quick project last night and i havent had time to test so i greatly appreciate you trying it out and sharing the bugs. I’ll try to fix those tonight.

  1. I fixed the same issue on android so it shouldn’t be difficult.
  2. I’ll have to investigate. There should be a modal window checking that you are sure you want to move it, or don’t have the required permission to do so, and that’s not appearing so something is definitely not quite right on iOS.
לייק 1

@chapoi ah, you haven’t logged in so its probably just ignoring your instructions as you don’t have the required trust level to move a card

There should be a pop-up asking you to login though so i’ll add that.

לייק 1

That makes sense. If I may make a suggestion: maybe even disabling the functionality completely when you don’t have permission, is the better approach?

לייק 1

yes, that would work too. I’ll get onto it tonight.

לייק 1

Both should be fixed now. You’ll need to be logged in to test it.

Scrolling while holding a card was a little tricky as it didn’t allowing swiping to navigate on-top of other cards. I’ve just updated the component to improve that.

I’ve got a few more improvements i’d like to make to the Kanban component, but i’ll wait to see if this is accepted into the main repo first, as i don’t want to start a competing branch that will likely fall behind, with more people contributing to the main version.

לייק 1