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

Shortcuts: Add open new note intent #1160

Merged
merged 7 commits into from
May 30, 2024

Conversation

charliescheer
Copy link
Contributor

@charliescheer charliescheer commented May 24, 2024

Fix

So the very first shortcut to add is one that simply opens Simplenote and creates a new note. This is a basic proof of concept that the intents and shortcut handling works.

So in this PR you can create a shortcut "Open New Note" that will launch Simplenote and then create a new note.

Relies on #1159

Test

  1. Build the app.
  2. Go to the shortcuts app, click on the plus button to add a new shortcut, search for Simplenote, select it, choose Open New Note
  3. Run the shortcut.
  • confirm that Simplenote opens and that a new note is created

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:

These changes do not require release notes.

@charliescheer charliescheer added the [feature] shortcuts Anything related to Shortcuts label May 24, 2024
@charliescheer charliescheer added this to the 2.21 milestone May 24, 2024
@charliescheer charliescheer self-assigned this May 24, 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.

Added a note on the ShortcutHandler component.

Other than that, feel free to :shipit: when ready!

@@ -8,8 +8,12 @@
<dict>
<key>IntentsRestrictedWhileLocked</key>
<array/>
<key>IntentsSupported</key>
<key>IntentsRestrictedWhileProtectedDataUnavailable</key>
Copy link
Contributor

Choose a reason for hiding this comment

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

TIL!

Simplenote/ShortcutHandler.swift Outdated Show resolved Hide resolved
@charliescheer
Copy link
Contributor Author

This is GTG, just waiting on the PR that this relies on

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:


switch type {
case .newNoteShortcut:
SimplenoteAppDelegate.shared().noteEditorViewController.createNote(from: nil)
Copy link
Contributor

Choose a reason for hiding this comment

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

You can drop SimplenoteAppDelegate.shared() (because that should be self)

Base automatically changed from charlie/add-intents-extension-again to trunk May 30, 2024 18:08
@charliescheer charliescheer merged commit 2670a75 into trunk May 30, 2024
8 checks passed
@charliescheer charliescheer deleted the charlie/1145/add-open-new-note-intent branch May 30, 2024 18:16
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.

2 participants