Simple checklist macro

Thanks for this compact checklist solution @fastfreddy !

I do want to point out that since this elegant solution relies on double-brackets to separate list items within a field, it is not (in current form) ideal for checklists that would contain links (for linking to contact info, etc.).

So check on [[enterprise]] rental can’t work as a to-do, nor Xfer balance from [[citibank]] to [[credit union]]. Surprisingly, despite the pre-struck-through appearance, Call [[Samantha’s Towing]] did render with a working link, though. If the link ends the to-do item, the link works, but the status of the to-do item is visually unclear.

(This solution does have a “linkify list” option — so that you can add notes about each item on a grocery list, etc…, but that option applies across a whole list, and to each line-item as a whole.)

Right @Springer, this is a limitation resulting (largely) from the design decision to store all list items in a single “list” field.

However, it seems that this solution stores items in a field and still allows links within items somehow: @benwebber 's checklist (in fact this solution seems to do most of what I was working towards, including item re-ordering!). I’ll investigate this approach… My early look points to a CSS styling problem more than anything else, and specifically, this dynamic test falls apart.

containsStr=`[contains:$(searchField)$[$(searchValue)$]]`

I didn’t see a styling issue in Ben’s solution, but the demo doesn’t apply a style dependent upon checked/unchecked status.

There are a few alternatives that also work:

More heavyweight solutions such as @telmiger’s ToDoNow that store each item as a tiddler have a similar limitations, because tiddlers’ titles also shouldn’t contain square brackets.

However, interestingly, @Maurycy’s EvidentlyCube’s TaskList Demo stores each task “title” in the body of a specifically tagged tiddler (and not its title), which can accommodate wikitext. In the “Simple task list” demonstrated at the link above doesn’t parse wikitext when rendering the task list, but the “Task List Showcase - Advanced Work Todo” does show it is possible.

1 Like

My solution stores each list item as a separate tiddler. Since rendering of an item is customizable per task list you can adjust it to parse wiki text - I don’t believe any of the example lists do it but I have it in my own TW instance I use for work.
Disclaimer: I haven’t read the topic entirely, just got pinged so I am clearing things up and hopefully not missing context :slight_smile:

Fantastic; corrected my post above.

@Springer released v.0.0.8 which supports wiki links in list items (see first item in the readme’s example 1 below)

Under the hood, problematic ] characters are replaced with a configurable unicode character before saving the list item, and reverted just before wikitext rendering.

I have also introduced optional drag handles and “on hover” styles, inspired by @benwebber checklist plugin.

1 Like