obsidian-tasks-group / obsidian-tasks

Task management for the Obsidian knowledge base.
https://publish.obsidian.md/tasks/
MIT License
2.5k stars 231 forks source link

Display bulletpoints below tasks in query results (Tasks code blocks) #1713

Closed sersorrel closed 3 weeks ago

sersorrel commented 1 year ago

⚠️ Please check that this feature request hasn't been suggested before.

🔖 Feature description

I often can't fully describe how to complete a task in one line of text without making it unreasonably long and hard to read, so I add bulletpoints below the task like this:

  • [ ] #task Do something
    • remember to do it well
    • also quickly and cheaply, though
  • [ ] #task Do another thing
    • some more details

However, in task queries, only the tasks themselves are displayed:

  • [ ] Do something
  • [ ] Do another thing

✔️ Solution

It would be useful for me if any indented bulletpoints after the task were displayed as well, e.g. a query might render more like how I originally wrote it:

  • [ ] Do something
    • remember to do it well
    • also quickly and cheaply, though
  • [ ] Do another thing
    • some more details

It would potentially be useful to be able to limit the maximum depth such child bulletpoints would be displayed until, to avoid bloating task queries too much (e.g. a maximum depth of 1 might hide the "also quickly and cheaply, though" bulletpoint in the example above), though I'm not actually sure whether this would be useful for me in practice.

❓ Alternatives

📝 Additional Context

There are some related feature requests already (ability to add such comments in the Edit Task modal https://github.com/obsidian-tasks-group/obsidian-tasks/issues/1502, showing child tasks in this manner https://github.com/obsidian-tasks-group/obsidian-tasks/discussions/60 (see particularly https://github.com/obsidian-tasks-group/obsidian-tasks/discussions/60#discussioncomment-3749803)), but nothing that specifically captures just the ability to display these bulletpoints.

claremacrae commented 1 year ago

I think what distinguishes this from similar requests is that this is about rendering of filter results in tasks code blocks.

I've given it an appropriate sprinkling of labels so it will be found when searching for similar things.

It definitely requires a redesign of the core code, as Tasks only stores lines with checkboxes (that match any global filter), so it does not currently know anything about any nested lines at all.

aubreyz commented 1 year ago

You could always do this I guess 😀

  - [ ] Test task <br>- fdgfdgfdgfd<br>- fgdfgdfgfd<br>- gfdgfdgfd<br> 📅 2023-03-02
aubreyz commented 1 year ago

The above was slightly tongue in cheek but could that not be leveraged? You could render it in a more aesthetic manner by say spitting out say // as a first level bullet. If that happens in the Task editing modal as well it would be almost like having subtasks, at least visually

elvarb commented 1 year ago

This would be really valuable, I very often add kind of a conclusion of a task with indented bullet below the task.

ilandikov commented 1 year ago

@sersorrel what if there is another task under the top one? Shall it be rendered or not? I think this is a very important point

For example:

- [ ] big task
    - comment on the big task
    - [ ] small task
        - comment on the small task
    - another comment on the big task

what's expected to be rendered by Tasks with this feature?

- [ ] big task
    - comment on the big task
    - [ ] small task
        - comment on the small task
    - another comment on the big task
- [ ] small task
    - comment on the small task

or

- [ ] big task
    - comment on the big task
    - another comment on the big task
- [ ] small task
    - comment on the small task

or

- [ ] big task
    - comment on the big task
        - comment on the small task
    - another comment on the big task
- [ ] small task
    - comment on the small task

or something else?

I think by adding this we add a ton of complexity which ultimately falls into Tasks managing tasks hierarchy. If I recall correctly there was a choice to not implement a hierarchy in any kind (may be wrong here, lmk)

Another issue is that all the 3 implementation above are correct - they are a pure choice/preference...

Iconca commented 1 year ago

Hey. Today I've posted on Obsidian Forum about my concern with using the Tusk Plugin. It's like in this topic, about a need to add some short comments to my tasks, and problems with folding lists. The post is here https://forum.obsidian.md/t/indented-task-list-that-is-foldable-in-a-reading-view-and-in-some-kind-of-query-task-plugin-dataview-dataviewjs/57393 But when today you unexpectedly updated Task Plugin with the styling properties, I've thought about something. Would it be possible to add to your "create and edit" menu one more box called sth like a "short comment"? The same way, you add a due date or a backlink. Then, since you allow use of a grid, you could show it in the next line. And instead of folding as a list, just grey it out with CSS, so it wouldn't be too distracting? Does it make any sense? Would this appear in a query block? I know very little of CSS and even less about programming. Does it sound like sth possible?

By the way, a chance to implement CSS styling is a huge improvement from my point of view, so thank you very much for working on and enabling it.

claremacrae commented 1 year ago

Hey. Today I've posted on Obsidian Forum about my concern with using the Tusk Plugin. It's like in this topic, about a need to add some short comments to my tasks, and problems with folding lists. The post is here https://forum.obsidian.md/t/indented-task-list-that-is-foldable-in-a-reading-view-and-in-some-kind-of-query-task-plugin-dataview-dataviewjs/57393

I will at some point reply to that post there.

But when today you unexpectedly updated Task Plugin with the styling properties, I've thought about something. Would it be possible to add to your "create and edit" menu one more box called sth like a "short comment"?

That request already been tracked in https://github.com/obsidian-tasks-group/obsidian-tasks/issues/1502.

The same way, you add a due date or a backlink. Then, since you allow use of a grid, you could show it in the next line. And instead of folding as a list, just grey it out with CSS, so it wouldn't be too distracting? Does it make any sense? Would this appear in a query block? I know very little of CSS and even less about programming. Does it sound like sth possible?

Yes it makes sense, however, the fundamental problem here is that this would need to be implemented first, and it is a lot of work, because currently every task is stored as a single line, with no knowledge about its neighbours.

I do understand that a lot of people really want to track nested tasks with the Tasks plugin. It is, however, a lot of work, and there are a lot of other requests that users want too. We can't do everything at once.

In the meantime, if nested tasks are critical to you, I recommend using the dataview plugin instead.

By the way, a chance to implement CSS styling is a huge improvement from my point of view, so thank you very much for working on and enabling it.

Many thanks. It was done by @esm7 and I am very grateful for their contribution.

Iconca commented 1 year ago

Thanks for the answer :)

Don't worry about that post too much. I know you've seen this problem. Actually, I've basically listed all discussions here, hoping someone from the brooder obsidian community might have some tips. Because I had a filling, that task's lists are problematic not only for a Task Plugin. If I'm not making some mistakes, Dataview also doesn't manage them as expected.

Thank you for links to connected threads. I don't always know what I'm looking for. I understand that you must be busy with all you do here. It's great that you take time to do this stuff at all. But I've seen how kindly you guys take all suggestions and that you actually consider them. That way I was encouraged to write. I've seen how you joined forces to implement things like Custom Statuses. Now the CSS styles. It's great to watch how this community bands together to do this stuff. Those things are appreciated and used. I'll do all in "my power" to understand the issues you pointed out. And hope for people with superpowers to resolve them :) Good luck and thanks.

claremacrae commented 3 weeks ago

I'm delighted to announce that this is now supported in Tasks 7.12.0.

image

See the documentation to find out how it works, and how to enable it either in individual queries... or if you wish, add it to your Global Query to turn it on by default.

This rendering step is the first in a series of steps to fully support nested tasks in Tasks - it is already really very useful.

Iconca commented 3 weeks ago

That's great. Thank you very much. 🙂