sleek
sleek copied to clipboard
Child/parent tasks
Do you find useful some child/parent task idea? I mean,
(A) Feed a dog +project
(B) Buy dog food
(A) Choose between X and Y due:XXXX-XX-XX
Buy Z @pet_store
Buy other edible shit
(C) Buy dog bowl due:XXXX-XX-XX
(A) Buy dog @pet_store
Maybe it isn't vanilla todo.txt, but it may be very useful for sleek as an independent tool.
Or, if you don't want to lose the simplicity of the todo.txt format, maybe make it easier to switch between different files?
@asakura42 the idea of sub tasks is a pretty good one, but it comes with quite some challenges. Mostly because the parent to do and its children are not connected by an identifier. You need to know there is no database running in sleek.
The idea of switching between files has been brought up already by another user who proposed a tabbing function on top of the to do list. Like that you could switch between files by either one click or by a keyboard shortcut. Its a pretty neat idea I would love to work on, but my time is extremely limited at the moment and I can only work on really critical bugs and technical depths. Though this could be the next feature I'm going to work on.
@asakura42 a solution for the tab function can be discussed here: https://github.com/ransome1/sleek/issues/189
I would leave this feature request open. Maybe at some point I or somebody will pick it up again and work on it.
For my personal use case, I am not sure if I would use subtasks a lot, but I do also see the value in it. After reading this issue, I had some thoughts regarding the implementation, and I'll just write them down here in case @ransome1 might find it useful at some point.
The main idea is to use level:N
to encode the task hierarchy, which I think would be sort of in line with the specification ("Developers should use the format key:value to define additional metadata"). For the original example, this would be:
(A) Feed a dog +project level:1
(B) Buy dog food level:2
(A) Choose between X and Y due:XXXX-XX-XX level:3
Buy Z @pet_store level:4
Buy other edible shit level:3
(C) Buy dog bowl due:XXXX-XX-XX level:2
(A) Buy dog @pet_store level:2
sleek then would have to make sure to present that in a user-friendly way and preserve the integrity of the tree when editing. Also, it probably will have to deal with all kinds of weird cases that can happen when users manually edit the files or use other software that does not support this feature.
Regarding compatibility with other software: All todo.txt software that I am aware of does not change the order of lines in the todo.txt file and just appends new tasks to the end. Therefore, they should not destroy the tree structure unless the user modifies individual tasks that belong to a tree. However, most software will change the display order and tear the tree apart. I guess this cannot be avoided, but at least the level:N
gives some indication that the task is part of a larger tree structure. (This is why the top-level task also should have a level:1
).
Another tricky and annoying detail: When done tasks are archived, the tree structure will be broken because single lines get moved to another file. Maybe a simple way to preserve context in this case could be to add the parent task descriptions to the done task, for example x (A) Choose between X and Y due:XXXX-XX-XX level:3 [Feed a dog +project > Buy dog food]
.
(An alternative to the level:N
metadata would be to encode the whole task tree in a single line. I would argue that this goes against the plain-text philosophy of todo.txt.)
@dlaidig I love the idea of using additional metadata to solve this. But I think we need to further extend this. Currently, this would infer information from the order of the task entries. Currently the order of each task can be random. With the suggested solution this would not work. An example would be to change Buy Z @pet_store level:4
to Buy Z @pet_store level:2
and suddenly Buy other edible shit level:3
is a subtask of Buy Z @pet_store level:2
. Or if we move (C) Buy dog bowl due:XXXX-XX-XX level:2
to the third position; then (A) Choose between X and Y due:XXXX-XX-XX level:3
is its subtask. I think the parent task must be explicit..
This is an automated response. We acknowledge your report, and we appreciate your engagement. However, as there has been no recent activity in this thread, it has been marked as stale. If you have any further feedback or if the matter is still relevant, please do not hesitate to respond. Otherwise, this thread will be automatically closed in 15 days from now.