Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Todo states should be represented properly by being mutually exclusive #1496

Open
2 tasks done
oblitzitate opened this issue Jul 1, 2024 · 2 comments
Open
2 tasks done
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.

Comments

@oblitzitate
Copy link

oblitzitate commented Jul 1, 2024

Prerequisites

  • I am using the latest stable release of Neovim
  • I am using the latest version of the plugin

Neovim Version

NVIM v0.11.0-dev-322+ge7020306a Build type: RelWithDebInfo LuaJIT 2.1.1716656478

Neorg setup

(local neorg (require :neorg))
(neorg.setup
  {:load
    {"core.defaults" {}
     "core.concealer" {}
     "core.dirman"
      {:config
        {:workspaces
          {:my_workspace "~/neorg"}}}}})

Actual behavior

- ( ) Undone -> not done yet
- (x) Done -> done with that
- (?) Needs further input

- (!) Urgent -> high priority task
- (+) Recurring task with children

- (-) Pending -> currently in progress
- (=) Task put on hold
- (_) Task cancelled (put down)

Expected behavior

Todo states should be represented properly by being mutually exclusive of each other. I argue the importance of representing state properly (i.e. sum types) because I could see an inconsistent set of states being problematic when looping through it or when pattern-matching or what not. There's probably other reasons as to why having proper sum types are important, but I can't think of any more right now.

That means Urgency and Recurrence should probably be separated from the todo states since they don't fit in.

Needs further input seems like it could be a sub-state of On-hold. Although, you could also argue that it could be sub-state of Pending also. The former would mean you've post-poned the task and the task needs further input, while the latter would mean you plan to start working as soon as you get the necessary input. With that being said, Needs further input should probably be a separate property also.

As far as Recurrence, I like the + symbol because it's easy to spot, but I'm thinking maybe it should be a virtual text from defining a Recurrence property underneath the task, so that you don't have to maintain both the + symbol and the Recurrence property. Idk.

The following are my current suggestions:

- ( ) Undone
- (-) Pending
- (=) On-hold
- (x) Done
- (_) Cancelled
- (-)a Pending, and high priority (or urgent)
- ( )b Undone, and medium priority (or delegate)
- ( )c Undone, and low priority (or schedule at a later date)
- (-)+ Pending, and recurring 
- ( )a|+ Undone, high priority, and recurring
- (-)? Pending, and needs further input
- (=)?|b|+ On-hold, needs further input, medium priority, and recurring

Steps to reproduce

Just list all the current todo states.

Potentially conflicting plugins

No response

Other information

No response

Help

None

Implementation help

No response

@oblitzitate oblitzitate added the bug Issues related to bugs. Please attach a severity, a priority and category with this label. label Jul 1, 2024
@benlubas
Copy link
Contributor

benlubas commented Jul 1, 2024

There's a difference between syntax and semantics in Norg. I'd suggest reading the specs to learn more.

The way your concern is currently addressed is by saying it's semantically incorrect to have both Done and Undone on a single detached modifier. The semantics aren't exactly implemented yet afaik.

The problem I see with your approach is that you're able to do something like this currently:

- ( |< 3rd September 2024) This item is `Undone` and has a due date of Sep 3rd 

But how are you gonna determine when the date ends and the todo item begins in:

- ( )< 3rd September 2024 This item is `Undone` and has a due date of Sep 3rd 

Detached modifiers are in a pretty good place I think. There's a lot of discussion on a few small spec changes and the new TS parser in the discord these past few months if you want to catch up on those.

@oblitzitate
Copy link
Author

oblitzitate commented Jul 1, 2024

The syntax was merely a suggestion so you can change or improve upon it to however makes sense. You can probably solve the syntax problem you refer to by having anything more than a single character be surrounded by some symbols.

But anyways, I'm more concerned with the semantics, as you put it. The sum type should be represented properly. Undone, Pending, On-hold, Done, and Cancelled makes sense as being the todo checkbox states. The rest don't make sense and should be separated.

For instance, - (!) Urgent doesn't seem intuitive because a priority is not a proper todo state and it's ambigious whether this is Undone, Pending, or On-hold. I also think a todo state should always be visible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues related to bugs. Please attach a severity, a priority and category with this label.
Projects
None yet
Development

No branches or pull requests

2 participants