obsidian-tasks: 'show tree' does not render non-task checkboxes

Please check that this issue hasn’t been reported before.

  • I searched previous Bug Reports didn’t find any similar reports.

Steps to reproduce

  1. Launch obsidian sandbox
  2. Install tasks plugin
  3. Set global filter to #task, and disable/re-enable the plugin as I couldn’t reload the sandbox directly.
  4. Create a “Testing note” note, and use the following content:
# Task query:
```tasks
filename includes Testing note
show tree
```

# Task definition
- [ ] #task Testing trees ➕ 2024-11-05
	- This is a sub-bullet 
	- [ ] This is a sub checkbox - it does not appear in the tree
	- [ ] #task This is a sub-task - it does appear in the tree

Expected Behavior

First of all, thanks a ton for the amazing plugin! I think tree view is not yet 100% stable, but I really enjoy the idea as I already use tree structures when defining my tasks.

In this case, I expected to see non-task checkboxes rendered like bullet points currently are (see example in current behavior). Maybe the bullet points behavior is also bound to change, so this is not a priority, but I did not find any documentation/other reference to this behavior.

Current behaviour

Non-task Checkboxes simply do not appear in the query result. On the left is the source view. Right is the reading view, but the live preview mode also has the same behavior as the reading view. image

Which Operating Systems are you using?

  • Android
  • iPhone/iPad
  • Linux
  • macOS
  • Windows

Obsidian Version

1.7.5

Tasks Plugin Version

7.13.0

Checks

  • I have tried it with all other plugins disabled and the error still occurs

Possible solution

No response

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 4
  • Comments: 15

Commits related to this issue

Most upvoted comments

This is now fixed and released in Tasks 7.16.0.

Done over about 4 pairing sessions with @ilandikov - thanks!

This is now fixed and released in Tasks 7.16.0.

As per the status: in progress label, we are working on this, at the rate of the 2 hours per week that @ilandikov and I have to pair-program together.

Next Tasks release

The next Tasks release will include the following PR:

See the screenshot in the PR for the new appearance - description shown, but not yet a checkbox:

Later work

In a feature release, checkboxes will be rendered on non-task sub-tasks, and they will be responsive…

(In our current work, checkboxes are rendered, but they are inactive in search results, and we decided not to release that yet, as it is obviously buggy.)

I’ll look into NON_TASKS, thanks for the pointer. And I completely understand that you have better value for your time elsewhere than this issue, I’ll leave it to your judgement. Once again, thanks a lot for your time, and also for this incredible plugin!

@dimiarbre For now I will leave this open, so that others may comment.

Because Tasks and Obsidian are so flexible, people use them in ways I had not considered - and sometimes in conflicting ways…

So based on this just one datapoint I would not yet change anything… and would encourage you to work within the confines of the existing Tasks capabilities.

But over time, I will collect more data about how people are using the Tasks plugin with nested tasks and list items, and we can decide what to do from there…

Thanks a lot for looking into it on your end! I just wanted to give a quick feedback about my current setup. After looking into converting every checkbox into tasks, I made the following observations:

  • I often create a very quick list of checkboxes for various reasons (for instance, to write a set of parameters for experiments I have to do/that failed).
  • I really like the option that automatically dates the done date when checking a box

Those two observations do not always combine well for me. For instance, this automatic date makes those somewhat random checkboxes appear in some of my queries (like my “done today” query).

I can think of some workarounds, but that would, I believe, also require significant changes to the current plugin (like having multiple types of tasks: one with tag #task and another without global filters/another tag, and being able to set parameters, such as automatic done date, separately for each and query those independently).

There is already a Tasks mechanism for toggling tasks and not adding done-dates… Use a custom status with type NON_TASK:

When I wrote this issue (and given the additional context you provided about the code), I assumed non-tasks checkboxes should simply behave like ListItem, because this was my expected behavior for tree view. But I completely understand that it is not that simple given the current code (I have a very limited knowledge of JS). Since this issue also probably arises from my use of Obsidian, I also understand that this is not a priority for the plugin.

It doesn’t arise from Obsidian, it arises from the current Tasks code.

From your explanation, my naive approach would have been to create a CheckboxItem class, inherited from ListItem, that only stores the missing [] information as well as what’s in between the brackets, in addition to what ListItem does. I think it would also be possible to make Tasks inherit from this CheckboxItem.

That is a reasonable suggestion - this all comes down to tradeoffs - where do the two of us who work on Tasks chose to spend our time.

And for me, it’s not just development time, it’s user-support time and managing PRs, which themselves can take hours.

Do you think, from your experience, that this is a feasible solution? If yes, I’ll be making a note to try this solution on my end once I have time (should be in December), and if it works I’ll try to open a PR. But as I have close to no experience in JS, this is possibly too naïve of a solution.

I am not accepting many PRs these days - only from people who are already very familiar with Tasks code and my ways of working - just because otherwise they usually take too much time to shepherd through and maintain.