Skip to content
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

Shortcut: Append to note #1170

Merged
merged 13 commits into from
Jun 7, 2024
Merged

Conversation

charliescheer
Copy link
Contributor

@charliescheer charliescheer commented Jun 3, 2024

Fix

One of the most likely and useful functions we could add to Simplenote shortcuts is the ability to append to a note. So in this PR I have done so.

You can setup a shortcut to append a specific content to any note, or you can get the note from another shortcut intent.

The append intent uses the simperium api so the server can handle any diffing or sync that needs to happen and the main app does not need to be open for the shortcut to work and then sync.

relies on #1169

Test

  1. Build and Run Simplenote, just to make sure that you have saved the extension token so the intents can upload to simperium
  2. run the intents extension on the shortcuts app
  3. add a new shortcut, find Simplenote, select Append to note
  4. add some content and pick a note to append to. Run the shortcut
  5. Launch simplenote, find that note, confirm the content was added to the note in question

Review

(Required) Add instructions for reviewers. For example:

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

Release

These changes do not require release notes.

@charliescheer charliescheer added the [feature] shortcuts Anything related to Shortcuts label Jun 3, 2024
@charliescheer charliescheer added this to the 2.21 milestone Jun 3, 2024
@charliescheer charliescheer self-assigned this Jun 3, 2024
Copy link
Contributor

@jleandroperez jleandroperez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@charliescheer sending you a few notes!! only important one is related to the entitlements.

TY!!

IntentsExtension/Models/Note+Intents.swift Show resolved Hide resolved
IntentsExtension/Tools/Downloader.swift Outdated Show resolved Hide resolved
IntentsExtension/Tools/Downloader.swift Outdated Show resolved Hide resolved
@@ -10,4 +10,7 @@ import Foundation

struct IntentsConstants {
static let noteIdentifierKey = "OpenNoteIntentHandlerIdentifierKey"
static let extensionGroupName = Bundle.main.sharedGroupDomain
static let simperiumAppID = "chalk-bump-f49"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably come from SimplenoteConstants.simperiumAppID

Please make sure that file doesn't get uploaded!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

Copy link
Contributor

@jleandroperez jleandroperez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

IntentsExtension/Models/Note+Intents.swift Show resolved Hide resolved
Base automatically changed from charlie/1145/share-auth-token to trunk June 7, 2024 22:11
@charliescheer charliescheer merged commit 3c36ed1 into trunk Jun 7, 2024
9 checks passed
@charliescheer charliescheer deleted the charlie/1145/append-to-note-mk2 branch June 7, 2024 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[feature] shortcuts Anything related to Shortcuts
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants