-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[quick_actions] add localizedSubtitle for iOS #6973
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
I like this idea, though what you currently have doesn't compile because the
Also |
Ok sorry @jmagman, I've added the deps override (as indicated in the documentation), the Now I wait for the review, than I'll make a new PR to update only the platform interface |
Are you able to reproduce this test timeout locally?
|
@@ -1,5 +1,6 @@ | |||
## NEXT | |||
|
|||
* Add localizedSubtitle field for iOS |
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.
Please see the CHANGELOG style guide linked from the PR checklist.
@@ -26,3 +26,8 @@ dev_dependencies: | |||
|
|||
flutter: | |||
uses-material-design: true | |||
|
|||
# FOR TESTING AND INITIAL REVIEW ONLY. DO NOT MERGE. |
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.
Please revert all of the quick_actions_android
override entries since the package won't need any changes.
@@ -1,3 +1,7 @@ | |||
## NEXT |
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.
Please see the versioning policy linked in from the PR checklist.
@@ -1,5 +1,6 @@ | |||
## NEXT |
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.
As above, please see the versioning policy.
@@ -20,6 +21,11 @@ class ShortcutItem { | |||
/// Localized title of the item. | |||
final String localizedTitle; | |||
|
|||
/// Localized subtitle of the item. | |||
/// | |||
/// This is ignored on Android, since it's not supported. |
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.
Platform interface packages should not make claims about what implementation packages, which are a higher level, do or don't do. This should just say that it's ignored by platforms that don't support it.
@@ -34,7 +34,7 @@ Finally, manage the app's quick actions, for instance: | |||
```dart | |||
quickActions.setShortcutItems(<ShortcutItem>[ | |||
const ShortcutItem(type: 'action_main', localizedTitle: 'Main view', icon: 'icon_main'), | |||
const ShortcutItem(type: 'action_help', localizedTitle: 'Help', icon: 'icon_help') | |||
const ShortcutItem(type: 'action_help', localizedTitle: 'Help', localizedSubtitle: 'Tap to get help', icon: 'icon_help') |
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.
It's not clear to me that this is a common enough option that we actually need to update the README and example app to demonstrate it.
@@ -92,6 +92,7 @@ public final class QuickActionsPlugin: NSObject, FlutterPlugin, IOSQuickActionsA | |||
|
|||
let type = shortcut.type | |||
let localizedTitle = shortcut.localizedTitle | |||
let localizedSubtitle = shortcut.localizedSubtitle |
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.
This should just be inlined below, as it doesn't seem like the local variables are adding any value here. (The ones above may well be left over from a direct Pigeon conversion, as they would have been more useful prior to Pigeon.)
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.
This change should have corresponding native testing.
@GiacomoPignoni Are you still planning on updating this PR per the review feedback above? |
Thank you for your contribution. I'm going to close this PR for now since there are outstanding comments, just to get this off our PR review queue. Please don't hesitate to submit a new PR if you have the time to address the review comments. Thanks! |
Add the
localizedSubtitle
field on quick actions for iOS#129759
Pre-launch Checklist
dart format
.)[shared_preferences]
pubspec.yaml
with an appropriate new version according to the pub versioning philosophy, or this PR is exempt from version changes.CHANGELOG.md
to add a description of the change, following repository CHANGELOG style, or this PR is exempt from CHANGELOG changes.///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.