generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 286
feat: Add Reminders fields and Notifications #1925
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Draft
Erik-Handeland
wants to merge
97
commits into
obsidian-tasks-group:main
Choose a base branch
from
Erik-Handeland:reminders
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 37 commits
Commits
Show all changes
97 commits
Select commit
Hold shift + click to select a range
61eb448
System Notifications
Erik-Handeland 24047ba
Update .gitignore
Erik-Handeland 6fbcf75
obsidian modal
Erik-Handeland c609564
switched from interface to class
Erik-Handeland cd1819b
Reminder parsing and queries + model field
Erik-Handeland 836bd1e
reminders watcher
Erik-Handeland a29ad68
hooked up tasks to notification modals
Erik-Handeland b51b204
Time support
Erik-Handeland d759ba5
Delete .vscode directory
Erik-Handeland 528fc5b
Update .gitignore
Erik-Handeland edd333c
Delete src/Query/.vscode directory
Erik-Handeland 71736c9
todos
Erik-Handeland fa7152b
Merge branch 'reminders' of https://github.com/Erik-Handeland/obsidia…
Erik-Handeland a4c1945
clean up
Erik-Handeland d91b4b3
hide reminder date
Erik-Handeland 101b398
added back callback functions
Erik-Handeland 7560b6b
Recurrences now support reminders
Erik-Handeland ccf8e87
Update Recurrence.ts
Erik-Handeland 7da073f
migrated last reminderDate to reminder[]
Erik-Handeland 7dee6c5
Update Recurrence.ts
Erik-Handeland 8ba4542
cleanup
Erik-Handeland c596d5c
move from array of Reminder to single Reminders that holds an array o…
Erik-Handeland be6bfc3
merge main
Erik-Handeland e88f2cd
openFile callback added
Erik-Handeland e8aac99
starter documentation
Erik-Handeland fe065c5
Update Reminders.ts
Erik-Handeland 01e37ca
basic tests
Erik-Handeland 44a1486
Update ReminderList.ts
Erik-Handeland 9565076
refactored ReminderList
Erik-Handeland 110381e
Update Query.test.ts
Erik-Handeland 0f285bd
reminders now uses settings panel
Erik-Handeland 01e0bc5
clean up
Erik-Handeland 44fdfcc
fix recurrence bug & serializer bug
Erik-Handeland d0e8550
cleaned up notifications
Erik-Handeland bb6b711
notifications trigger more accurately
Erik-Handeland 9068c75
more tests
Erik-Handeland c8a755a
Clean up based on git comments
Erik-Handeland a21c7b1
Rename notification.ts to Notification.ts
Erik-Handeland 2e5ea71
Rename Notification.ts to Notification.ts
Erik-Handeland 187d6e7
Rename Reminder.ts to Reminder.ts
Erik-Handeland e770b95
Rename Icon.svelte to Icon.svelte
Erik-Handeland 378638f
Rename Markdown.svelte to Markdown.svelte
Erik-Handeland 3731393
Rename Reminder.svelte to Reminder.svelte
Erik-Handeland 10fa48a
Rename folders and remove main.css
Erik-Handeland 807a584
Fixed testing issue
Erik-Handeland d08fdef
fixed regex and added tests from claremacrae
Erik-Handeland 24af196
more serialize tests
Erik-Handeland a227f0b
query reminder tests
Erik-Handeland 06482ec
added Recurrence reminder tests
Erik-Handeland 0a938b3
refactor: Rename reminders to remind in Task and Recurrence
claremacrae cee10e5
refactor: Rename reminder field in RecurrenceBuilder.ts to singular
claremacrae 7a7708b
test: Remove the tests of multi-reminder capability
claremacrae d4bd23d
refactor!: Reinstate earlier regex for single date + time
claremacrae 9c8bba8
refactor: ReminderList constructor now only takes at most one Moment
claremacrae b9ea9d8
refactor!: Simplify emoji-date parsing as regex only matches 1 value
claremacrae 41398f1
refactor: RecurrenceBuilder.reminders() now takes only 1 date
claremacrae 76e90fa
refactor: TaskBuilder.reminders() now takes only 1 date
claremacrae 93cb3f2
refactor: Remove parseDateTimes() - no longer used.
claremacrae 1810893
test: Move 'differing only in reminder' test to correct section
claremacrae 0c009d5
test: Add some more checks in Recurrence.test.ts
claremacrae eb53efb
refactor: Rework Recurrence.next() for single reminder
claremacrae a874a49
refactor!: Now only support a single reminder
claremacrae 6eff445
refactor: Remove ReminderList class as no longer used
claremacrae 38ce5b6
comment: Add some TODOs of things to check
claremacrae 160007b
comment: Add more TODOs of things to check
claremacrae 52ae155
docs: Minor updates to Task-Reminders.md
claremacrae d65a0bb
docs: Add Reminder to Dates page
claremacrae 0c764f9
docs: Page about Reminders plugin links to the Tasks reminders page
claremacrae b562031
test: Add tests that show that sorting by reminders honours the time
claremacrae 16eef03
docs: Note the release version of Reminders facility
claremacrae 96e9af3
docs: Document 'sort by reminder'
claremacrae 4c7067e
test: Remove a TODO that I have now done.
claremacrae 56c04be
test: Remove tests that use twelveHour format
claremacrae 2fa9f9e
feat!: Make the default reminder format use 24-hour clock
claremacrae e12f881
feat!: Remove the 'Reminder Format' from settings UI
claremacrae 561a40c
test: Remove test helper setDateTimeFormat() as only 1 format now
claremacrae dac37cc
refactor: Get TIME_FORMATS.twentyFourHour directly instead of via set…
claremacrae 752ab37
refactor: Get TIME_FORMATS.twentyFourHour directly instead of via set…
claremacrae b79f497
refactor: Remove unused setting dateTimeFormat
claremacrae 41d1b12
refactor: Simplify emoji-based reminderRegex, to only match 24 hour t…
claremacrae abb5d20
docs: Update docs now times are always 24-hour clock.
claremacrae 1d18976
feat!: Use ⏰ for reminders for eventual consistency with Reminders
claremacrae a599230
fix: Use consistent & unique reminder shortcut in modal
claremacrae 19ec47d
test: Rename TaskBuilder.reminders()
claremacrae 223e3f6
test: Make TaskBuilder.reminder() consistent with date methods
claremacrae 129e64b
test: Reimplement testTaskFilter() using custom matchers
claremacrae 13fc7cc
test: When custom filter toMatchTask() fails, display instruction
claremacrae bf6075f
test: Show issues with times in reminder filters & tasks
claremacrae c90236f
fix: Filtering of task reminders strips off time, so that searches work.
claremacrae 638575b
test: Show that times on reminder filters are ignored
claremacrae 34e928a
refactor: Remove unused TIME_FORMATS.twelveHour
claremacrae 6315caf
test: Sort new instructions in Query.test.ts
claremacrae c43d594
test: Move some tests from Query.test.ts to ReminderDateField.test.ts
claremacrae 8efadf6
fix!!: Remove 'show/hide reminders' option
claremacrae be9ad29
refactor: Rename reminder Layout Option to hideReminderDate
claremacrae 9297016
Merge branch 'main' into user-Erik-Handeland-reminders
claremacrae 0497244
Merge branch 'main' into user-Erik-Handeland-reminders
claremacrae File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
--- | ||
publish: false | ||
--- | ||
|
||
# Notifications | ||
|
||
<span class="related-pages">#plugin/reminder</span> | ||
|
||
Within Tasks, reminder notifications can be set using the standard Tasks format `⏲️ YYYY-MM-DD` for daily notifications at a set or by specifying the hour `⏲️ YYYY-MM-DD h:mm a`. Multiple reminders can be set by separating secondary reminders with a comma: `⏲️ 2000-03-24, 2000-03-28 10:05 am, 2000-03-31` | ||
|
||
## Limitnations | ||
|
||
- It's not posible to set a reminder for midnight 12:00 am. This due to a limination with how tasks creates dates using momentjs which sets the defaults time to midnight when one isn't provided. | ||
- System notifications don't work on Mobile because Obsidian doesn't provide an API | ||
|
||
## How to complete the reminder | ||
|
||
The reminder date doesn't change when completing the task, the date will change only when you complete it from the reminder popup or from the notification. | ||
|
||
 | ||
 | ||
|
||
## Acknowledgment | ||
|
||
This feature was created using code from uphy's [obsidian-reminder](https://github.com/uphy/obsidian-reminder) plugin. | ||
Erik-Handeland marked this conversation as resolved.
Show resolved
Hide resolved
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import type { Moment } from 'moment'; | ||
import type { Task } from '../../Task'; | ||
import { DateField } from './DateField'; | ||
|
||
export class ReminderDateField extends DateField { | ||
public fieldName(): string { | ||
return 'reminder'; | ||
} | ||
|
||
public date(task: Task): Moment | null { | ||
if (task.reminders) { | ||
return task.reminders.peek(); | ||
} else { | ||
return null; | ||
} | ||
} | ||
Erik-Handeland marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
protected filterResultIfFieldMissing() { | ||
return false; | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.