wayneashleyberry / wunderline

✅️ Command-line client for Wunderlist, the easiest way to get stuff done.
https://git.io/vM45l
MIT License
310 stars 29 forks source link

Mark item as complete? #79

Closed jonnymaceachern closed 8 years ago

jonnymaceachern commented 8 years ago

Is there currently any way to mark an item as complete? If not, do you plan to add this?

retrography commented 8 years ago

This would be very useful indeed. And there are simple ways to implement it.

wayneashleyberry commented 8 years ago

Hey @jonnymaceachern, there isn't a way to mark tasks as complete right now and I don't have any short term plans to implement it myself. If @retrography or anyone else would like to suggest how we could do it or even send a pull request then that would be great!

retrography commented 8 years ago

I don't know much JavaScript, so I risk messing up the code if I edit it myself. But task completion seems pretty straightforward in the API. Updating a task requires a PATCH request: PATCH a.wunderlist.com/api/v1/tasks/:id. One just needs to update a task with the "completed" flag turned on.

In terms of interface implementation, I think all the previous attempts have failed to provide a usable interface. The Ruby implementation used TASK_ID in order to deal with individuals tasks. That's a pretty arbitrary identifier to deal with as an end user! The Python implementation used the full text of tasks to refer to them. That's pretty daunting! These are both impractical solutions.

What would be much more practical is to let the user manipulate tasks (star, edit, delete, complete) by typing in the beginning of a task's title. To help that, we can mark in the list view the part of a task's title that can be used as unique initials in a different colour. It would also be useful to allow the user undo any modification in a simple manner as well.

Here is some mockup...

List view:

Home


Buy eggs Fry them Eat them Buy bread

Out


Jogging -Day -Night Street fight

Command line:

wunderline complete buy e

We marked the following task(s) as completed:

Home


Buy eggs

or

wunderline complete buy eggs

We marked the following task(s) as completed:

Home


Buy eggs

wunderline complete -re "them$"

We marked the following task(s) as completed:

Home


Fry them Eat them

So, wunderline complete buy e behaves like wunderline complete -re "^buy e".

Batch completion:

wunderline complete o

We marked the following task(s) as completed:

Out


Jogging -Day -Night Street fight

Now, when we make a mistake:

wunderline undo

We removed the completed flag from the following task(s):

Out


Jogging -Day -Night Street fight

And we don't really need more than one level of history. When we make a mistake we get it immediately...

A similar logic may be extended to the subtasks as well:

wunderline complete d

We marked the following subtask(s) as completed:

Out


Jogging -Day

wayneashleyberry commented 8 years ago

Added in v4.4.0