djot.js icon indicating copy to clipboard operation
djot.js copied to clipboard

Simplify AST for TaskListItem

Open matklad opened this issue 2 years ago • 2 comments

Syntactically, we allow only two status here, checked and unchecked, so a boolean should be enough.

cc #55

matklad avatar Jun 04 '23 20:06 matklad

I'll just raise the obvious question: should it really be a boolean?

In org-mode, statuses are configurable, and there can be more than two. Here's the default doom config:

https://github.com/doomemacs/doomemacs/blob/07fca786154551f90f36535bfb21f8ca4abd5027/modules/lang/org/config.el#L164

IIRC, default for org itself is "done", "not done", "in progress".

bdarcus avatar Jul 03 '23 14:07 bdarcus

I wasn't familiar with org-mode before reading about it this evening, but having an org-mode style "in progress" state ([-]) is a nice idea. I wasn't sure about it at first, but after pondering I think it's the sort of thing my users would like.

Having a "paused" state ([?]) like doom is interesting, but I think I prefer the idea of sticking to 3 states like org-mode just so this doesn't get too out of hand.

The issue (as I see it), HTML doesn't exactly support multiple states for checkboxes. There's a CSS selector :indeterminate and an indeterminate state that can be set using JavaScript, but not in raw HTML.

That said, given that this is called TaskListItem and not CheckboxItem, it does seem reasonable to abandon checkbox terminology like "checked" for statuses that make sense for tasks, such as done/finished, not-done/unfinished, and in-progress.

:shrug: my 2 cents

mikekasprzak avatar Feb 12 '24 08:02 mikekasprzak