Automattic / simplenote-ios

Simplenote for iOS
https://simplenote.com
GNU General Public License v2.0
2.02k stars 281 forks source link

Add find note by content intent #1584

Closed charliescheer closed 2 weeks ago

charliescheer commented 3 weeks ago

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

  1. build app to device to ensure the entitlements are handled correctly
  2. background the app, open shortcuts, add a shortcut and tap on add action. Find Simplenote and add Find Note With Content
  3. tap on content and choose "Ask each time" and hit done in the drawer
  4. at the bottom of the page you should see Simplenote in a hidden modal, slide that up and select Append to note
  5. tap on content and hit Ask each time
  6. now run the shortcut.
  7. type in some text you know is in one of your notes and then hit done. (note if you have two notes with the same content you will be asked to choose which note you want. Make sure to test this too)
  8. then enter in some content in the next view and hit done

Open Simplenote and confirm your text was added to your note

find and open note

  1. background the app again, open shortcuts, add a shortcut and tap on add action. Find Simplenote and add Find Note With Content
  2. tap on content and choose "Ask each time" and hit done in the drawer
  3. at the bottom of the page you should see Simplenote in a hidden modal, slide that up and select Open Note
  4. now run the shortcut.

confirm that the note you searched for is opened in Simplenote

Review

(Required) Add instructions for reviewers. For example:

Only one developer is required to review these changes, but anyone can perform the review.

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:

RELEASE-NOTES.txt was updated in fc201c with:

Extended support for iOS Shortcuts

wpmobilebot commented 3 weeks ago

You can test the changes in simplenote-ios from this Pull Request by:

If you need access to App Center, please ask a maintainer to add you.