TaskListItem with TaskStates (instead of a checkbox) #80
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Inspired by the conversation in #53 and #55 on org-mode, this draft PR is an alternative to #53 that changes the grammar of
TaskListItem
from containing acheckbox
withchecked
andunchecked
states, to containing thestatus
of a task instead:finished
,unfinished
, andinprogress
.Some notes:
done
,not_done
, andin_progress
, but there was anotherdone
string in the code I wanted to avoid confusion with, and I didn't want to introduce-
or_
into the CSS classes without a conversation first.checkbox
, but some still remain. At the time I couldn't decide if the term checkbox should still be used to describe the[ ]
syntax, or if it should be more explicitly called a Taskchecked
orunchecked
, then it used anelse
for the other option. This is handy if you start withcheckbox === " "
to find theunchecked
, as theelse
will catch both[x]
and[X]
(and[o]
) aschecked
. I addedinprogress
into these checks without considering if the logical order should be changed.paused
([?]
) is easy enough, but the way states are added right now doesn't exactly lend itself to adding more easily (if it's even needed)