diff --git a/Client.xcodeproj/project.pbxproj b/Client.xcodeproj/project.pbxproj index 03031a551979..e709c0cdb9ec 100644 --- a/Client.xcodeproj/project.pbxproj +++ b/Client.xcodeproj/project.pbxproj @@ -563,6 +563,8 @@ D58A202925C9D96400105D25 /* BookmarkPanel.strings in Resources */ = {isa = PBXBuildFile; fileRef = D58A202725C9D96400105D25 /* BookmarkPanel.strings */; }; D58A202C25C9D96400105D25 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = D58A202A25C9D96400105D25 /* Localizable.strings */; }; D58A202F25C9D96400105D25 /* BookmarkPanelDeleteConfirm.strings in Resources */ = {isa = PBXBuildFile; fileRef = D58A202D25C9D96400105D25 /* BookmarkPanelDeleteConfirm.strings */; }; + D59431ED25E9912900F0BA82 /* WidgetIntents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = D59431F025E9912900F0BA82 /* WidgetIntents.intentdefinition */; }; + D59431EE25E9912900F0BA82 /* WidgetIntents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = D59431F025E9912900F0BA82 /* WidgetIntents.intentdefinition */; }; D59643E325C9B8E000EAB8B9 /* ClearPrivateData.strings in Resources */ = {isa = PBXBuildFile; fileRef = 58E14A8F991610DB13A9F1E1 /* ClearPrivateData.strings */; }; D59643E425C9B8E000EAB8B9 /* 3DTouchActions.strings in Resources */ = {isa = PBXBuildFile; fileRef = 514A4C83AE17612AF3025498 /* 3DTouchActions.strings */; }; D59643E525C9B8E000EAB8B9 /* AuthenticationManager.strings in Resources */ = {isa = PBXBuildFile; fileRef = 32484895B328A342AED539C8 /* AuthenticationManager.strings */; }; @@ -3254,7 +3256,7 @@ D58A202825C9D96400105D25 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/BookmarkPanel.strings; sourceTree = ""; }; D58A202B25C9D96400105D25 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/Localizable.strings; sourceTree = ""; }; D58A202E25C9D96400105D25 /* uk */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = uk; path = uk.lproj/BookmarkPanelDeleteConfirm.strings; sourceTree = ""; }; - D595529725D1F5590040B30B /* WidgetIntents.intentdefinition */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; path = WidgetIntents.intentdefinition; sourceTree = ""; }; + D59431EF25E9912900F0BA82 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; name = Base; path = Base.lproj/WidgetIntents.intentdefinition; sourceTree = ""; }; D59ED3CB25D1AF6A0074A720 /* dsb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = dsb; path = dsb.lproj/BookmarkPanel.strings; sourceTree = ""; }; D59ED3CC25D1AF6A0074A720 /* dsb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = dsb; path = dsb.lproj/Localizable.strings; sourceTree = ""; }; D59ED3CD25D1AF6A0074A720 /* dsb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = dsb; path = dsb.lproj/BookmarkPanelDeleteConfirm.strings; sourceTree = ""; }; @@ -4066,7 +4068,7 @@ 047F9B2D24E1FE1F00CD7DF7 /* Assets.xcassets */, 047F9B2F24E1FE1F00CD7DF7 /* Info.plist */, D58A202A25C9D96400105D25 /* Localizable.strings */, - D595529725D1F5590040B30B /* WidgetIntents.intentdefinition */, + D59431F025E9912900F0BA82 /* WidgetIntents.intentdefinition */, ); path = WidgetKit; sourceTree = ""; @@ -7043,6 +7045,7 @@ 1DF42682251BDB3A0086386A /* FaviconFetcher.swift in Sources */, 1DDAD13E24F0651C007623C8 /* TopSitesWidget.swift in Sources */, 4392FB20252EC49D00AD3D23 /* SessionData.swift in Sources */, + D59431EE25E9912900F0BA82 /* WidgetIntents.intentdefinition in Sources */, 047F9B4224E1FF4000CD7DF7 /* ImageButtonWithLabel.swift in Sources */, 047F9B2C24E1FE1C00CD7DF7 /* WidgetKit.swift in Sources */, 1DA3CE6724EEE86C00422BB2 /* AppInfo.swift in Sources */, @@ -7704,6 +7707,7 @@ E65075571E37F714006961AC /* FaviconFetcher.swift in Sources */, 048B4C8024A53EEB001B56E8 /* ImageButtonWithLabel.swift in Sources */, D863C8F21F68BFC20058D95F /* GradientProgressBar.swift in Sources */, + D59431ED25E9912900F0BA82 /* WidgetIntents.intentdefinition in Sources */, CAC458F1249429C20042561A /* LoginListSelectionHelper.swift in Sources */, EB9A178E20E525DF00B12184 /* ThemeSettingsController.swift in Sources */, 23A50958253F782E008FEBD9 /* NewTabButton.swift in Sources */, @@ -9869,6 +9873,14 @@ name = BookmarkPanelDeleteConfirm.strings; sourceTree = ""; }; + D59431F025E9912900F0BA82 /* WidgetIntents.intentdefinition */ = { + isa = PBXVariantGroup; + children = ( + D59431EF25E9912900F0BA82 /* Base */, + ); + name = WidgetIntents.intentdefinition; + sourceTree = ""; + }; F0D8481DAC1E6378ABF1565A /* ClearPrivateDataConfirm.strings */ = { isa = PBXVariantGroup; children = ( diff --git a/WidgetKit/WidgetIntents.intentdefinition b/WidgetKit/Base.lproj/WidgetIntents.intentdefinition similarity index 97% rename from WidgetKit/WidgetIntents.intentdefinition rename to WidgetKit/Base.lproj/WidgetIntents.intentdefinition index f4b165193896..b8a59857943a 100644 --- a/WidgetKit/WidgetIntents.intentdefinition +++ b/WidgetKit/Base.lproj/WidgetIntents.intentdefinition @@ -6,7 +6,7 @@ INEnumDisplayName - QuickActionType + Quick Action Type INEnumDisplayNameID eV8mOT INEnumGeneratesHeader @@ -73,7 +73,7 @@ INIntentDefinitionNamespace 5W2MbK INIntentDefinitionSystemVersion - 20D64 + 20E5186d INIntentDefinitionToolsBuildVersion 12D4e INIntentDefinitionToolsVersion @@ -84,7 +84,7 @@ INIntentCategory information INIntentDescription - Quick Action Description + Quick access to various Firefox acions INIntentDescriptionID ctDNmu INIntentEligibleForWidgets diff --git a/WidgetKit/SearchQuickLinksSmall/SmallQuickLink.swift b/WidgetKit/SearchQuickLinksSmall/SmallQuickLink.swift index c161092db034..838e8d028b42 100644 --- a/WidgetKit/SearchQuickLinksSmall/SmallQuickLink.swift +++ b/WidgetKit/SearchQuickLinksSmall/SmallQuickLink.swift @@ -6,16 +6,18 @@ import SwiftUI import WidgetKit -struct IntentProvider: TimelineProvider { - func getSnapshot(in context: Context, completion: @escaping (QuickLinkEntry) -> Void) { +struct IntentProvider: IntentTimelineProvider { + typealias Intent = QuickActionIntent + typealias Entry = QuickLinkEntry + + func getSnapshot(for configuration: QuickActionIntent, in context: Context, completion: @escaping (QuickLinkEntry) -> Void) { let entry = QuickLinkEntry(date: Date(), link: .search) completion(entry) } - func getTimeline(in context: Context, completion: @escaping (Timeline) -> Void) { - let link = QuickLink.search - let entries = [QuickLinkEntry(date: Date(), link: link)] - let timeline = Timeline(entries: entries, policy: .atEnd) + func getTimeline(for configuration: QuickActionIntent, in context: Context, completion: @escaping (Timeline) -> Void) { + let entry = QuickLinkEntry(date: Date(), link: QuickLink(rawValue: configuration.actionType.rawValue)!) + let timeline = Timeline(entries: [entry], policy: .never) completion(timeline) } @@ -30,7 +32,7 @@ struct QuickLinkEntry: TimelineEntry { } struct SmallQuickLinkView : View { - var entry: QuickLinkEntry + var entry: IntentProvider.Entry @ViewBuilder var body: some View { @@ -44,12 +46,12 @@ struct SmallQuickLinkWidget: Widget { private let kind: String = "Quick Actions - Small" public var body: some WidgetConfiguration { - StaticConfiguration(kind: kind, provider: IntentProvider()) { entry in + IntentConfiguration(kind: kind, intent: QuickActionIntent.self, provider: IntentProvider()) { entry in SmallQuickLinkView(entry: entry) } .supportedFamilies([.systemSmall]) - .configurationDisplayName(String.QuickActionsGalleryTitlev2) - .description(String.SearchInFirefoxTitle) + .configurationDisplayName(String.QuickActionsGalleryTitle) + .description(String.QuickActionGalleryDescription) } } diff --git a/l10n_comments.txt b/l10n_comments.txt new file mode 100644 index 000000000000..d00b22009afb --- /dev/null +++ b/l10n_comments.txt @@ -0,0 +1,17 @@ +2GqvPe=Quick Actions drop down menu item for Go to Copied Link when widget enters edit mode and drop down menu expands +PzSrmZ-2GqvPe=Accessibility label to confirm the go to copied link selection +PzSrmZ-eHmH1H=Accessibility label to confirm the Clear Private Tabs selection +PzSrmZ-scEmjs=Accessibility label to confirm the New Private Search selection +PzSrmZ-xRJbBP=Accessibility label to confirm the New Search selection +ctDNmu=Description of the collection of widgets +eHmH1H=Quick Actions drop down menu item for lear Private Tabs when widget enters edit mode and drop down menu expands +eV8mOT=The description of a customizable section of the widget +eqyNJg=Title of the quick actions widgets +fi3W24-2GqvPe=Label showing how many widgets match ‘Go to Copied Link’. ${count} is a placeholder fo the number of widgets. +fi3W24-eHmH1H=Label showing how many widgets match ‘Clear Private Tabs’. ${count} is a placeholder fo the number of widgets. +fi3W24-scEmjs=Label showing how many widgets match ‘New Private Search’. ${count} is a placeholder fo the number of widgets. +fi3W24-xRJbBP=Label showing how many widgets match ‘New Search’. ${count} is a placeholder fo the number of widgets. +scEmjs=Quick Actions drop down menu item for new private search when widget enters edit mode and drop down menu expands +w9jdPK=Quick Actions left label text for dropdown menu when widget enters edit mode +xRJbBP=Quick Actions drop down menu item for new search when widget enters edit mode and drop down menu expands +