This repository has been archived by the owner on May 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 444
Feature: #2227: Siri Shortcuts (Activity/Custom Intents) #3579
Merged
Conversation
This file contains 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
soner-yuksel
force-pushed
the
feature/some-siri-shortcuts
branch
from
May 26, 2021 20:50
5ed02e3
to
bf06fd4
Compare
soner-yuksel
requested review from
Brandon-T,
kylehickinson and
iccub
and removed request for
Brandon-T
May 28, 2021 16:29
soner-yuksel
changed the title
[WIP] Feature: #2227: Siri Shortcuts (Activity/Custom Intents)
Feature: #2227: Siri Shortcuts (Activity/Custom Intents)
May 28, 2021
soner-yuksel
force-pushed
the
feature/some-siri-shortcuts
branch
from
May 28, 2021 19:58
ca0ce88
to
a1d3f86
Compare
aarsxx
approved these changes
Jun 14, 2021
soner-yuksel
force-pushed
the
feature/some-siri-shortcuts
branch
from
June 18, 2021 16:21
a1d3f86
to
9f68d77
Compare
iccub
suggested changes
Jun 22, 2021
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.
Small code style review
Client/Frontend/Browser/New Tab Page/NewTabPageViewController.swift
Outdated
Show resolved
Hide resolved
soner-yuksel
force-pushed
the
feature/some-siri-shortcuts
branch
from
June 22, 2021 15:03
9f68d77
to
dd6fd35
Compare
soner-yuksel
force-pushed
the
feature/some-siri-shortcuts
branch
from
June 29, 2021 20:00
b763d1e
to
1a80b21
Compare
iccub
suggested changes
Jul 6, 2021
Client/Frontend/Browser/BrowserViewController/BrowserViewController+Menu.swift
Outdated
Show resolved
Hide resolved
soner-yuksel
force-pushed
the
feature/some-siri-shortcuts
branch
from
July 6, 2021 16:50
3350cf4
to
5df5996
Compare
iccub
suggested changes
Jul 7, 2021
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.
Code looks good, left functional review offline
soner-yuksel
force-pushed
the
feature/some-siri-shortcuts
branch
from
July 7, 2021 22:23
8f94a4a
to
b404660
Compare
soner-yuksel
force-pushed
the
feature/some-siri-shortcuts
branch
from
July 15, 2021 15:45
fb39453
to
d60f963
Compare
kylehickinson
added a commit
that referenced
this pull request
Jul 16, 2021
kylehickinson
added a commit
that referenced
this pull request
Jul 16, 2021
iccub
added a commit
that referenced
this pull request
Jul 16, 2021
Enterprise profile will be handled at later point.
iccub
added a commit
that referenced
this pull request
Jul 16, 2021
7 tasks
iccub
added a commit
that referenced
this pull request
Jul 19, 2021
7 tasks
iccub
added a commit
that referenced
this pull request
Jul 20, 2021
iccub
added a commit
that referenced
this pull request
Jul 20, 2021
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
This PR is adding wide-variety support for Shortcuts and Siri Integration in Brave to surface in Spotlight as well as command Siri with voice.
The implementation supports both Activity and Custom Intent based Shortcut / Donation from Brave.
First part is adding the User Activities that allows user to expose certain things a user can do for app hand-off and Spotlight searches. This activity options are used for user to go from Siri into your app to complete a task. And these actions should provide easy way to access some frequent functionality in the application. These shortcuts are designed to be accessed inside the application and inside Settings an easy way is provided to user to add update and delete these shortcuts.
User Activity Shortcut list is as follows:
In Addition to these 6 Activity Based Shortcuts, we also added 3 different type of Custom Intent based Shortcuts inside the application.
Custom Intents are used so we can also add shortcuts that supports parameters and success/fail responses to these parameters. In addition we can also provide smart donations to the system so a repeated action would be indexed properly by the iOS.
Custom Intent Shortcut list is as follows
Open Website Shortcuts is designed so websiteURL parameter can be user-configurable inside shortcuts App and Add to Siri. When configured this parameter will be validated and a response will be shown to user before shortcuts is executed.
Custom Intent Shortcuts are very important to help and enhance user interaction with the application. A repeated re-direction of same URL will eventually seen as a suggestion on home page and spotlight.
All these activity and custom intents are donated to the iOS so a behaviour that turn into a habit will be suggested to user in various places which actually is the most important part of the Shortcut implementation.
Also the basic functionality of using shortcuts itself, for instance "Open Brave Today" will be helpful for some advanced user base.
Summary of Changes
This pull request fixes #2227
Security Ticket :https://github.com/brave/security/issues/471
Submitter Checklist:
NSLocalizableString()
Test Plan:
First Part of the test should be testing basic functionality of Activity Based Shortcuts (Add/Update them inside The Brave App and use them with Siri)
(Like when you add Open Playlist does it open the application and displays Playlist) etc.
Second Part of the test should be testing all 9 different shortcuts (Activity/Intent Based) inside Shortcuts application
Third Part of the test should be testing donations to the system is actually working as suggestions on Home Screen / Lock Screen / While Searching (Spotlight)
However to test shortcuts are appearing as suggestions, under Settings -> Siri & Search -> Siri Suggestions, different suggestion toggles should be enabled to see them in different places in the phone. (default should be on)
In addition under Settings -> Developer -> Shortcuts Testing
Display Recent Shortcuts / Display Upcoming Media / Display Donations on Lock Screen should be enabled so most recent donations can appear in places mentioned above. Lets not forget these are developer settings fo rtesting, in a real life scenario these donations might not appear as suggestions anywhere until they are marked as a habit by the system and criteria about this is unknown.
Screenshots:
In-App Activity Based Shortcut Setup:
Shortcut App / Intent Based Customization/Spotlight
Custom Intent Execution Example:
RPReplay_Final1622213795.MP4
Run a shortcut using Sri 😄
RPReplay_Final1622218063.MP4
Reviewer Checklist:
QA/(Yes|No)
release-notes/(include|exclude)
bug
/enhancement