uphy / obsidian-reminder

Reminder plugin for Obsidian
https://uphy.github.io/obsidian-reminder/
MIT License
457 stars 35 forks source link

Support locating desired tasks based on tag #10

Closed wenlzhang closed 3 years ago

wenlzhang commented 3 years ago

Supporting locating desired tasks based on tag, in addition to the format (@2021-08-14 09:37), would help better manage tasks from the tag pane and have a consistent tag definition for other tasks that do not have such tags. For instance, this plugin may look for tasks defined in the format of - [ ] Task #Task πŸ“… 2021-08-27T09:37.

Moreover, supporting this would help better integrating with Obsidian Tasks, which uses a global filter/tag for locating tasks managed by it. schemar/obsidian-tasks: Task management for the Obsidian knowledge base.

uphy commented 3 years ago

I'm planning to support Obsidian Tasks Plugin style TODOs. Please wait for it.

wenlzhang commented 3 years ago

That's great news! Really looking forward to the that!

The following discussion may be relevant to the discussion: https://github.com/schemar/obsidian-tasks/discussions/64#discussioncomment-1247795

schemar commented 3 years ago

Thank you for bringing this up @wenlzhang and thank you @uphy for planning on supporting Tasks. I would love to use this together with Tasks. And I really like that reminders is a separate plugin and won’t bloat Tasks. Thank you for this plugin! ❀️

If you need any support from Tasks, let me know 😊

imed-ghomari commented 3 years ago

This comment summarize the problems I'm currently having when working with the 2 plugins together.

uphy commented 3 years ago

@wenlzhang I introduced experimental support for tasks plugin. Can you try v1.0.5? (#tag is not supported yet)

image
wenlzhang commented 3 years ago

@uphy Thanks for supporting this! According to the discussion as follows, I realize that the reminder date/time may not be necessary the same as the due date/time.

https://github.com/schemar/obsidian-tasks/discussions/64#discussioncomment-1247118

Therefore, it would be great to be able to use different (emoji) symbol for signifying the reminder date/time, to avoid confusion, if possible. For instance, the reminder may look something like the following:

- [ ] Task #Reminder πŸ—“οΈ 2021-08-28 12:00 #Task #Life πŸ“… 2021-08-30

Should a space (this looks better for me) be inserted between the symobl and the data/time? Or it does not matter?

uphy commented 3 years ago

@wenlzhang Sorry but I misunderstood your feature request.

Would your request be to introduce a feature that only considers TODO list items that contain tags (#Tag) as reminder task? (like Obsidian Tasks Plugin's global filter)

Therefore, it would be great to be able to use different (emoji) symbol for signifying the reminder date/time, to avoid confusion

I feel TODO item sentence becomes too long to read. I don't want to add new time field. Why do you want to introduce another emoji symbol? Current implementation seems not confusing for me.

Should a space (this looks better for me) be inserted between the symobl and the data/time? Or it does not matter?

It will be fixed in the next version. Space is inserted based on the TODO item's another symbols. Also, incorrect symbol order will be fixed. (do not break your task format)

wenlzhang commented 3 years ago

Would your request be to introduce a feature that only considers TODO list items that contain tags (#Tag) as reminder task? (like Obsidian Tasks Plugin's global filter)

Yes. This request can be explained as follows:

Maybe this #Reminder tag can be hidden in preview mode, like what one can do with the Tasks plugin.

I feel TODO item sentence becomes too long to read. I don't want to add new time field.

This indeed can be problematic. This point is also discussed in the following issue.

Have a "short" mode which shows emoji details only on hover Β· Discussion #108 Β· schemar/obsidian-tasks

In case of the Reminder plugin, maybe certain task details, e.g. all tags, can be hidden when showing the reminder in the pop-up window. For instance, - [ ] Task #Reminder πŸ—“οΈ 2021-08-28 12:00 #Task #Life πŸ“… 2021-08-30 may become - [ ] Task πŸ—“οΈ 2021-08-28 12:00 πŸ“… 2021-08-30 when showing the reminder. Or maybe all time info can be hidden when showing the reminder? One may customize these in the plugin configuration pane.

Why do you want to introduce another emoji symbol?

I was thinking that

The reason for this is that the reminder date/time may be different from the due date/time. For instance, one may want to be reminded a few days before the due date.

Considering this point and the use of a customized tag for denoting reminders managed by the Reminder plugin, one may allow for checking the corresponding tasks from the search pane. Even better, maybe one can query tasks that has reminders, like what one can do with the Tasks plugin? Of course, this may be a separate feature request.

Current implementation seems not confusing for me.

This is true, as the current implementation treats the due date/time as the reminder date/time, if the Tasks format is used for denoting reminders.

imed-ghomari commented 3 years ago

I think adding a tag before the task or supporting the task plugin format would overcomplicate this process. Isn't it simpler to keep each plugin format separate, and just add a reminder with the current format at the end if the user wants a task + a reminder ? In this case, support for obsidian-tasks would be enabled by default, of course.

wenlzhang commented 3 years ago

Isn't it simpler to keep each plugin format separated, and just add a reminder with the current syntax at the end if the user wants a task + a reminder ?

Indeed. It might complicate the Reminder plugin. πŸ˜…

Would it be possible to query/list all tasks that have reminders then? Maybe syntax like the following would list all tasks that have reminders in preview mode. '''reminder not done '''

uphy commented 3 years ago

@wenlzhang Thank you for your response.

I think the default reminder format((@YYYY-MM-DD)) is suitable for having separate due date and remind date. (Because it is unique and doesn't conflict with other plugins) However, for visual compatibility with the tasks plugin, I feel it might be a good idea to introduce a new emoji, as you mentioned.

wenlzhang commented 3 years ago

I think the default reminder format((@YYYY-MM-DD)) is suitable for having separate due date and remind date.

@uphy Yes, I agree. If one only enable the default reminder format, i.e. (@YYYY-MM-DD), one can get a reminder at the set reminder date/time; if one enable both the default reminder format and the Tasks plugin format, one can get an additional reminder at due date/time. This might be of interest in some cases.

uphy commented 3 years ago

@wenlzhang I added custom emoji ⏰ as reminder symbol for tasks plugin format. Maybe it's interesting feature for you, too.

https://github.com/uphy/obsidian-reminder/issues/17#issuecomment-919073489

wenlzhang commented 3 years ago

@uphy Thanks for the update. I observed the following when testing this new format:

To be able to make the Reminder Tasks format work together with the Tasks Due Date, it would be great if the second case would also be recognized as a reminder. That is, as long as a task contains something like ⏰ 2021-09-14T12:00, it would be treated as a reminder; no matter what else is included in the task description.

uphy commented 3 years ago

@wenlzhang It's not reproduced. My expectation of the behavior is that both will be recognized as reminder.

Is your Date and Time format YYYY-MM-DDTHH:mm correctly?

wenlzhang commented 3 years ago

Is your Date and Time format YYYY-MM-DDTHH:mm correctly?

I think it would be set correctly, as can be seen from Figure 2.

As can be seen from the right side pane of Figure 1, only the first is recognized as a reminder, but not the second one.

Figure 1:

Screenshot 2021-09-15 at 00 31 48

Figure 2:

Screenshot 2021-09-15 at 00 33 25
uphy commented 3 years ago

~Does it have newline?~

image

~Reminder plugin's task should be one line.~

~If there are no newlines, it seems strange...~

It's due to tag. Reminder plugin split tokens by emoji. So your reminder time is recognized as 2021-09-15T12 #ToDoTask #CategoryTool

wenlzhang commented 3 years ago

Indeed. The following task would give a reminder: - [ ] Test Tasks and Reminder Tasks format #ToDoReminder #ToDoTask #CategoryTool ⏰ 2021-09-15T12:00 πŸ“… 2021-09-14.

Just to confirm, to make Reminder recognize the time info correctly, there should be nothing but date/time between these two emojis: ⏰ 2021-09-15T12:00 πŸ“…. Is this correct?

uphy commented 3 years ago

Yes, it is correct. This is also should be documented.

uphy commented 3 years ago

document: https://uphy.github.io/obsidian-reminder/guide/interop-tasks.html#distinguish-due-date-and-reminder-date