benjypng / logseq-kanban-plugin

MIT License
102 stars 9 forks source link

[Feature] Interactive Kanban - Drag, Drop #31

Closed isosphere closed 10 months ago

isosphere commented 1 year ago

The ability to drag and drop cards is a big deal for me; IMO it's the whole reason to Kanban!

Our upstream dependency react-kanban supports interactive boards[^1], but we'll have to add code that will modify the LogSeq graph according to actions taken by the user.

[^1]: though it should be acknowledged that the package is abandoned

I am attempting to implement this feature on my own, but I'd be happy for any tips or discussion here. I'll open a draft PR if I have any kind of progress so that other interested parties can collaborate on the feature.

I'm using the react-kanban demo as a guide.

isosphere commented 1 year ago

I've made an initial attempt that matches the react-kanban demo but the event handler doesn't get triggered on drag. I've deleted the default logseq event handlers via the developer tools as a test but it had no effect.

The https://github.com/cannibalox/logtools project, when installed, enables showing a block as a set of kanban columns using CSS trickery. It has the added benefit of not requiring additional graph editing. It doesn't look as great, it's hard to grab the handle of a "card", but it works. There's an obsidian kanban plugin that has great interactivity that we might be able to model off of.

I think I'd need some help getting this started. The current state of my attempt is here: https://github.com/isosphere/logseq-kanban-plugin/tree/drag-drop

stan-voo commented 1 year ago

second this I suppose the plugin should have a disclaimer that you won't be able to move cards, which is mostly the point in having a kanban board itself.

benjypng commented 10 months ago

For this function, you may like to use the logseq-plugin-kanban-board.