mwakerman / kanbanist

The Universal Kanban Board for Todoist
https://kanban.ist
MIT License
203 stars 34 forks source link

"Undo" button when checking an item off #20

Open maartendeblock opened 5 years ago

maartendeblock commented 5 years ago

Hi,

It would be great to have an undo button when you checked off an item, just like normal Todoist client.

Thank you for your great work!

mwakerman commented 5 years ago

Hi @maartendeblock, I agree. This is a good first issue for someone wanting to contribute so I've added the tag. Thanks for the suggestion.

vidushirai commented 5 years ago

Hey @mwakerman, is it cool if I work on this? I've started it in my branch here https://github.com/vidushirai/kanbanist/tree/undo-button but I'm still working on using redux to store the last completed item instead of storing it in the state.

mwakerman commented 5 years ago

Hi @vidushirai, I've been thinking about this particular issue for a while. For checking off a single item, this would not be difficult to just provide an undo button. But for other API changes (renaming lists, re-ordering lists, adding/deleting lists etc.) I thought it might be a better approach to provide "temporary undo" by delaying API actions (the same way that Todoist and Gmail do) where there's an undo option available for 5 seconds or so before an action is "committed". This would be harder to implement but provide a more general solution to undoing changes. I haven't written any code but my thoughts on an implementation are:

What do you think?

vidushirai commented 5 years ago

I like this approach better, i didn't know that's how Todoist and Gmail do it. I'd like to try implementing it this way and see how it goes.

XuanLi-Leong commented 5 years ago

Hi! Thought you might want to know that there's also a Todoist API to uncomplete an item. https://developer.todoist.com/sync/v7/#uncomplete-items