orgzly / orgzly-android

Outliner for taking notes and managing to-do lists
https://www.orgzly.com
GNU General Public License v3.0
2.7k stars 304 forks source link

allow marking a NOTE as DONE #275

Closed japhir closed 6 years ago

japhir commented 6 years ago

Currently, when I have a Note (a task w/o a TODO state) and mark it done (swipe right, click ✓) I get an error message saying "You can't mark Notes as Done". Why is this? I often quickly create shopping lists or other minor todo's, that I want to quickly get rid of again. I would like to mark them done before archiving them in emacs later.

nevenz commented 6 years ago

See this this PR. You can now set done note's state back to the first active one using .

But that wouldn't be right for notes that had no state previously.

Perhaps previous state needs to be saved for that feature?

japhir commented 6 years ago

Ah that's pretty cool! I think the easiest way of dealing with this would be to make a note a state. You could recognise it by the fact that it does not have one of the other states after the last *. But I don't know how the internals of the java thingie work, so it may be more difficult that I'm thinking now.

This line in my emacs config:

(setq org-todo-keywords
        '((sequence "NEXT(n)" "TODO(t)" "WAITING(w!/!)" "SCHEDULED(a)" "SOMEDAY(s!/!)" "PROJECT(p)" "|"
                    "DONE(d)" "CANCELLED(c)")))

makes it add something like the following line to a note's content whenever I change the state to a state with a !/! after the shortcut key letter.

- State "SOMEDAY"    from "NEXT"       [2018-01-17 Wed 18:07]

If I change it form being a note to one of the states, it prints a line like this:

  - State "SOMEDAY"    from              [2018-01-17 Wed 18:17]

So it seems that it also treats notes without a state as a state with no name.

nevenz commented 6 years ago

I think the easiest way of dealing with this would be to make a note a state.

It kinda is, but that's not the issue. The problem is how the button works now.

Assuming TODO NEXT | DONE in Settings...

If you enable it to work for notes too, you could be doing:

Note DONE TODO

And even now, you get:

NEXT DONE TODO

There are already buttons for going through the states. The idea was that this button toggles them. But that's impossible without saving the previous state.

I also just noticed this only works in notebook view, not in search results.

japhir commented 6 years ago

Hmm yeah that makes sense. But to me the current way it works doesn't. Going from NEXT to DONE and then to TODO in stead of NEXT is pretty much useless. I'd just always make the ✓ turn it into DONE, and accept that the button doesn't do anything on a DONE note, except maybe update the COMPLETED property time-stamp?

japhir commented 6 years ago

Or you could store the state like emacs does, in a line with the same formatting, or a separate property. But this would become quite obnoxious and I would disable the feature ;-).

nevenz commented 6 years ago

Hmm yeah that makes sense. But to me the current way it works doesn't.

Yeah, this will have to be sorted out before production.

Perhaps it's the easiest for now to just allow marking notes as DONE.

And in the next version, something like this could replace the need to have ✓ work like it does currently. @Endi1 what do you think?

Endi1 commented 6 years ago

What if instead of having all the various buttons you simply swipe your item to go to the next state? Kind of like it works on emacs with Shift + Right Arrow.

nevenz commented 6 years ago

What if instead of having all the various buttons you simply swipe your item to go to the next state?

Quick-menus would have to be removed, taking away a lot of space for buttons.

I'm fine with removing those menus, but then a bottom toolbar would have to be added to compensate.

I don't think cycling states should be that prominent. Right swipe to mark the note as done is OK though, since it's such a common action.

One more thing to take into account - after implementing moving notes with drag&drop, long-click to select the note won't be possible.

With all this, I'd suggest:

nevenz commented 6 years ago

BTW, I'll do that the title of this issue says for the next release.

The rest can be a new issue and discussed more (I'll link to it, tweet and stuff...).

Endi1 commented 6 years ago
  • Right swipe - set state to first done-state, or if the note is done, set it to the previous state it had

This means that the note should know its previous state at all times then?

What if right swipe cycles all the states and left swipe opens a quick-menu? It makes more sense if you have for example the following states:

PROJECT TODO DOING | DONE

and you go PROJECT > TODO > DOING > DONE by swiping right instead of PROJECT > TODO > PROJECT. A note would start with no state, then PROJECT > TODO....

On Thu, Jan 18, 2018 at 08:48:09AM +0000, Neven wrote:

What if instead of having all the various buttons you simply swipe your item to go to the next state?

Quick-menus would have to be removed, taking away a lot of space for buttons.

I'm fine with removing those menus, but then a bottom toolbar would have to be added to compensate.

I don't think cycling states should be that prominent. Right swipe to mark the note as done is OK though, since it's such a common action.

One more thing to take into account - after implementing moving notes with drag&drop, long-click to select the note won't be possible.

With all this, I'd suggest:

  • Right swipe - set state to first done-state, or if the note is done, set it to the previous state it had
  • Left swipe - open note, or a open a quick-menu, or something else?
  • Click - select a note - with both top and bottom toolbars displayed (similar to Todoist for example)
  • Long-click - drag & drop to move the sub-tree

-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/orgzly/orgzly-android/issues/275#issuecomment-358577914

nevenz commented 6 years ago

This means that the note should know its previous state at all times then?

Yes, that might be even more confusing actually.

What if right swipe cycles all the states

I think I would be fine with that personally, as I'm using only 3 states, but users might have a lot. Marking note as done, or setting a specific state would still be a pain (what #208 is about).

PROJECT > TODO > DOING > DONE by swiping right instead of PROJECT > TODO > PROJECT

Latter was never an option - returning to the previous state was suggested only if current state is done.

Let's move this to #208. My comment there might be the easiest short-term solution.