-
Notifications
You must be signed in to change notification settings - Fork 285
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
Add find note by content intent #1584
Conversation
You can test the changes in simplenote-ios from this Pull Request by:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Woah chained Intents, love it!!
// TODO: Better error | ||
return IntentNoteResolutionResult.unsupported() | ||
} | ||
let filteredNotes = notes.filter({ $0.content?.contains(content) == true }) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ideaaaally this happens at the Core Data level.
I haven't seen massively big accounts, but this will load all the things in memory, and run the lookup there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@charliescheer ^ Good to disregard though, I don't think this should be a problem in Simplenote
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm gonna disregard it for now I think. If we get any complaints then we can optimize
Fix
So another thing that might be useful for shortcuts is to be able to find a note by its content and not its title. This intent itself doesn't do anything except for search notes and present them as an option, but if you connect it to Append Note then you can find a note by it's content, and add content to it in one shortcut. pretty cool I think. So that is what I have done in this PR.
As a bonus, While I was at it I realized that you might also want to open a note that you found based on its content. So I have updated the Open Note Intent to accept a note from other shortcuts.
This is the last planned shortcut to be added, so this:
fixes #1569
fixes #1487
Test
okay, so testing this requires a bit of understanding of shortcuts.
find and append to note
Open Simplenote and confirm your text was added to your note
find and open note
confirm that the note you searched for is opened in Simplenote
Review
(Required) Add instructions for reviewers. For example:
Release
(Required) Add a concise statement to
RELEASE-NOTES.txt
if the changes should be included in release notes. Include details about updating the notes in this section. For example: