obsidian-card-board icon indicating copy to clipboard operation
obsidian-card-board copied to clipboard

Drag and drop

Open roovo opened this issue 2 years ago • 28 comments

I want to build this in one go so you can drag cards to any place in any column and they will stay there.

Needs some careful consideration before doing. For relevant discussions, see:

  • #11
  • #20

roovo avatar Nov 12 '21 12:11 roovo

+1 for this

benhamilton avatar Mar 30 '22 05:03 benhamilton

+1 upvote!

amurena avatar Apr 14 '22 16:04 amurena

Would love to have it too!

dimonier avatar Oct 31 '22 20:10 dimonier

+1 for this

juestchaos avatar Nov 17 '22 11:11 juestchaos

❤️

roovo avatar Nov 24 '22 19:11 roovo

+1 that would be epic! (pun intended) That's the one feature i'm missing.

dataO1 avatar Dec 12 '22 21:12 dataO1

I'm hopefully going to start looking at this around Christmas time. I think it will be a bit of a slog to get done, as there are a lot of things (design/behaviour choices, edge cases etc) to think about and try to get right!

I'll be updating this issue with my thoughts and intended approach as I get started and progress :)

roovo avatar Dec 13 '22 12:12 roovo

+1(,000) for this.

With this Cardboard becomes my first tool I open for my daily review.

melmaninga avatar Dec 18 '22 05:12 melmaninga

i think dragging to other columns should do one of two things:

simply drag: add tag from new column, remove current tag (move to new column)

alt+drag: add tag from new column, keep current tag (copy an alias over to new column basically)

ArneNostitz avatar Dec 19 '22 00:12 ArneNostitz

Totally with you on this :)

roovo avatar Dec 28 '22 09:12 roovo

So looking forward to this feature!

Brilliant plugin, roovo. Thanks!

AaronKnowls avatar Mar 30 '23 15:03 AaronKnowls

Also adding my +1 on this. Love the plugin, looking forward to drag and drop making it even better!

davidmickelsen avatar May 04 '23 16:05 davidmickelsen

So excited for this feature. WooHoo!

mpuglin avatar May 05 '23 12:05 mpuglin

Came here to say I installed CardBoard for the first time today, and uninstalled because this feature is so crucial to me. Looking forward to seeing it come to fruition some day!

hungsu avatar May 17 '23 00:05 hungsu

Any news about this feature so far? I'm really looking forward to use drag and drop 😍

kaletellier avatar Jul 22 '23 20:07 kaletellier

looking forward+1!similar like kanban or projects,which are also excellent plugins,whereas can't summarize tasks from specified folder

Yannie12138 avatar Oct 25 '23 06:10 Yannie12138

Thank for the hard and great work! It's really helpful for many people include me, May I ask if the plugin will update in the future?

lisasuosuo avatar Nov 14 '23 02:11 lisasuosuo

A quick drag-and-drop progress report: I have done the first drag and drop implementation - boards can be re-ordered by dragging their tabs or their names in the settings panel.

I realise that this is way short of full drag and droping of cards, but it is an implementation I am happy with in the way it works visually as well as from a coding perspective so I should be able to build on this :)

The next drag and drop step will be to add the ability to drag columns to re-order them. There is some pre-work on date boards that needs to come first which is next on the todo list.

roovo avatar Nov 18 '23 12:11 roovo

What is the challenge with drag and drop?

Di3mex avatar Dec 15 '23 14:12 Di3mex

No special challenge, just aquite a few things to do to get there and quite a bit of thinking needed as I want this to be as obvious a user experience as possible:

  • I haven't worked on how to handle scrolling whilst drag and dropping yet (I've made my own drag and drop handler as I wasn't happy with the html5 version - specially trying to work it from elm).
  • I need to add/build a date picker to support dragging onto date based columns.
  • Do I want to support mobile/ipad ? If I do I should prob work on this sooner rather than later so there is less to change to add support.
  • I'll need to think/work through all the potential edge cases there might be when a card is dragged from one column to another and add any functionality needed to support these.
  • need to decide how I want to store the ordering of cards in columns. This is going to require a fair bit of thought as:
    • A task can appear in multiple columns on multiple boards and be positioned differently on each.
    • I need to handle what to do if tasks have moved without the plugin being aware (say someone edits files outside of obsidian whilst obsidian isn't running).
    • ideally I don't want to pollute people's markdown to do this so I need to store the info elsewhere. Where tho? perhaps some form of database (sqlite?) would be easiest but is this portable? or should I just store the info in text files? Where should I keep the database or files? in the plugin's directory - I would want it separate from the plugin settings data.json file as this is not settings.... whatever I do I am going to have to build it partly in elm and partly (minimally) in typescript, which means working out the interface between the two and getting it built.

I am sure that there will be more as I get stuck into it - but I'll be working through the above in about that order. I have a few bugfix/quality of life issues I want to scrub from the list first - see 0.7.6 milestone for what I plan there, but handling scrolling will come after that (I will be using drag and drop of columns on a board to drive this).

roovo avatar Dec 30 '23 21:12 roovo

just added #190 to track column drag and drop - and added it to the 0.7.7 milestone.

roovo avatar Dec 30 '23 22:12 roovo

YEAH BABY, YEAH!

melmaninga avatar Jan 08 '24 06:01 melmaninga

Thanks for the thoughtfulness and work on this - this will be a great addition to an already useful tool.

dubyasqrd avatar Jan 22 '24 20:01 dubyasqrd

A little update....

  • date picker is progressing and I hope to release soon-ish.
  • I am probably going to park supporting mobile drag and drop till after I have it working on desktop. I will pick it up later as there are probably quite a few improvements needed to make things work better on smaller screens so I will work on a mobile epic some time later.
  • I think I am tending towards the approach of keeping track of the order of cards in columns on boards in some CardBoard specific notes inside the vault rather than hidden in config or some database. To keep this information as up to date as possible
  • There will be a need to split the current code base into two parts: One that runs in the background all the time Obsidian is running, keeping track of any edits to markdown and maintaining a cache of the tasks in the vault. The other to handle rendering the view. At the moment these are both done in the one code base which is only running when there is a plugin window visible. This will be a biggish change, but will help ensure the plugin can track changes reliably and keep cards in the right order in their columns. It should also speed up board rendering (as it will just be a render rather than a parse and render) and could allow #151 to be more easily implemented too.

roovo avatar Jan 23 '24 12:01 roovo

Fantastic news, roovo. Your work and dedication is deeply appreciated.

AaronKnowls avatar Jan 27 '24 10:01 AaronKnowls

...and just released v 0.7.8 which adds datepicker functionality via a context menu from right clicking on a card :)

roovo avatar Jan 28 '24 09:01 roovo

This is great - thank you!

dubyasqrd avatar Jan 29 '24 13:01 dubyasqrd

Don't know how you're proceeding but just dropping this library in case it is useful https://shopify.github.io/draggable/

jonathan-s avatar May 04 '24 19:05 jonathan-s