From 873fb58fd93d3cea6d62934b0d76ec5e055219d9 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Fri, 6 Oct 2023 20:52:58 +0200 Subject: [PATCH 01/28] NetP connection notifications improvements (#2073) --- ...workProtectionNotificationIdentifier.swift | 4 +--- DuckDuckGo.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/swiftpm/Package.resolved | 8 ++++---- ...orkProtectionUNNotificationPresenter.swift | 19 +++++++++++++++---- PacketTunnelProvider/UserText.swift | 3 +++ 5 files changed, 24 insertions(+), 12 deletions(-) diff --git a/Core/NetworkProtectionNotificationIdentifier.swift b/Core/NetworkProtectionNotificationIdentifier.swift index 66a29dcebd..20e1a7631a 100644 --- a/Core/NetworkProtectionNotificationIdentifier.swift +++ b/Core/NetworkProtectionNotificationIdentifier.swift @@ -20,9 +20,7 @@ import Foundation public enum NetworkProtectionNotificationIdentifier: String { - case reconnecting = "network-protection.notification.reconnecting" - case reconnected = "network-protection.notification.reconnected" - case connectionFailure = "network-protection.notification.connection-failure" + case connection = "network-protection.notification.connection" case superseded = "network-protection.notification.superseded" case test = "network-protection.notification.test" } diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 8c56d96777..479e0e274a 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -8970,7 +8970,7 @@ repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 80.4.1; + version = 81.0.0; }; }; C14882EB27F211A000D59F0C /* XCRemoteSwiftPackageReference "SwiftSoup" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 10ef7c2de8..4a2755a27d 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/DuckDuckGo/BrowserServicesKit", "state": { "branch": null, - "revision": "9dea0583dc6269971fb4728bd3efa1ed53f88306", - "version": "80.4.1" + "revision": "5a77dc747a1bee25947b1d3ae3831922be05fd22", + "version": "81.0.0" } }, { @@ -33,8 +33,8 @@ "repositoryURL": "https://github.com/duckduckgo/content-scope-scripts", "state": { "branch": null, - "revision": "8def15fe8a4c2fb76730f640507e9fd1d6c1f8a7", - "version": "4.32.0" + "revision": "74b6142c016be354144f28551de41b50c4864b1f", + "version": "4.37.0" } }, { diff --git a/PacketTunnelProvider/NetworkProtection/NetworkProtectionUNNotificationPresenter.swift b/PacketTunnelProvider/NetworkProtection/NetworkProtectionUNNotificationPresenter.swift index 7ada176e81..28358d72c8 100644 --- a/PacketTunnelProvider/NetworkProtection/NetworkProtectionUNNotificationPresenter.swift +++ b/PacketTunnelProvider/NetworkProtection/NetworkProtectionUNNotificationPresenter.swift @@ -76,19 +76,30 @@ final class NetworkProtectionUNNotificationPresenter: NSObject, NetworkProtectio showNotification(.test, content) } - func showReconnectedNotification() { + func showConnectedNotification(serverLocation: String?) { + let body: String + if let serverLocation { + body = UserText.networkProtectionConnectionSuccessNotificationBody(serverLocation: serverLocation) + } else { + body = UserText.networkProtectionConnectionSuccessNotificationBody + } + let content = notificationContent(body: body) + showNotification(.connection, content) + } + + func showConnectionNotification(serverLocation: String?) { let content = notificationContent(body: UserText.networkProtectionConnectionSuccessNotificationBody) - showNotification(.reconnected, content) + showNotification(.connection, content) } func showReconnectingNotification() { let content = notificationContent(body: UserText.networkProtectionConnectionInterruptedNotificationBody) - showNotification(.reconnecting, content) + showNotification(.connection, content) } func showConnectionFailureNotification() { let content = notificationContent(body: UserText.networkProtectionConnectionFailureNotificationBody) - showNotification(.connectionFailure, content) + showNotification(.connection, content) } func showSupersededNotification() { diff --git a/PacketTunnelProvider/UserText.swift b/PacketTunnelProvider/UserText.swift index 0d2bd15fae..aa236db2e1 100644 --- a/PacketTunnelProvider/UserText.swift +++ b/PacketTunnelProvider/UserText.swift @@ -28,6 +28,9 @@ final class UserText { static let networkProtectionConnectionSuccessNotificationBody = NSLocalizedString("network.protection.success.notification.body", value: "Network Protection is On. Your location and online activity are protected.", comment: "The body of the notification shown when Network Protection reconnects successfully") + static func networkProtectionConnectionSuccessNotificationBody(serverLocation: String) -> String { NSLocalizedString("network.protection.success.notification.subtitle.including.serverLocation", value: "Routing device traffic through \(serverLocation).", comment: "The body of the notification shown when Network Protection connects successfully with the city + state/country as formatted parameter") + } + static let networkProtectionConnectionInterruptedNotificationBody = NSLocalizedString("network.protection.interrupted.notification.body", value: "Network Protection was interrupted. Attempting to reconnect now...", comment: "The body of the notification shown when Network Protection's connection is interrupted") static let networkProtectionConnectionFailureNotificationBody = NSLocalizedString("network.protection.failure.notification.body", value: "Network Protection failed to connect. Please try again later.", comment: "The body of the notification shown when Network Protection fails to reconnect") From bd2ec13ffdc3a173bbdbc8b61e21ed7a418b0a30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Fri, 6 Oct 2023 22:59:26 +0200 Subject: [PATCH 02/28] Release 7.92.0 (#2076) --- Core/DefaultVariantManager.swift | 4 +++ Core/UserAgentManager.swift | 7 ++++- DuckDuckGo.xcodeproj/project.pbxproj | 42 ++++++++++++++-------------- 3 files changed, 31 insertions(+), 22 deletions(-) diff --git a/Core/DefaultVariantManager.swift b/Core/DefaultVariantManager.swift index 1f0a250f4e..7539b2981b 100644 --- a/Core/DefaultVariantManager.swift +++ b/Core/DefaultVariantManager.swift @@ -25,6 +25,8 @@ import BrowserServicesKit extension FeatureName { // Define your feature e.g.: // public static let experimentalFeature = FeatureName(rawValue: "experimentalFeature") + + public static let fixedUserAgent = FeatureName(rawValue: "fixedUserAgent") } public struct VariantIOS: Variant { @@ -59,6 +61,8 @@ public struct VariantIOS: Variant { VariantIOS(name: "sc", weight: doNotAllocate, isIncluded: When.always, features: []), VariantIOS(name: "sd", weight: doNotAllocate, isIncluded: When.always, features: []), VariantIOS(name: "se", weight: doNotAllocate, isIncluded: When.always, features: []), + VariantIOS(name: "me", weight: 1, isIncluded: When.always, features: []), + VariantIOS(name: "mf", weight: 1, isIncluded: When.always, features: [.fixedUserAgent]), returningUser ] diff --git a/Core/UserAgentManager.swift b/Core/UserAgentManager.swift index 577922f317..0e03659e2e 100644 --- a/Core/UserAgentManager.swift +++ b/Core/UserAgentManager.swift @@ -130,7 +130,7 @@ struct UserAgent { private let applicationComponent = "DuckDuckGo/\(AppVersion.shared.majorVersionNumber)" private let statistics: StatisticsStore private let isTesting: Bool = ProcessInfo().arguments.contains("testing") - + init(defaultAgent: String = Constants.fallbackDefaultAgent, statistics: StatisticsStore = StatisticsUserDefaults()) { versionComponent = UserAgent.createVersionComponent(fromAgent: defaultAgent) baseAgent = UserAgent.createBaseAgent(fromAgent: defaultAgent, versionComponent: versionComponent) @@ -181,6 +181,7 @@ struct UserAgent { return versions } + // swiftlint:disable:next cyclomatic_complexity public func agent(forUrl url: URL?, isDesktop: Bool, privacyConfig: PrivacyConfiguration = ContentBlocking.shared.privacyConfigurationManager.privacyConfig) -> String { @@ -209,6 +210,10 @@ struct UserAgent { return ddgFixedLogic(forUrl: url, isDesktop: isDesktop, privacyConfig: privacyConfig) } + if DefaultVariantManager().isSupported(feature: .fixedUserAgent) { + return ddgFixedLogic(forUrl: url, isDesktop: isDesktop, privacyConfig: privacyConfig) + } + switch defaultPolicy(forConfig: privacyConfig) { case .ddg: return oldLogic(forUrl: url, isDesktop: isDesktop, privacyConfig: privacyConfig) case .ddgFixed: return ddgFixedLogic(forUrl: url, isDesktop: isDesktop, privacyConfig: privacyConfig) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 0025da68e4..c282275382 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -7567,7 +7567,7 @@ CODE_SIGN_ENTITLEMENTS = PacketTunnelProvider/PacketTunnelProvider.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; @@ -7604,7 +7604,7 @@ CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -7696,7 +7696,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -7723,7 +7723,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -7869,7 +7869,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -7893,7 +7893,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; INFOPLIST_FILE = DuckDuckGo/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -7957,7 +7957,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Widgets/Info.plist; @@ -7992,7 +7992,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8026,7 +8026,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = OpenAction/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -8056,7 +8056,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8342,7 +8342,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGoAlpha.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8368,7 +8368,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8400,7 +8400,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8437,7 +8437,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8473,7 +8473,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8508,11 +8508,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 0; + DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8686,11 +8686,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 0; + DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8719,10 +8719,10 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 0; + DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; From 495985d3e18ccdae0d51f734c85dc0e3ed63e166 Mon Sep 17 00:00:00 2001 From: amddg44 Date: Sun, 8 Oct 2023 14:03:21 +0200 Subject: [PATCH 03/28] Removes iOS phased rollout dry run pixel (#2064) Task/Issue URL: https://app.asana.com/0/0/1205515530563288/f Tech Design URL: CC: Description: Removes the incremental feature flag tester and associated pixel & user default key --- Core/PixelEvent.swift | 3 - DuckDuckGo.xcodeproj/project.pbxproj | 10 +- .../xcshareddata/swiftpm/Package.resolved | 6 +- DuckDuckGo/AppDelegate.swift | 12 +- .../PhasedRolloutFeatureFlagTester.swift | 84 ---------- .../PhasedRolloutFeatureFlagTesterTests.swift | 153 ------------------ 6 files changed, 9 insertions(+), 259 deletions(-) delete mode 100644 DuckDuckGo/PhasedRolloutFeatureFlagTester.swift delete mode 100644 DuckDuckGoTests/PhasedRolloutFeatureFlagTesterTests.swift diff --git a/Core/PixelEvent.swift b/Core/PixelEvent.swift index d050a4d9e3..1b1193ddc2 100644 --- a/Core/PixelEvent.swift +++ b/Core/PixelEvent.swift @@ -502,7 +502,6 @@ extension Pixel { case emailIncontextModalExitEarlyContinue case compilationFailed - case incrementalRolloutTest } } @@ -985,8 +984,6 @@ extension Pixel.Event { case .debugReturnUserAddATB: return "m_debug_return_user_add_atb" case .debugReturnUserReadATB: return "m_debug_return_user_read_atb" case .debugReturnUserUpdateATB: return "m_debug_return_user_update_atb" - - case .incrementalRolloutTest: return "m_autofill_incremental_rollout_test" } } diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 7f1d4a3cab..bc8e986dc4 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -696,9 +696,7 @@ C18ED43C2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */; }; C18ED43A2AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18ED4392AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift */; }; C1963863283794A000298D4D /* BookmarksCachingSearch.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1963862283794A000298D4D /* BookmarksCachingSearch.swift */; }; - C1B0F63E2AB08904001EAF05 /* PhasedRolloutFeatureFlagTester.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B0F63D2AB08904001EAF05 /* PhasedRolloutFeatureFlagTester.swift */; }; C1B0F6422AB08BE9001EAF05 /* MockPrivacyConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B0F6412AB08BE9001EAF05 /* MockPrivacyConfiguration.swift */; }; - C1B0F6442AB0D47A001EAF05 /* PhasedRolloutFeatureFlagTesterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B0F63F2AB08A53001EAF05 /* PhasedRolloutFeatureFlagTesterTests.swift */; }; C1B7B51C28941E980098FD6A /* HomeMessageViewModelBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B7B51B28941E980098FD6A /* HomeMessageViewModelBuilder.swift */; }; C1B7B52328941F2A0098FD6A /* RemoteMessagingStore.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B7B51F28941F2A0098FD6A /* RemoteMessagingStore.swift */; }; C1B7B52428941F2A0098FD6A /* RemoteMessageRequest.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B7B52028941F2A0098FD6A /* RemoteMessageRequest.swift */; }; @@ -2270,8 +2268,6 @@ C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileTextPreviewDebugViewController.swift; sourceTree = ""; }; C18ED4392AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutofillSettingsEnableFooterView.swift; sourceTree = ""; }; C1963862283794A000298D4D /* BookmarksCachingSearch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BookmarksCachingSearch.swift; sourceTree = ""; }; - C1B0F63D2AB08904001EAF05 /* PhasedRolloutFeatureFlagTester.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhasedRolloutFeatureFlagTester.swift; sourceTree = ""; }; - C1B0F63F2AB08A53001EAF05 /* PhasedRolloutFeatureFlagTesterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PhasedRolloutFeatureFlagTesterTests.swift; sourceTree = ""; }; C1B0F6412AB08BE9001EAF05 /* MockPrivacyConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockPrivacyConfiguration.swift; sourceTree = ""; }; C1B7B51B28941E980098FD6A /* HomeMessageViewModelBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeMessageViewModelBuilder.swift; sourceTree = ""; }; C1B7B51F28941F2A0098FD6A /* RemoteMessagingStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = RemoteMessagingStore.swift; sourceTree = ""; }; @@ -5148,7 +5144,6 @@ C1BF0BA629B63E0400482B73 /* AutofillLoginUI */, F40F843528C938370081AE75 /* AutofillLoginListViewModelTests.swift */, C1D21E2E293A599C006E5A05 /* AutofillLoginSessionTests.swift */, - C1B0F63F2AB08A53001EAF05 /* PhasedRolloutFeatureFlagTesterTests.swift */, ); name = Autofill; sourceTree = ""; @@ -5167,7 +5162,6 @@ C17B59552A03AAC40055F2D1 /* PasswordGeneration */, 31951E9328230D8900CAF535 /* Shared */, F407605428131923006B1E0B /* SaveLogin */, - C1B0F63D2AB08904001EAF05 /* PhasedRolloutFeatureFlagTester.swift */, ); name = Autofill; sourceTree = ""; @@ -6354,7 +6348,6 @@ 98B31292218CCB8C00E54DE1 /* AppDependencyProvider.swift in Sources */, 02C57C4B2514FEFB009E5129 /* DoNotSellSettingsViewController.swift in Sources */, 02A54A9C2A097C95000C8FED /* AppTPHomeViewSectionRenderer.swift in Sources */, - C1B0F63E2AB08904001EAF05 /* PhasedRolloutFeatureFlagTester.swift in Sources */, 8540BBA22440857A00017FE4 /* PreserveLoginsWorker.swift in Sources */, 85DFEDF924CF3D0E00973FE7 /* TabsBarCell.swift in Sources */, F17922DB1E717C8D006E3D97 /* Suggestion.swift in Sources */, @@ -6512,7 +6505,6 @@ 987130C5294AAB9F00AB05E0 /* BookmarkEditorViewModelTests.swift in Sources */, 8341D807212D5E8D000514C2 /* HashExtensionTest.swift in Sources */, C1D21E2F293A599C006E5A05 /* AutofillLoginSessionTests.swift in Sources */, - C1B0F6442AB0D47A001EAF05 /* PhasedRolloutFeatureFlagTesterTests.swift in Sources */, 85D2187924BF6B8B004373D2 /* FaviconSourcesProviderTests.swift in Sources */, 1E8146AD28C8ABF000D1AF63 /* TrackerAnimationLogicTests.swift in Sources */, B6AD9E3A28D456820019CDE9 /* PrivacyConfigurationManagerMock.swift in Sources */, @@ -8970,7 +8962,7 @@ repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 81.0.0; + version = 81.1.0; }; }; C14882EB27F211A000D59F0C /* XCRemoteSwiftPackageReference "SwiftSoup" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 4a2755a27d..ce52c2c554 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/DuckDuckGo/BrowserServicesKit", "state": { "branch": null, - "revision": "5a77dc747a1bee25947b1d3ae3831922be05fd22", - "version": "81.0.0" + "revision": "43fd829917f61f605fc110b68bb1bf1841276b3c", + "version": "81.1.0" } }, { @@ -156,7 +156,7 @@ }, { "package": "TrackerRadarKit", - "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit", + "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit.git", "state": { "branch": null, "revision": "4684440d03304e7638a2c8086895367e90987463", diff --git a/DuckDuckGo/AppDelegate.swift b/DuckDuckGo/AppDelegate.swift index 3aa43b1fd5..c41c64d7ce 100644 --- a/DuckDuckGo/AppDelegate.swift +++ b/DuckDuckGo/AppDelegate.swift @@ -82,6 +82,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { // Can be removed after a couple of versions cleanUpMacPromoExperiment2() + cleanUpIncrementalRolloutPixelTest() APIRequest.Headers.setUserAgent(DefaultUserAgentManager.duckDuckGoUserAgent) Configuration.setURLProvider(AppConfigurationURLProvider()) @@ -246,6 +247,10 @@ class AppDelegate: UIResponder, UIApplicationDelegate { UserDefaults.standard.removeObject(forKey: "com.duckduckgo.ios.macPromoMay23.exp2.cohort") } + private func cleanUpIncrementalRolloutPixelTest() { + UserDefaults.standard.removeObject(forKey: "network-protection.incremental-feature-flag-test.has-sent-pixel") + } + private func clearTmp() { let tmp = FileManager.default.temporaryDirectory do { @@ -264,12 +269,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate { }) } - // Temporary feature flag tester, to validate that phased rollouts are working as intended. - // This is to be removed before the end of August 2023. - lazy var featureFlagTester: PhasedRolloutFeatureFlagTester = { - return PhasedRolloutFeatureFlagTester() - }() - func applicationDidBecomeActive(_ application: UIApplication) { guard !testing else { return } @@ -323,7 +322,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate { syncService.scheduler.notifyAppLifecycleEvent() fireFailedCompilationsPixelIfNeeded() - featureFlagTester.sendFeatureFlagEnabledPixelIfNecessary() } private func fireAppLaunchPixel() { diff --git a/DuckDuckGo/PhasedRolloutFeatureFlagTester.swift b/DuckDuckGo/PhasedRolloutFeatureFlagTester.swift deleted file mode 100644 index 12e94300dd..0000000000 --- a/DuckDuckGo/PhasedRolloutFeatureFlagTester.swift +++ /dev/null @@ -1,84 +0,0 @@ -// -// PhasedRolloutFeatureFlagTester.swift -// DuckDuckGo -// -// Copyright © 2023 DuckDuckGo. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// -import Foundation -import BrowserServicesKit -import Core - -protocol PhasedRolloutPixelSender: AnyObject { - func sendPixel(completion: @escaping (Error?) -> Void) -} - -final class DefaultPhasedRolloutPixelSender: PhasedRolloutPixelSender { - func sendPixel(completion: @escaping (Error?) -> Void) { - Pixel.fire(pixel: .incrementalRolloutTest) { error in - completion(error) - } - } -} - -final class PhasedRolloutFeatureFlagTester { - - enum Constants { - static let hasSentPixelKey = "network-protection.incremental-feature-flag-test.has-sent-pixel" - } - - static let shared = PhasedRolloutFeatureFlagTester() - - private let privacyConfigurationManager: PrivacyConfigurationManaging - private let pixelSender: PhasedRolloutPixelSender - private let userDefaults: UserDefaults - - init(privacyConfigurationManager: PrivacyConfigurationManaging = ContentBlocking.shared.privacyConfigurationManager, - pixelSender: PhasedRolloutPixelSender = DefaultPhasedRolloutPixelSender(), - userDefaults: UserDefaults = .standard) { - self.privacyConfigurationManager = privacyConfigurationManager - self.pixelSender = pixelSender - self.userDefaults = userDefaults - } - - func sendFeatureFlagEnabledPixelIfNecessary(completion: (() -> Void)? = nil) { - guard !hasSentPixelBefore(), privacyConfigurationManager.privacyConfig.isSubfeatureEnabled(IncrementalRolloutTestSubfeature2.rollout) else { - completion?() - return - } - - markPixelAsSent() - - pixelSender.sendPixel { [weak self] error in - if error != nil { - self?.markPixelAsUnsent() - } - - completion?() - } - } - - private func hasSentPixelBefore() -> Bool { - return userDefaults.bool(forKey: Constants.hasSentPixelKey) - } - - private func markPixelAsSent() { - userDefaults.setValue(true, forKey: Constants.hasSentPixelKey) - } - - private func markPixelAsUnsent() { - userDefaults.removeObject(forKey: Constants.hasSentPixelKey) - } - -} diff --git a/DuckDuckGoTests/PhasedRolloutFeatureFlagTesterTests.swift b/DuckDuckGoTests/PhasedRolloutFeatureFlagTesterTests.swift deleted file mode 100644 index f087433c69..0000000000 --- a/DuckDuckGoTests/PhasedRolloutFeatureFlagTesterTests.swift +++ /dev/null @@ -1,153 +0,0 @@ -// -// PhasedRolloutFeatureFlagTesterTests.swift -// DuckDuckGo -// -// Copyright © 2023 DuckDuckGo. All rights reserved. -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. -// - -import XCTest -import BrowserServicesKit -@testable import DuckDuckGo - -private class MockPixelSender: PhasedRolloutPixelSender { - - enum MockPixelSenderError: Error { - case mockPixelSenderError - } - - let returnError: Bool - var receivedPixelCall: Bool = false - - init(returnError: Bool = false) { - self.returnError = returnError - } - - func sendPixel(completion: @escaping (Error?) -> Void) { - DispatchQueue.main.asyncAfter(deadline: .now() + 0.1) { - self.receivedPixelCall = true - - if self.returnError { - completion(MockPixelSenderError.mockPixelSenderError) - } else { - completion(nil) - } - } - } - -} - -final class PhasedRolloutFeatureFlagTesterTests: XCTestCase { - - private static let testSuiteName = "\(#file)" - - override func setUp() { - super.setUp() - - let defaults = UserDefaults(suiteName: Self.testSuiteName)! - defaults.removePersistentDomain(forName: Self.testSuiteName) - } - - override func tearDown() { - super.tearDown() - - let defaults = UserDefaults(suiteName: Self.testSuiteName)! - defaults.removePersistentDomain(forName: Self.testSuiteName) - } - - func testWhenAttemptingToSendPixel_AndRolloutSubfeatureIsDisabled_ThenPixelDoesNotSend() { - let mockManager = MockPrivacyConfigurationManager() - mockManager.privacyConfig = mockConfiguration(subfeatureEnabled: false) - let pixelSender = MockPixelSender(returnError: false) - let userDefaults = UserDefaults(suiteName: Self.testSuiteName)! - - let tester = PhasedRolloutFeatureFlagTester(privacyConfigurationManager: mockManager, - pixelSender: pixelSender, - userDefaults: userDefaults) - - let expectation = expectation(description: #function) - tester.sendFeatureFlagEnabledPixelIfNecessary { - expectation.fulfill() - } - wait(for: [expectation]) - - XCTAssertFalse(pixelSender.receivedPixelCall) - XCTAssertFalse(userDefaults.bool(forKey: PhasedRolloutFeatureFlagTester.Constants.hasSentPixelKey)) - } - - func testWhenAttemptingToSendPixel_AndRolloutSubfeatureIsEnabled_AndPixelHasNotBeenSentBefore_ThenPixelSends() { - let mockManager = MockPrivacyConfigurationManager() - mockManager.privacyConfig = mockConfiguration(subfeatureEnabled: true) - let pixelSender = MockPixelSender(returnError: false) - let userDefaults = UserDefaults(suiteName: Self.testSuiteName)! - - let tester = PhasedRolloutFeatureFlagTester(privacyConfigurationManager: mockManager, - pixelSender: pixelSender, - userDefaults: userDefaults) - - let expectation = expectation(description: #function) - tester.sendFeatureFlagEnabledPixelIfNecessary { - expectation.fulfill() - } - wait(for: [expectation]) - - XCTAssert(pixelSender.receivedPixelCall) - XCTAssert(userDefaults.bool(forKey: PhasedRolloutFeatureFlagTester.Constants.hasSentPixelKey)) - } - - func testWhenAttemptingToSendPixel_AndRolloutSubfeatureIsEnabled_AndPixelHasBeenSentBefore_ThenPixelDoesNotSend() { - let mockManager = MockPrivacyConfigurationManager() - mockManager.privacyConfig = mockConfiguration(subfeatureEnabled: true) - let pixelSender = MockPixelSender(returnError: false) - let userDefaults = UserDefaults(suiteName: Self.testSuiteName)! - - let tester = PhasedRolloutFeatureFlagTester(privacyConfigurationManager: mockManager, - pixelSender: pixelSender, - userDefaults: userDefaults) - - let firstExpectation = expectation(description: #function) - tester.sendFeatureFlagEnabledPixelIfNecessary { - firstExpectation.fulfill() - } - wait(for: [firstExpectation]) - - XCTAssert(pixelSender.receivedPixelCall) - XCTAssert(userDefaults.bool(forKey: PhasedRolloutFeatureFlagTester.Constants.hasSentPixelKey)) - - // Test the second call: - - pixelSender.receivedPixelCall = false - - let secondExpectation = expectation(description: #function) - tester.sendFeatureFlagEnabledPixelIfNecessary { - secondExpectation.fulfill() - } - wait(for: [secondExpectation]) - - XCTAssertFalse(pixelSender.receivedPixelCall) - XCTAssert(userDefaults.bool(forKey: PhasedRolloutFeatureFlagTester.Constants.hasSentPixelKey)) - } - - // MARK: - Mock Creation - - private func mockConfiguration(subfeatureEnabled: Bool) -> PrivacyConfiguration { - let mockPrivacyConfiguration = MockPrivacyConfiguration() - mockPrivacyConfiguration.isSubfeatureKeyEnabled = { _, _ in - return subfeatureEnabled - } - - return mockPrivacyConfiguration - } - -} From 325d8cc4ec32b4b1c88f33c77137ee603cea9cf8 Mon Sep 17 00:00:00 2001 From: amddg44 Date: Sun, 8 Oct 2023 14:40:51 +0200 Subject: [PATCH 04/28] Add parameter to multiple Autofill pixels (#2032) Task/Issue URL: https://app.asana.com/0/0/1205431733474502/f Tech Design URL: CC: Description: Adding a temporary "default state" parameter to some autofill pixels ahead of Autofill becoming "on by default" --- Core/FeatureFlag.swift | 3 + Core/Pixel.swift | 2 + DuckDuckGo/AppDelegate.swift | 6 ++ DuckDuckGo/AppSettings.swift | 2 + DuckDuckGo/AppUserDefaults.swift | 34 +++++++-- .../AutofillLoginPromptViewController.swift | 24 ++++--- ...ofillLoginSettingsListViewController.swift | 6 +- DuckDuckGo/AutofillSettingStatus.swift | 4 ++ ...sswordGenerationPromptViewController.swift | 12 ++-- DuckDuckGo/SaveLoginViewController.swift | 35 +++++---- DuckDuckGo/SettingsViewController.swift | 3 +- DuckDuckGo/TabViewController.swift | 3 +- ...bViewControllerBrowsingMenuExtension.swift | 3 +- DuckDuckGoTests/AppSettingsMock.swift | 4 ++ DuckDuckGoTests/AppUserDefaultsTests.swift | 72 ++++++++++++++++--- 15 files changed, 167 insertions(+), 46 deletions(-) diff --git a/Core/FeatureFlag.swift b/Core/FeatureFlag.swift index 69269aa99c..c31da129d1 100644 --- a/Core/FeatureFlag.swift +++ b/Core/FeatureFlag.swift @@ -28,6 +28,7 @@ public enum FeatureFlag: String { case autofillInlineIconCredentials case autofillAccessCredentialManagement case autofillPasswordGeneration + case autofillOnByDefault case incontextSignup case appTrackingProtection case networkProtection @@ -48,6 +49,8 @@ extension FeatureFlag: FeatureFlagSourceProviding { return .remoteReleasable(.subfeature(AutofillSubfeature.accessCredentialManagement)) case .autofillPasswordGeneration: return .remoteReleasable(.subfeature(AutofillSubfeature.autofillPasswordGeneration)) + case .autofillOnByDefault: + return .remoteReleasable(.subfeature(AutofillSubfeature.onByDefault)) case .incontextSignup: return .remoteReleasable(.feature(.incontextSignup)) } diff --git a/Core/Pixel.swift b/Core/Pixel.swift index 5c24bee78b..d358707618 100644 --- a/Core/Pixel.swift +++ b/Core/Pixel.swift @@ -126,6 +126,8 @@ public struct PixelParameters { public static let returnUserErrorCode = "error_code" public static let returnUserOldATB = "old_atb" public static let returnUserNewATB = "new_atb" + + public static let autofillDefaultState = "default_state" } public struct PixelValues { diff --git a/DuckDuckGo/AppDelegate.swift b/DuckDuckGo/AppDelegate.swift index c41c64d7ce..604b6db7f2 100644 --- a/DuckDuckGo/AppDelegate.swift +++ b/DuckDuckGo/AppDelegate.swift @@ -240,6 +240,12 @@ class AppDelegate: UIResponder, UIApplicationDelegate { ThemeManager.shared.updateUserInterfaceStyle(window: window) appIsLaunching = true + + // Temporary logic for rollout of Autofill as on by default for new installs only + if AppDependencyProvider.shared.appSettings.autofillIsNewInstallForOnByDefault == nil { + AppDependencyProvider.shared.appSettings.setAutofillIsNewInstallForOnByDefault() + } + return true } diff --git a/DuckDuckGo/AppSettings.swift b/DuckDuckGo/AppSettings.swift index 6e9a72c829..d79c06e746 100644 --- a/DuckDuckGo/AppSettings.swift +++ b/DuckDuckGo/AppSettings.swift @@ -37,6 +37,8 @@ protocol AppSettings: AnyObject { var autofillCredentialsEnabled: Bool { get set } var autofillCredentialsSavePromptShowAtLeastOnce: Bool { get set } var autofillCredentialsHasBeenEnabledAutomaticallyIfNecessary: Bool { get set } + var autofillIsNewInstallForOnByDefault: Bool? { get set } + func setAutofillIsNewInstallForOnByDefault() var voiceSearchEnabled: Bool { get set } diff --git a/DuckDuckGo/AppUserDefaults.swift b/DuckDuckGo/AppUserDefaults.swift index cdc13cbb36..0a7d98d880 100644 --- a/DuckDuckGo/AppUserDefaults.swift +++ b/DuckDuckGo/AppUserDefaults.swift @@ -60,6 +60,7 @@ public class AppUserDefaults: AppSettings { static let currentFireButtonAnimationKey = "com.duckduckgo.app.currentFireButtonAnimationKey" static let autofillCredentialsEnabled = "com.duckduckgo.ios.autofillCredentialsEnabled" + static let autofillIsNewInstallForOnByDefault = "com.duckduckgo.ios.autofillIsNewInstallForOnByDefault" } private struct DebugKeys { @@ -70,6 +71,8 @@ public class AppUserDefaults: AppSettings { return UserDefaults(suiteName: groupName) } + lazy var featureFlagger = AppDependencyProvider.shared.featureFlagger + init(groupName: String = "group.com.duckduckgo.app") { self.groupName = groupName } @@ -182,16 +185,22 @@ public class AppUserDefaults: AppSettings { return } if !autofillCredentialsSavePromptShowAtLeastOnce { - autofillCredentialsHasBeenEnabledAutomaticallyIfNecessary = true - autofillCredentialsEnabled = true + if let isNewInstall = autofillIsNewInstallForOnByDefault, + isNewInstall, + featureFlagger.isFeatureOn(.autofillOnByDefault) { + autofillCredentialsHasBeenEnabledAutomaticallyIfNecessary = true + autofillCredentialsEnabled = true + } } } var autofillCredentialsEnabled: Bool { get { - // In future, we'll use setAutofillCredentialsEnabledAutomaticallyIfNecessary() here to automatically turn on autofill for people - // That haven't seen the save prompt before. - // For now, whilst internal testing is still happening, it's still set to default to be enabled + // setAutofillCredentialsEnabledAutomaticallyIfNecessary() used here to automatically turn on autofill for people if: + // 1. They haven't seen the save prompt before + // 2. They are a new install + // 3. The feature flag is enabled + setAutofillCredentialsEnabledAutomaticallyIfNecessary() return userDefaults?.object(forKey: Keys.autofillCredentialsEnabled) as? Bool ?? false } @@ -205,7 +214,20 @@ public class AppUserDefaults: AppSettings { @UserDefaultsWrapper(key: .autofillCredentialsHasBeenEnabledAutomaticallyIfNecessary, defaultValue: false) var autofillCredentialsHasBeenEnabledAutomaticallyIfNecessary: Bool - + + var autofillIsNewInstallForOnByDefault: Bool? { + get { + return userDefaults?.object(forKey: Keys.autofillIsNewInstallForOnByDefault) as? Bool + } + set { + userDefaults?.set(newValue, forKey: Keys.autofillIsNewInstallForOnByDefault) + } + } + + func setAutofillIsNewInstallForOnByDefault() { + autofillIsNewInstallForOnByDefault = StatisticsUserDefaults().installDate == nil + } + @UserDefaultsWrapper(key: .voiceSearchEnabled, defaultValue: false) var voiceSearchEnabled: Bool diff --git a/DuckDuckGo/AutofillLoginPromptViewController.swift b/DuckDuckGo/AutofillLoginPromptViewController.swift index 1133e169d2..5b00fedf7c 100644 --- a/DuckDuckGo/AutofillLoginPromptViewController.swift +++ b/DuckDuckGo/AutofillLoginPromptViewController.swift @@ -69,9 +69,11 @@ class AutofillLoginPromptViewController: UIViewController { override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) if trigger == AutofillUserScript.GetTriggerType.autoprompt { - Pixel.fire(pixel: .autofillLoginsFillLoginInlineAutopromptDisplayed) + Pixel.fire(pixel: .autofillLoginsFillLoginInlineAutopromptDisplayed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) } else { - Pixel.fire(pixel: .autofillLoginsFillLoginInlineManualDisplayed) + Pixel.fire(pixel: .autofillLoginsFillLoginInlineManualDisplayed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) } } @@ -95,9 +97,11 @@ class AutofillLoginPromptViewController: UIViewController { extension AutofillLoginPromptViewController: UISheetPresentationControllerDelegate { func presentationControllerDidDismiss(_ presentationController: UIPresentationController) { if self.trigger == AutofillUserScript.GetTriggerType.autoprompt { - Pixel.fire(pixel: .autofillLoginsAutopromptDismissed) + Pixel.fire(pixel: .autofillLoginsAutopromptDismissed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) } else { - Pixel.fire(pixel: .autofillLoginsFillLoginInlineManualDismissed) + Pixel.fire(pixel: .autofillLoginsFillLoginInlineManualDismissed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) } completion?(nil, false) } @@ -107,9 +111,11 @@ extension AutofillLoginPromptViewController: AutofillLoginPromptViewModelDelegat func autofillLoginPromptViewModel(_ viewModel: AutofillLoginPromptViewModel, didSelectAccount account: SecureVaultModels.WebsiteAccount) { if trigger == AutofillUserScript.GetTriggerType.autoprompt { - Pixel.fire(pixel: .autofillLoginsFillLoginInlineAutopromptConfirmed) + Pixel.fire(pixel: .autofillLoginsFillLoginInlineAutopromptConfirmed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) } else { - Pixel.fire(pixel: .autofillLoginsFillLoginInlineManualConfirmed) + Pixel.fire(pixel: .autofillLoginsFillLoginInlineManualConfirmed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) } if AppDependencyProvider.shared.autofillLoginSession.isValidSession { @@ -163,9 +169,11 @@ extension AutofillLoginPromptViewController: AutofillLoginPromptViewModelDelegat func autofillLoginPromptViewModelDidCancel(_ viewModel: AutofillLoginPromptViewModel) { dismiss(animated: true) { if self.trigger == AutofillUserScript.GetTriggerType.autoprompt { - Pixel.fire(pixel: .autofillLoginsAutopromptDismissed) + Pixel.fire(pixel: .autofillLoginsAutopromptDismissed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) } else { - Pixel.fire(pixel: .autofillLoginsFillLoginInlineManualDismissed) + Pixel.fire(pixel: .autofillLoginsFillLoginInlineManualDismissed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) } self.completion?(nil, false) diff --git a/DuckDuckGo/AutofillLoginSettingsListViewController.swift b/DuckDuckGo/AutofillLoginSettingsListViewController.swift index 4775f934cb..2055e7b03f 100644 --- a/DuckDuckGo/AutofillLoginSettingsListViewController.swift +++ b/DuckDuckGo/AutofillLoginSettingsListViewController.swift @@ -658,9 +658,11 @@ extension AutofillLoginSettingsListViewController: AutofillLoginDetailsViewContr extension AutofillLoginSettingsListViewController: EnableAutofillSettingsTableViewCellDelegate { func enableAutofillSettingsTableViewCell(_ cell: EnableAutofillSettingsTableViewCell, didChangeSettings value: Bool) { if value { - Pixel.fire(pixel: .autofillLoginsSettingsEnabled) + Pixel.fire(pixel: .autofillLoginsSettingsEnabled, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) } else { - Pixel.fire(pixel: .autofillLoginsSettingsDisabled) + Pixel.fire(pixel: .autofillLoginsSettingsDisabled, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) } viewModel.isAutofillEnabledInSettings = value diff --git a/DuckDuckGo/AutofillSettingStatus.swift b/DuckDuckGo/AutofillSettingStatus.swift index 4e7ed3f789..ccbabfd07c 100644 --- a/DuckDuckGo/AutofillSettingStatus.swift +++ b/DuckDuckGo/AutofillSettingStatus.swift @@ -30,4 +30,8 @@ struct AutofillSettingStatus { let canAuthenticate = context.canEvaluatePolicy(.deviceOwnerAuthentication, error: &error) return appSettings.autofillCredentialsEnabled && canAuthenticate } + + static var defaultState: String { + return appSettings.autofillCredentialsHasBeenEnabledAutomaticallyIfNecessary ? "on" : "off" + } } diff --git a/DuckDuckGo/PasswordGenerationPromptViewController.swift b/DuckDuckGo/PasswordGenerationPromptViewController.swift index 4ac1c56edb..e0e015466b 100644 --- a/DuckDuckGo/PasswordGenerationPromptViewController.swift +++ b/DuckDuckGo/PasswordGenerationPromptViewController.swift @@ -49,7 +49,8 @@ class PasswordGenerationPromptViewController: UIViewController { setupPasswordGenerationPromptView() - Pixel.fire(pixel: .autofillLoginsPasswordGenerationPromptDisplayed) + Pixel.fire(pixel: .autofillLoginsPasswordGenerationPromptDisplayed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) } private func setupPasswordGenerationPromptView() { @@ -67,7 +68,8 @@ class PasswordGenerationPromptViewController: UIViewController { extension PasswordGenerationPromptViewController: UISheetPresentationControllerDelegate { func presentationControllerDidDismiss(_ presentationController: UIPresentationController) { - Pixel.fire(pixel: .autofillLoginsPasswordGenerationPromptDismissed) + Pixel.fire(pixel: .autofillLoginsPasswordGenerationPromptDismissed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) self.completion?(false) } @@ -75,7 +77,8 @@ extension PasswordGenerationPromptViewController: UISheetPresentationControllerD extension PasswordGenerationPromptViewController: PasswordGenerationPromptViewModelDelegate { func passwordGenerationPromptViewModelDidSelect(_ viewModel: PasswordGenerationPromptViewModel) { - Pixel.fire(pixel: .autofillLoginsPasswordGenerationPromptConfirmed) + Pixel.fire(pixel: .autofillLoginsPasswordGenerationPromptConfirmed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) dismiss(animated: true) { self.completion?(true) @@ -83,7 +86,8 @@ extension PasswordGenerationPromptViewController: PasswordGenerationPromptViewMo } func passwordGenerationPromptViewModelDidCancel(_ viewModel: PasswordGenerationPromptViewModel) { - Pixel.fire(pixel: .autofillLoginsPasswordGenerationPromptDismissed) + Pixel.fire(pixel: .autofillLoginsPasswordGenerationPromptDismissed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) dismiss(animated: true) { self.completion?(false) diff --git a/DuckDuckGo/SaveLoginViewController.swift b/DuckDuckGo/SaveLoginViewController.swift index fbd144e98b..82d0afec9e 100644 --- a/DuckDuckGo/SaveLoginViewController.swift +++ b/DuckDuckGo/SaveLoginViewController.swift @@ -70,12 +70,12 @@ class SaveLoginViewController: UIViewController { return } switch viewModel.layoutType { - case .newUser: - Pixel.fire(pixel: .autofillLoginsSaveLoginModalDismissed) - case .saveLogin: - Pixel.fire(pixel: .autofillLoginsSaveLoginModalDismissed) + case .newUser, .saveLogin: + Pixel.fire(pixel: .autofillLoginsSaveLoginModalDismissed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) case .savePassword: - Pixel.fire(pixel: .autofillLoginsSavePasswordModalDismissed) + Pixel.fire(pixel: .autofillLoginsSavePasswordModalDismissed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) case .updateUsername: Pixel.fire(pixel: .autofillLoginsUpdateUsernameModalDismissed) case .updatePassword: @@ -96,12 +96,12 @@ class SaveLoginViewController: UIViewController { installChildViewController(controller) switch saveViewModel.layoutType { - case .newUser: - Pixel.fire(pixel: .autofillLoginsSaveLoginModalDisplayed) - case .saveLogin: - Pixel.fire(pixel: .autofillLoginsSaveLoginModalDisplayed) + case .newUser, .saveLogin: + Pixel.fire(pixel: .autofillLoginsSaveLoginModalDisplayed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) case .savePassword: - Pixel.fire(pixel: .autofillLoginsSavePasswordModalDisplayed) + Pixel.fire(pixel: .autofillLoginsSavePasswordModalDisplayed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) case .updateUsername: Pixel.fire(pixel: .autofillLoginsUpdateUsernameModalDisplayed) case .updatePassword: @@ -115,9 +115,11 @@ extension SaveLoginViewController: SaveLoginViewModelDelegate { switch viewModel.layoutType { case .saveLogin, .savePassword, .newUser: if viewModel.layoutType == .savePassword { - Pixel.fire(pixel: .autofillLoginsSavePasswordModalConfirmed) + Pixel.fire(pixel: .autofillLoginsSavePasswordModalConfirmed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) } else { - Pixel.fire(pixel: .autofillLoginsSaveLoginModalConfirmed) + Pixel.fire(pixel: .autofillLoginsSaveLoginModalConfirmed, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) } delegate?.saveLoginViewController(self, didSaveCredentials: credentialManager.credentials) case .updatePassword, .updateUsername: @@ -144,7 +146,8 @@ extension SaveLoginViewController: SaveLoginViewModelDelegate { alertController.overrideUserInterfaceStyle() let disableAction = UIAlertAction(title: UserText.autofillKeepEnabledAlertDisableAction, style: .cancel) { _ in - Pixel.fire(pixel: .autofillLoginsFillLoginInlineDisablePromptAutofillDisabled) + Pixel.fire(pixel: .autofillLoginsFillLoginInlineDisablePromptAutofillDisabled, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) if isSelfPresentingAlert { self.delegate?.saveLoginViewControllerDidCancel(self) } @@ -152,7 +155,8 @@ extension SaveLoginViewController: SaveLoginViewModelDelegate { } let keepUsingAction = UIAlertAction(title: UserText.autofillKeepEnabledAlertKeepUsingAction, style: .default) { _ in - Pixel.fire(pixel: .autofillLoginsFillLoginInlineDisablePromptAutofillKept) + Pixel.fire(pixel: .autofillLoginsFillLoginInlineDisablePromptAutofillKept, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) if isSelfPresentingAlert { self.delegate?.saveLoginViewControllerDidCancel(self) } @@ -166,7 +170,8 @@ extension SaveLoginViewController: SaveLoginViewModelDelegate { if isAlreadyDismissed { delegate?.saveLoginViewController(self, didRequestPresentConfirmKeepUsingAlertController: alertController) } else { - Pixel.fire(pixel: .autofillLoginsFillLoginInlineDisablePromptShown) + Pixel.fire(pixel: .autofillLoginsFillLoginInlineDisablePromptShown, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) present(alertController, animated: true) } } diff --git a/DuckDuckGo/SettingsViewController.swift b/DuckDuckGo/SettingsViewController.swift index 45b66e7870..2cc139c0a9 100644 --- a/DuckDuckGo/SettingsViewController.swift +++ b/DuckDuckGo/SettingsViewController.swift @@ -365,7 +365,8 @@ class SettingsViewController: UITableViewController { syncDataProviders: syncDataProviders ) autofillController.delegate = self - Pixel.fire(pixel: .autofillSettingsOpened) + Pixel.fire(pixel: .autofillSettingsOpened, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) navigationController?.pushViewController(autofillController, animated: animated) } diff --git a/DuckDuckGo/TabViewController.swift b/DuckDuckGo/TabViewController.swift index b3535ccca6..d6b4c667bd 100644 --- a/DuckDuckGo/TabViewController.swift +++ b/DuckDuckGo/TabViewController.swift @@ -2496,7 +2496,8 @@ extension TabViewController: SaveLoginViewControllerDelegate { func saveLoginViewController(_ viewController: SaveLoginViewController, didRequestPresentConfirmKeepUsingAlertController alertController: UIAlertController) { - Pixel.fire(pixel: .autofillLoginsFillLoginInlineDisablePromptShown) + Pixel.fire(pixel: .autofillLoginsFillLoginInlineDisablePromptShown, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) present(alertController, animated: true) } } diff --git a/DuckDuckGo/TabViewControllerBrowsingMenuExtension.swift b/DuckDuckGo/TabViewControllerBrowsingMenuExtension.swift index a9afab2d89..3018d66275 100644 --- a/DuckDuckGo/TabViewControllerBrowsingMenuExtension.swift +++ b/DuckDuckGo/TabViewControllerBrowsingMenuExtension.swift @@ -359,7 +359,8 @@ extension TabViewController { } private func onOpenAutofillLoginsAction() { - Pixel.fire(pixel: .browsingMenuAutofill) + Pixel.fire(pixel: .browsingMenuAutofill, + withAdditionalParameters: [PixelParameters.autofillDefaultState: AutofillSettingStatus.defaultState]) delegate?.tabDidRequestAutofillLogins(tab: self) } diff --git a/DuckDuckGoTests/AppSettingsMock.swift b/DuckDuckGoTests/AppSettingsMock.swift index 53f099d6b8..a31dd2a1e1 100644 --- a/DuckDuckGoTests/AppSettingsMock.swift +++ b/DuckDuckGoTests/AppSettingsMock.swift @@ -27,6 +27,10 @@ class AppSettingsMock: AppSettings { var autofillCredentialsHasBeenEnabledAutomaticallyIfNecessary: Bool = false + var autofillIsNewInstallForOnByDefault: Bool? + + func setAutofillIsNewInstallForOnByDefault() { } + var autocomplete: Bool = true var currentThemeName: DuckDuckGo.ThemeName = .systemDefault diff --git a/DuckDuckGoTests/AppUserDefaultsTests.swift b/DuckDuckGoTests/AppUserDefaultsTests.swift index d1eb24c056..89d6e4703f 100644 --- a/DuckDuckGoTests/AppUserDefaultsTests.swift +++ b/DuckDuckGoTests/AppUserDefaultsTests.swift @@ -19,14 +19,22 @@ import XCTest @testable import DuckDuckGo +import BrowserServicesKit class AppUserDefaultsTests: XCTestCase { let testGroupName = "test" + var internalUserDeciderStore: MockInternalUserStoring! override func setUp() { super.setUp() UserDefaults(suiteName: testGroupName)?.removePersistentDomain(forName: testGroupName) + internalUserDeciderStore = MockInternalUserStoring() + } + + override func tearDown() { + internalUserDeciderStore = nil + super.tearDown() } func testWhenLinkPreviewsIsSetThenItIsPersisted() { @@ -93,17 +101,46 @@ class AppUserDefaultsTests: XCTestCase { let appUserDefaults = AppUserDefaults(groupName: testGroupName) XCTAssertFalse(appUserDefaults.autofillCredentialsEnabled) } - - /* - These tests aren't required until we make autofill default to off, and then enable turning it on automatically - func testWhenAutofillCredentialsIsDisabledAndHasNotBeenTurnedOnAutomaticallyBeforeThenAutofillCredentialsEnabled() { + + func testWhenAutofillCredentialsIsDisabledAndHasNotBeenTurnedOnAutomaticallyBeforeWhenSavePromptShownThenDefaultAutofillStateIsFalse() { let appUserDefaults = AppUserDefaults(groupName: testGroupName) - appUserDefaults.autofillCredentialsEnabled = false + appUserDefaults.autofillCredentialsHasBeenEnabledAutomaticallyIfNecessary = false + appUserDefaults.autofillCredentialsSavePromptShowAtLeastOnce = true + + XCTAssertFalse(appUserDefaults.autofillCredentialsEnabled) + } + + func testWhenAutofillCredentialsIsDisabledAndHasNotBeenTurnedOnAutomaticallyBeforeAndPromptHasNotBeenSeenAndIsNotNewInstallThenDefaultAutofillStateIsFalse() { + let appUserDefaults = AppUserDefaults(groupName: testGroupName) + appUserDefaults.autofillCredentialsHasBeenEnabledAutomaticallyIfNecessary = false appUserDefaults.autofillCredentialsSavePromptShowAtLeastOnce = false + appUserDefaults.autofillIsNewInstallForOnByDefault = false + + XCTAssertFalse(appUserDefaults.autofillCredentialsEnabled) + } + + func testWhenAutofillCredentialsIsDisabledAndHasNotBeenTurnedOnAutomaticallyBeforeAndPromptHasNotBeenSeenAndIsNewInstallAndFeatureFlagDisabledThenDefaultAutofillStateIsFalse() { + let appUserDefaults = AppUserDefaults(groupName: testGroupName) appUserDefaults.autofillCredentialsHasBeenEnabledAutomaticallyIfNecessary = false - XCTAssertEqual(appUserDefaults.autofillCredentialsEnabled, true) + appUserDefaults.autofillCredentialsSavePromptShowAtLeastOnce = false + appUserDefaults.autofillIsNewInstallForOnByDefault = true + let featureFlagger = createFeatureFlagger(withSubfeatureEnabled: false) + appUserDefaults.featureFlagger = featureFlagger + + XCTAssertFalse(appUserDefaults.autofillCredentialsEnabled) } - + + func testWhenAutofillCredentialsIsDisabledAndHasNotBeenTurnedOnAutomaticallyBeforeAndPromptHasNotBeenSeenAndIsNewInstallAndFeatureFlagEnabledThenDefaultAutofillStateIsTrue() { + let appUserDefaults = AppUserDefaults(groupName: testGroupName) + appUserDefaults.autofillCredentialsHasBeenEnabledAutomaticallyIfNecessary = false + appUserDefaults.autofillCredentialsSavePromptShowAtLeastOnce = false + appUserDefaults.autofillIsNewInstallForOnByDefault = true + let featureFlagger = createFeatureFlagger(withSubfeatureEnabled: true) + appUserDefaults.featureFlagger = featureFlagger + + XCTAssertTrue(appUserDefaults.autofillCredentialsEnabled) + } + func testWhenAutofillCredentialsIsDisabledAndHasNotBeenTurnedOnAutomaticallyBeforeAndPromptHasBeenSeenThenAutofillCredentialsStaysDisabled() { let appUserDefaults = AppUserDefaults(groupName: testGroupName) appUserDefaults.autofillCredentialsEnabled = false @@ -119,6 +156,25 @@ class AppUserDefaultsTests: XCTestCase { appUserDefaults.autofillCredentialsHasBeenEnabledAutomaticallyIfNecessary = true XCTAssertEqual(appUserDefaults.autofillCredentialsEnabled, false) } - */ + + + // MARK: - Mock Creation + + private func createFeatureFlagger(withSubfeatureEnabled enabled: Bool) -> DefaultFeatureFlagger { + let mockManager = MockPrivacyConfigurationManager() + mockManager.privacyConfig = mockConfiguration(subfeatureEnabled: enabled) + + let internalUserDecider = DefaultInternalUserDecider(store: internalUserDeciderStore) + return DefaultFeatureFlagger(internalUserDecider: internalUserDecider, privacyConfig: mockManager.privacyConfig) + } + + private func mockConfiguration(subfeatureEnabled: Bool) -> PrivacyConfiguration { + let mockPrivacyConfiguration = MockPrivacyConfiguration() + mockPrivacyConfiguration.isSubfeatureKeyEnabled = { _, _ in + return subfeatureEnabled + } + + return mockPrivacyConfiguration + } } From 24bab7e3452354d41499808d5493c06fdc2c32c0 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Mon, 9 Oct 2023 13:06:56 +0200 Subject: [PATCH 05/28] Add missed strings for NetP notifications (#2080) --- PacketTunnelProvider/en.lproj/Localizable.strings | 3 +++ 1 file changed, 3 insertions(+) diff --git a/PacketTunnelProvider/en.lproj/Localizable.strings b/PacketTunnelProvider/en.lproj/Localizable.strings index 987ec1cb88..378141dfd9 100644 --- a/PacketTunnelProvider/en.lproj/Localizable.strings +++ b/PacketTunnelProvider/en.lproj/Localizable.strings @@ -10,3 +10,6 @@ /* The body of the notification shown when Network Protection reconnects successfully */ "network.protection.success.notification.body" = "Network Protection is On. Your location and online activity are protected."; +/* The body of the notification shown when Network Protection connects successfully with the city + state/country as formatted parameter */ +"network.protection.success.notification.subtitle.including.serverLocation" = "Routing device traffic through \(serverLocation)."; + From 56ef3bc4b7672d2d86440ca693e6a74a7b3fc543 Mon Sep 17 00:00:00 2001 From: Christopher Brind Date: Tue, 10 Oct 2023 11:24:25 +0100 Subject: [PATCH 06/28] fix ui corruption after adding pass to wallet (#2081) --- DuckDuckGo/MainView.swift | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/DuckDuckGo/MainView.swift b/DuckDuckGo/MainView.swift index c22ef7a3f8..8881e3c21d 100644 --- a/DuckDuckGo/MainView.swift +++ b/DuckDuckGo/MainView.swift @@ -35,14 +35,13 @@ class MainViewFactory { let factory = MainViewFactory(superview) factory.createViews() - factory.disableAutoresizingOnViewAndImmediateSubviews(superview) + factory.disableAutoresizingOnImmediateSubviews(superview) factory.constrainViews() return factory.coordinator } - private func disableAutoresizingOnViewAndImmediateSubviews(_ view: UIView) { - view.translatesAutoresizingMaskIntoConstraints = false + private func disableAutoresizingOnImmediateSubviews(_ view: UIView) { view.subviews.forEach { $0.translatesAutoresizingMaskIntoConstraints = false } @@ -142,7 +141,7 @@ extension MainViewFactory { coordinator.logoContainer.addSubview(coordinator.logoText) superview.addSubview(coordinator.logoContainer) - disableAutoresizingOnViewAndImmediateSubviews(coordinator.logoContainer) + disableAutoresizingOnImmediateSubviews(coordinator.logoContainer) } } From 116234d25f757297bc248d44ded654d4b0f52ced Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Tue, 10 Oct 2023 13:31:51 +0200 Subject: [PATCH 07/28] Release 7.93.0 (#2082) --- Configuration/Version.xcconfig | 2 +- DuckDuckGo.xcodeproj/project.pbxproj | 42 +++++++++++++-------------- DuckDuckGo/Settings.bundle/Root.plist | 2 +- 3 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Configuration/Version.xcconfig b/Configuration/Version.xcconfig index 86866ee7eb..9d4c2eb5c8 100644 --- a/Configuration/Version.xcconfig +++ b/Configuration/Version.xcconfig @@ -1 +1 @@ -MARKETING_VERSION = 7.92.0 +MARKETING_VERSION = 7.93.0 diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index bc8e986dc4..5ccb32bbef 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -7621,7 +7621,7 @@ CODE_SIGN_ENTITLEMENTS = PacketTunnelProvider/PacketTunnelProvider.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEVELOPMENT_TEAM = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; @@ -7658,7 +7658,7 @@ CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -7750,7 +7750,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -7777,7 +7777,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -7923,7 +7923,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -7947,7 +7947,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; INFOPLIST_FILE = DuckDuckGo/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -8011,7 +8011,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEAD_CODE_STRIPPING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Widgets/Info.plist; @@ -8046,7 +8046,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8080,7 +8080,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = OpenAction/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -8110,7 +8110,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8396,7 +8396,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGoAlpha.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8422,7 +8422,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8454,7 +8454,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8491,7 +8491,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8527,7 +8527,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8562,11 +8562,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; + DYLIB_CURRENT_VERSION = 0; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8740,11 +8740,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; + DYLIB_CURRENT_VERSION = 0; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8773,10 +8773,10 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 1; + CURRENT_PROJECT_VERSION = 0; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; + DYLIB_CURRENT_VERSION = 0; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; diff --git a/DuckDuckGo/Settings.bundle/Root.plist b/DuckDuckGo/Settings.bundle/Root.plist index 2e4f5bb46b..c2d3e4a804 100644 --- a/DuckDuckGo/Settings.bundle/Root.plist +++ b/DuckDuckGo/Settings.bundle/Root.plist @@ -6,7 +6,7 @@ DefaultValue - 7.92.0 + 7.93.0 Key version Title From 75022c9437bb24f4c22f673b4c1453563e4c442d Mon Sep 17 00:00:00 2001 From: Lorenzo Mattei Date: Tue, 10 Oct 2023 22:28:35 +0200 Subject: [PATCH 08/28] Update Maestro e2e tests (#1991) Co-authored-by: Lorenzo Mattei --- .github/workflows/end-to-end.yml | 34 +++++++------------ ..._no_ad_domain_param_u3_param_included.yaml | 13 ++++--- ...no_ad_domain_param_dsl_param_included.yaml | 13 ++++--- ..._ad_domain_param_but_missing_u3_param.yaml | 13 ++++--- ...ad_domain_param_but_missing_dsl_param.yaml | 18 ++++------ ...main_provided_but_empty_u3_not_needed.yaml | 18 ++++------ ...ain_provided_but_empty_dsl_not_needed.yaml | 17 ++++------ ...ided_ad_domain_provided_u3_not_needed.yaml | 17 ++++------ ...ded_ad_domain_provided_dsl_not_needed.yaml | 21 ++++-------- ..._provided_but_incorrect_u3_not_needed.yaml | 21 ++++-------- ...provided_but_incorrect_dsl_not_needed.yaml | 26 ++++---------- ...ed_but_its_not_a_domain_u3_not_needed.yaml | 26 ++++---------- ...d_but_its_not_a_domain_dsl_not_needed.yaml | 26 ++++---------- ...subdomain_of_advertiser_u3_not_needed.yaml | 30 ++++------------ ...ubdomain_of_advertiser_dsl_not_needed.yaml | 30 ++++------------ .maestro/config.yaml | 2 ++ .../01_single-site_single-tab_session.yaml | 14 ++++---- .../02_single-site_new_tab_session.yaml | 12 +++---- ...ngle-site_new-tab_session_variant_two.yaml | 12 +++---- .../04_single-site_multi-tab_session.yaml | 12 +++---- .../05_multi-site_single-tab_session.yaml | 12 +++---- .maestro/privacy_tests/06_multi-tab.yaml | 12 +++---- .../07_browser_restart_mid-session.yaml | 11 +++--- .../08_navigation_with_back_forward.yaml | 12 +++---- .../09_navigation_with_refresh.yaml | 12 +++---- .maestro/release_tests/bookmarks.yaml | 9 +++-- .maestro/release_tests/browsing.yaml | 7 ++-- .maestro/release_tests/favorites.yaml | 9 +++-- .maestro/release_tests/tabs.yaml | 9 +++-- fastlane/Fastfile | 12 ------- 30 files changed, 182 insertions(+), 298 deletions(-) diff --git a/.github/workflows/end-to-end.yml b/.github/workflows/end-to-end.yml index ebf4aaad18..de34f5fd98 100644 --- a/.github/workflows/end-to-end.yml +++ b/.github/workflows/end-to-end.yml @@ -44,46 +44,38 @@ jobs: -derivedDataPath "DerivedData" \ | tee xcodebuild.log - - name: Setup tests - run: bundle install && bundle exec fastlane setup_e2e_tests - - name: Release tests - uses: mobile-dev-inc/action-maestro-cloud@v1.2.3 + uses: mobile-dev-inc/action-maestro-cloud@v1.4.1 with: api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} app-file: DerivedData/Build/Products/Debug-iphonesimulator/DuckDuckGo.app - workspace: .maestro/release_tests + workspace: .maestro + include-tags: release - name: Privacy tests - uses: mobile-dev-inc/action-maestro-cloud@v1.2.3 + uses: mobile-dev-inc/action-maestro-cloud@v1.4.1 with: api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} app-file: DerivedData/Build/Products/Debug-iphonesimulator/DuckDuckGo.app - workspace: .maestro/privacy_tests + workspace: .maestro + include-tags: privacy - name: Ad Click Detection Flow tests - uses: mobile-dev-inc/action-maestro-cloud@v1.2.3 + uses: mobile-dev-inc/action-maestro-cloud@v1.4.1 with: api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} app-file: DerivedData/Build/Products/Debug-iphonesimulator/DuckDuckGo.app - workspace: .maestro/privacy_tests + workspace: .maestro + include-tags: adClick - name: Create Asana task when workflow failed if: ${{ failure() }} run: | curl -s "https://app.asana.com/api/1.0/tasks" \ - -H "Authorization: Bearer ${{ secrets.ASANA_ACCESS_TOKEN }}" \ - --data ' \ - { \ - data: " \ - "name": "GH Workflow Failure - End to end tests", \ - "workspace": ${{ vars.GH_ASANA_WORKSPACE_ID }}, \ - "projects": [ \ - ${{ vars.GH_ASANA_IOS_APP_PROJECT_ID }} \ - ], \ - "notes" : "The end to end workflow has failed. See https://github.com/duckduckgo/iOS/actions/runs/${{ github.run_id }}", \ - " \ - }' + --header "Accept: application/json" \ + --header "Authorization: Bearer ${{ secrets.ASANA_ACCESS_TOKEN }}" \ + --header "Content-Type: application/json" \ + --data ' { "data": { "name": "GH Workflow Failure - End to end tests", "workspace": "${{ vars.GH_ASANA_WORKSPACE_ID }}", "projects": [ "${{ vars.GH_ASANA_IOS_APP_PROJECT_ID }}" ], "notes" : "The end to end workflow has failed. See https://github.com/duckduckgo/iOS/actions/runs/${{ github.run_id }}" } }' - name: Upload logs when workflow failed uses: actions/upload-artifact@v3 diff --git a/.maestro/ad_click_detection_flow_tests/01_yjs_heuristic_no_ad_domain_param_u3_param_included.yaml b/.maestro/ad_click_detection_flow_tests/01_yjs_heuristic_no_ad_domain_param_u3_param_included.yaml index 70c1ded221..9765f58cab 100644 --- a/.maestro/ad_click_detection_flow_tests/01_yjs_heuristic_no_ad_domain_param_u3_param_included.yaml +++ b/.maestro/ad_click_detection_flow_tests/01_yjs_heuristic_no_ad_domain_param_u3_param_included.yaml @@ -1,6 +1,7 @@ -# yjs_heuristic_no_ad_domain_param_u3_param_included.yaml - appId: com.duckduckgo.mobile.ios +tags: + - adClick + --- # Set up @@ -11,14 +12,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-1" - pressKey: Enter # Manage onboarding @@ -27,9 +28,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" + file: ../shared/onboarding_browsing.yaml # Test Ad1 - assertVisible: diff --git a/.maestro/ad_click_detection_flow_tests/02_mjs_heuristic_no_ad_domain_param_dsl_param_included.yaml b/.maestro/ad_click_detection_flow_tests/02_mjs_heuristic_no_ad_domain_param_dsl_param_included.yaml index 0d701735f2..25b2f615f9 100644 --- a/.maestro/ad_click_detection_flow_tests/02_mjs_heuristic_no_ad_domain_param_dsl_param_included.yaml +++ b/.maestro/ad_click_detection_flow_tests/02_mjs_heuristic_no_ad_domain_param_dsl_param_included.yaml @@ -1,6 +1,7 @@ -# mjs_heuristic_no_ad_domain_param_dsl_param_included.yaml - appId: com.duckduckgo.mobile.ios +tags: + - adClick + --- # Set up @@ -11,14 +12,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-2" - pressKey: Enter # Manage onboarding @@ -27,9 +28,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" + file: ../shared/onboarding_browsing.yaml # Test Ad2 - assertVisible: diff --git a/.maestro/ad_click_detection_flow_tests/03_yjs_heuristic_no_ad_domain_param_but_missing_u3_param.yaml b/.maestro/ad_click_detection_flow_tests/03_yjs_heuristic_no_ad_domain_param_but_missing_u3_param.yaml index 5b329e95c2..7f624b5bba 100644 --- a/.maestro/ad_click_detection_flow_tests/03_yjs_heuristic_no_ad_domain_param_but_missing_u3_param.yaml +++ b/.maestro/ad_click_detection_flow_tests/03_yjs_heuristic_no_ad_domain_param_but_missing_u3_param.yaml @@ -1,6 +1,7 @@ -# yjs_heuristic_no_ad_domain_param_but_missing_u3_param.yaml - appId: com.duckduckgo.mobile.ios +tags: + - adClick + --- # Set up @@ -11,14 +12,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-3" - pressKey: Enter # Manage onboarding @@ -27,9 +28,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" + file: ../shared/onboarding_browsing.yaml # Test Ad3 - assertVisible: diff --git a/.maestro/ad_click_detection_flow_tests/04_mjs_heuristic_no_ad_domain_param_but_missing_dsl_param.yaml b/.maestro/ad_click_detection_flow_tests/04_mjs_heuristic_no_ad_domain_param_but_missing_dsl_param.yaml index 1ef6042990..0c708a1a9c 100644 --- a/.maestro/ad_click_detection_flow_tests/04_mjs_heuristic_no_ad_domain_param_but_missing_dsl_param.yaml +++ b/.maestro/ad_click_detection_flow_tests/04_mjs_heuristic_no_ad_domain_param_but_missing_dsl_param.yaml @@ -1,6 +1,7 @@ -# _mjs_heuristic_no_ad_domain_param_but_missing_dsl_param.yaml - appId: com.duckduckgo.mobile.ios +tags: + - adClick + --- # Set up @@ -11,14 +12,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-4" - pressKey: Enter # Manage onboarding @@ -27,15 +28,8 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" + file: ../shared/onboarding_browsing.yaml -# Test Ad4 -- swipe: - start: 400, 200 - end: 400, 0 - duration: 200 - assertVisible: text: "[Ad 4] Shopping Tab Ad (heuristic)" - tapOn: diff --git a/.maestro/ad_click_detection_flow_tests/05_yjs_heuristic_ad_domain_provided_but_empty_u3_not_needed.yaml b/.maestro/ad_click_detection_flow_tests/05_yjs_heuristic_ad_domain_provided_but_empty_u3_not_needed.yaml index 6ca3db68f6..a40e33dae0 100644 --- a/.maestro/ad_click_detection_flow_tests/05_yjs_heuristic_ad_domain_provided_but_empty_u3_not_needed.yaml +++ b/.maestro/ad_click_detection_flow_tests/05_yjs_heuristic_ad_domain_provided_but_empty_u3_not_needed.yaml @@ -1,6 +1,7 @@ -# yjs_heuristic_ad_domain_provided_but_empty_u3_not_needed.yaml - appId: com.duckduckgo.mobile.ios +tags: + - adClick + --- # Set up @@ -11,14 +12,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-5" - pressKey: Enter # Manage onboarding @@ -27,15 +28,8 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" + file: ../shared/onboarding_browsing.yaml -# Test Ad5 -- swipe: - start: 400, 200 - end: 400, 0 - duration: 200 - assertVisible: text: "[Ad 5] SERP Ad (heuristic)" - tapOn: diff --git a/.maestro/ad_click_detection_flow_tests/06_mjs_heuristic_ad_domain_provided_but_empty_dsl_not_needed.yaml b/.maestro/ad_click_detection_flow_tests/06_mjs_heuristic_ad_domain_provided_but_empty_dsl_not_needed.yaml index 364124bb17..f55bdff711 100644 --- a/.maestro/ad_click_detection_flow_tests/06_mjs_heuristic_ad_domain_provided_but_empty_dsl_not_needed.yaml +++ b/.maestro/ad_click_detection_flow_tests/06_mjs_heuristic_ad_domain_provided_but_empty_dsl_not_needed.yaml @@ -1,4 +1,7 @@ appId: com.duckduckgo.mobile.ios +tags: + - adClick + --- - clearState - launchApp @@ -7,14 +10,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-6" - pressKey: Enter # Manage onboarding @@ -23,15 +26,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" - -# Test Ad6 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 + file: ../shared/onboarding_browsing.yaml - assertVisible: text: "[Ad 6] Shopping Tab Ad (heuristic)" diff --git a/.maestro/ad_click_detection_flow_tests/07_yjs_bing-provided_ad_domain_provided_u3_not_needed.yaml b/.maestro/ad_click_detection_flow_tests/07_yjs_bing-provided_ad_domain_provided_u3_not_needed.yaml index 33e5d389d6..4d37ae8f4b 100644 --- a/.maestro/ad_click_detection_flow_tests/07_yjs_bing-provided_ad_domain_provided_u3_not_needed.yaml +++ b/.maestro/ad_click_detection_flow_tests/07_yjs_bing-provided_ad_domain_provided_u3_not_needed.yaml @@ -1,4 +1,7 @@ appId: com.duckduckgo.mobile.ios +tags: + - adClick + --- - clearState - launchApp @@ -7,14 +10,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-7" - pressKey: Enter # Manage onboarding @@ -23,15 +26,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" - -# Test Ad7 -- swipe: - start: 200, 250 - end: 200, 0 - duration: 200 + file: ../shared/onboarding_browsing.yaml - assertVisible: text: "[Ad 7] SERP Ad (SERP-provided)" diff --git a/.maestro/ad_click_detection_flow_tests/08_mjs_bing-provided_ad_domain_provided_dsl_not_needed.yaml b/.maestro/ad_click_detection_flow_tests/08_mjs_bing-provided_ad_domain_provided_dsl_not_needed.yaml index c379a4d28b..1443b604a9 100644 --- a/.maestro/ad_click_detection_flow_tests/08_mjs_bing-provided_ad_domain_provided_dsl_not_needed.yaml +++ b/.maestro/ad_click_detection_flow_tests/08_mjs_bing-provided_ad_domain_provided_dsl_not_needed.yaml @@ -1,4 +1,7 @@ appId: com.duckduckgo.mobile.ios +tags: + - adClick + --- - clearState - launchApp @@ -7,14 +10,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-8" - pressKey: Enter # Manage onboarding @@ -23,19 +26,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" - -# Test Ad8 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 + file: ../shared/onboarding_browsing.yaml - assertVisible: text: "[Ad 8] Shopping Tab Ad (SERP-provided)" diff --git a/.maestro/ad_click_detection_flow_tests/09_yjs_bing-provided_ad_domain_provided_but_incorrect_u3_not_needed.yaml b/.maestro/ad_click_detection_flow_tests/09_yjs_bing-provided_ad_domain_provided_but_incorrect_u3_not_needed.yaml index 0e415654fa..672eb8e2b8 100644 --- a/.maestro/ad_click_detection_flow_tests/09_yjs_bing-provided_ad_domain_provided_but_incorrect_u3_not_needed.yaml +++ b/.maestro/ad_click_detection_flow_tests/09_yjs_bing-provided_ad_domain_provided_but_incorrect_u3_not_needed.yaml @@ -1,5 +1,9 @@ appId: com.duckduckgo.mobile.ios +tags: + - adClick + --- + - clearState - launchApp - runFlow: @@ -7,14 +11,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-9" - pressKey: Enter # Manage onboarding @@ -23,20 +27,9 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" + file: ../shared/onboarding_browsing.yaml # Test Ad9 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 - - assertVisible: text: "[Ad 9] SERP Ad (SERP-provided)" - tapOn: diff --git a/.maestro/ad_click_detection_flow_tests/10_mjs_bing-provided_ad_domain_provided_but_incorrect_dsl_not_needed.yaml b/.maestro/ad_click_detection_flow_tests/10_mjs_bing-provided_ad_domain_provided_but_incorrect_dsl_not_needed.yaml index 41d31a2bed..479b962c3d 100644 --- a/.maestro/ad_click_detection_flow_tests/10_mjs_bing-provided_ad_domain_provided_but_incorrect_dsl_not_needed.yaml +++ b/.maestro/ad_click_detection_flow_tests/10_mjs_bing-provided_ad_domain_provided_but_incorrect_dsl_not_needed.yaml @@ -1,5 +1,9 @@ appId: com.duckduckgo.mobile.ios +tags: + - adClick + --- + - clearState - launchApp - runFlow: @@ -7,14 +11,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-10" - pressKey: Enter # Manage onboarding @@ -23,23 +27,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" - -# Test Ad10 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 + file: ../shared/onboarding_browsing.yaml - assertVisible: text: "[Ad 10] Shopping Tab Ad (SERP-provided)" diff --git a/.maestro/ad_click_detection_flow_tests/11_yjs_bing-provided_ad_domain_provided_but_its_not_a_domain_u3_not_needed.yaml b/.maestro/ad_click_detection_flow_tests/11_yjs_bing-provided_ad_domain_provided_but_its_not_a_domain_u3_not_needed.yaml index 694b0477a0..0fbc199b64 100644 --- a/.maestro/ad_click_detection_flow_tests/11_yjs_bing-provided_ad_domain_provided_but_its_not_a_domain_u3_not_needed.yaml +++ b/.maestro/ad_click_detection_flow_tests/11_yjs_bing-provided_ad_domain_provided_but_its_not_a_domain_u3_not_needed.yaml @@ -1,5 +1,9 @@ appId: com.duckduckgo.mobile.ios +tags: + - adClick + --- + - clearState - launchApp - runFlow: @@ -7,14 +11,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-11" - pressKey: Enter # Manage onboarding @@ -23,23 +27,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" - -# Test Ad11 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 + file: ../shared/onboarding_browsing.yaml - assertVisible: text: "[Ad 11] SERP Ad (heuristic)" diff --git a/.maestro/ad_click_detection_flow_tests/12_mjs_bing-provided_ad_domain_provided_but_its_not_a_domain_dsl_not_needed.yaml b/.maestro/ad_click_detection_flow_tests/12_mjs_bing-provided_ad_domain_provided_but_its_not_a_domain_dsl_not_needed.yaml index 0fa42f8694..f6a7a4816b 100644 --- a/.maestro/ad_click_detection_flow_tests/12_mjs_bing-provided_ad_domain_provided_but_its_not_a_domain_dsl_not_needed.yaml +++ b/.maestro/ad_click_detection_flow_tests/12_mjs_bing-provided_ad_domain_provided_but_its_not_a_domain_dsl_not_needed.yaml @@ -1,5 +1,9 @@ appId: com.duckduckgo.mobile.ios +tags: + - adClick + --- + - clearState - launchApp - runFlow: @@ -7,14 +11,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-12" - pressKey: Enter # Manage onboarding @@ -23,23 +27,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" - -# Test Ad12 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 + file: ../shared/onboarding_browsing.yaml - assertVisible: text: "[Ad 12] Shopping Tab Ad (heuristic)" diff --git a/.maestro/ad_click_detection_flow_tests/13_yjs_bing-provided_ad_domain_provided_but_its_a_subdomain_of_advertiser_u3_not_needed.yaml b/.maestro/ad_click_detection_flow_tests/13_yjs_bing-provided_ad_domain_provided_but_its_a_subdomain_of_advertiser_u3_not_needed.yaml index 1c46a73f43..ca0834351f 100644 --- a/.maestro/ad_click_detection_flow_tests/13_yjs_bing-provided_ad_domain_provided_but_its_a_subdomain_of_advertiser_u3_not_needed.yaml +++ b/.maestro/ad_click_detection_flow_tests/13_yjs_bing-provided_ad_domain_provided_but_its_a_subdomain_of_advertiser_u3_not_needed.yaml @@ -1,5 +1,9 @@ appId: com.duckduckgo.mobile.ios +tags: + - adClick + --- + - clearState - launchApp - runFlow: @@ -7,14 +11,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-13" - pressKey: Enter # Manage onboarding @@ -23,27 +27,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" - -# Test Ad13 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 + file: ../shared/onboarding_browsing.yaml - assertVisible: text: "[Ad 13] SERP Ad (SERP-provided)" diff --git a/.maestro/ad_click_detection_flow_tests/14_mjs_bing-provided_ad_domain_provided_but_its_a_subdomain_of_advertiser_dsl_not_needed.yaml b/.maestro/ad_click_detection_flow_tests/14_mjs_bing-provided_ad_domain_provided_but_its_a_subdomain_of_advertiser_dsl_not_needed.yaml index 805327bcb1..e6bf86893c 100644 --- a/.maestro/ad_click_detection_flow_tests/14_mjs_bing-provided_ad_domain_provided_but_its_a_subdomain_of_advertiser_dsl_not_needed.yaml +++ b/.maestro/ad_click_detection_flow_tests/14_mjs_bing-provided_ad_domain_provided_but_its_a_subdomain_of_advertiser_dsl_not_needed.yaml @@ -1,5 +1,9 @@ appId: com.duckduckgo.mobile.ios +tags: + - adClick + --- + - clearState - launchApp - runFlow: @@ -7,14 +11,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-14" - pressKey: Enter # Manage onboarding @@ -23,27 +27,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" - -# Test Ad13 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 -- swipe: - start: 200, 200 - end: 200, 0 - duration: 200 + file: ../shared/onboarding_browsing.yaml - assertVisible: text: "[Ad 14] Shopping Tab Ad (SERP-provided)" diff --git a/.maestro/config.yaml b/.maestro/config.yaml index eae90d6ee7..b74550e22c 100644 --- a/.maestro/config.yaml +++ b/.maestro/config.yaml @@ -2,3 +2,5 @@ appStartup: enabled: false appSize: enabled: false +flows: + - "**" \ No newline at end of file diff --git a/.maestro/privacy_tests/01_single-site_single-tab_session.yaml b/.maestro/privacy_tests/01_single-site_single-tab_session.yaml index 2a70691bbf..bfb22d5973 100644 --- a/.maestro/privacy_tests/01_single-site_single-tab_session.yaml +++ b/.maestro/privacy_tests/01_single-site_single-tab_session.yaml @@ -1,6 +1,7 @@ -# single_site-single_tab.yaml - appId: com.duckduckgo.mobile.ios +tags: + - privacy + --- # Set up @@ -11,14 +12,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-5" - pressKey: Enter # Manage onboarding @@ -27,12 +28,9 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" + file: ../shared/onboarding_browsing.yaml # Test -- scroll - assertVisible: "[Ad 5] SERP Ad (heuristic)" - tapOn: "[Ad 5] SERP Ad (heuristic)" - assertVisible: "Publisher site" diff --git a/.maestro/privacy_tests/02_single-site_new_tab_session.yaml b/.maestro/privacy_tests/02_single-site_new_tab_session.yaml index 26d162f525..c6b72bf028 100644 --- a/.maestro/privacy_tests/02_single-site_new_tab_session.yaml +++ b/.maestro/privacy_tests/02_single-site_new_tab_session.yaml @@ -1,4 +1,7 @@ appId: com.duckduckgo.mobile.ios +tags: + - privacy + --- # Set up @@ -9,14 +12,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-5" - pressKey: Enter # Manage onboarding @@ -25,12 +28,9 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" + file: ../shared/onboarding_browsing.yaml # Test -- scroll - assertVisible: "[Ad 5] SERP Ad (heuristic)" - longPressOn: "[Ad 5] SERP Ad (heuristic)" - assertVisible: diff --git a/.maestro/privacy_tests/03_single-site_new-tab_session_variant_two.yaml b/.maestro/privacy_tests/03_single-site_new-tab_session_variant_two.yaml index c51af8ae80..3d56674a16 100644 --- a/.maestro/privacy_tests/03_single-site_new-tab_session_variant_two.yaml +++ b/.maestro/privacy_tests/03_single-site_new-tab_session_variant_two.yaml @@ -1,4 +1,7 @@ appId: com.duckduckgo.mobile.ios +tags: + - privacy + --- # Set up @@ -9,14 +12,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-5" - pressKey: Enter # Manage onboarding @@ -25,12 +28,9 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" + file: ../shared/onboarding_browsing.yaml # Test -- scroll - assertVisible: "[Ad 5] SERP Ad (heuristic)" - tapOn: "[Ad 5] SERP Ad (heuristic)" - assertVisible: diff --git a/.maestro/privacy_tests/04_single-site_multi-tab_session.yaml b/.maestro/privacy_tests/04_single-site_multi-tab_session.yaml index 14d8aee917..071716d320 100644 --- a/.maestro/privacy_tests/04_single-site_multi-tab_session.yaml +++ b/.maestro/privacy_tests/04_single-site_multi-tab_session.yaml @@ -1,4 +1,7 @@ appId: com.duckduckgo.mobile.ios +tags: + - privacy + --- # Set up @@ -9,14 +12,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-5" - pressKey: Enter # Manage onboarding @@ -25,12 +28,9 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" + file: ../shared/onboarding_browsing.yaml # Test -- scroll - assertVisible: "[Ad 5] SERP Ad (heuristic)" - tapOn: "[Ad 5] SERP Ad (heuristic)" - assertVisible: diff --git a/.maestro/privacy_tests/05_multi-site_single-tab_session.yaml b/.maestro/privacy_tests/05_multi-site_single-tab_session.yaml index 487b232ebc..34afabb5cc 100644 --- a/.maestro/privacy_tests/05_multi-site_single-tab_session.yaml +++ b/.maestro/privacy_tests/05_multi-site_single-tab_session.yaml @@ -1,4 +1,7 @@ appId: com.duckduckgo.mobile.ios +tags: + - privacy + --- # Set up @@ -9,14 +12,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-5" - pressKey: Enter # Manage onboarding @@ -25,12 +28,9 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" + file: ../shared/onboarding_browsing.yaml # Test -- scroll - assertVisible: "[Ad 5] SERP Ad (heuristic)" - tapOn: "[Ad 5] SERP Ad (heuristic)" - assertVisible: diff --git a/.maestro/privacy_tests/06_multi-tab.yaml b/.maestro/privacy_tests/06_multi-tab.yaml index 3097f33422..cee868a46d 100644 --- a/.maestro/privacy_tests/06_multi-tab.yaml +++ b/.maestro/privacy_tests/06_multi-tab.yaml @@ -1,4 +1,7 @@ appId: com.duckduckgo.mobile.ios +tags: + - privacy + --- # Set up @@ -9,14 +12,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-5" - pressKey: Enter # Manage onboarding @@ -25,12 +28,9 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" + file: ../shared/onboarding_browsing.yaml # Test -- scroll - assertVisible: "[Ad 5] SERP Ad (heuristic)" - tapOn: "[Ad 5] SERP Ad (heuristic)" - assertVisible: diff --git a/.maestro/privacy_tests/07_browser_restart_mid-session.yaml b/.maestro/privacy_tests/07_browser_restart_mid-session.yaml index b598aee466..e0e8cf0516 100644 --- a/.maestro/privacy_tests/07_browser_restart_mid-session.yaml +++ b/.maestro/privacy_tests/07_browser_restart_mid-session.yaml @@ -1,4 +1,7 @@ appId: com.duckduckgo.mobile.ios +tags: + - privacy + --- # Set up @@ -9,14 +12,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-5" - pressKey: Enter # Manage onboarding @@ -25,12 +28,10 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml + file: ../shared/onboarding_browsing.yaml -- assertVisible: "Search engine" # Test -- scroll - assertVisible: "[Ad 5] SERP Ad (heuristic)" - tapOn: "[Ad 5] SERP Ad (heuristic)" - assertVisible: diff --git a/.maestro/privacy_tests/08_navigation_with_back_forward.yaml b/.maestro/privacy_tests/08_navigation_with_back_forward.yaml index 9048df1f86..c8cbd3f381 100644 --- a/.maestro/privacy_tests/08_navigation_with_back_forward.yaml +++ b/.maestro/privacy_tests/08_navigation_with_back_forward.yaml @@ -1,4 +1,7 @@ appId: com.duckduckgo.mobile.ios +tags: + - privacy + --- # Set up @@ -9,14 +12,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-5" - pressKey: Enter # Manage onboarding @@ -25,12 +28,9 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" + file: ../shared/onboarding_browsing.yaml # Test -- scroll - assertVisible: "[Ad 5] SERP Ad (heuristic)" - tapOn: "[Ad 5] SERP Ad (heuristic)" - assertVisible: diff --git a/.maestro/privacy_tests/09_navigation_with_refresh.yaml b/.maestro/privacy_tests/09_navigation_with_refresh.yaml index 03441fdaa0..30d58f8db4 100644 --- a/.maestro/privacy_tests/09_navigation_with_refresh.yaml +++ b/.maestro/privacy_tests/09_navigation_with_refresh.yaml @@ -1,4 +1,7 @@ appId: com.duckduckgo.mobile.ios +tags: + - privacy + --- # Set up @@ -9,14 +12,14 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://www.search-company.site/" +- inputText: "https://www.search-company.site/#ad-id-5" - pressKey: Enter # Manage onboarding @@ -25,12 +28,9 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml - -- assertVisible: "Search engine" + file: ../shared/onboarding_browsing.yaml # Test -- scroll - assertVisible: "[Ad 5] SERP Ad (heuristic)" - tapOn: "[Ad 5] SERP Ad (heuristic)" - assertVisible: diff --git a/.maestro/release_tests/bookmarks.yaml b/.maestro/release_tests/bookmarks.yaml index e9a2c19add..56a81943e9 100644 --- a/.maestro/release_tests/bookmarks.yaml +++ b/.maestro/release_tests/bookmarks.yaml @@ -1,7 +1,10 @@ # bookmarks.yaml - appId: com.duckduckgo.mobile.ios +tags: + - release + --- + # Set up - clearState - launchApp @@ -10,7 +13,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: @@ -26,7 +29,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml + file: ../shared/onboarding_browsing.yaml # Bookmark site - assertVisible: "Browsing menu" diff --git a/.maestro/release_tests/browsing.yaml b/.maestro/release_tests/browsing.yaml index a49e77fe7e..3be02ab923 100644 --- a/.maestro/release_tests/browsing.yaml +++ b/.maestro/release_tests/browsing.yaml @@ -1,7 +1,10 @@ # browsing.yaml - appId: com.duckduckgo.mobile.ios +tags: + - release + --- + # Set up - clearState - launchApp @@ -10,7 +13,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: diff --git a/.maestro/release_tests/favorites.yaml b/.maestro/release_tests/favorites.yaml index d258be84ad..f33ae3bff7 100644 --- a/.maestro/release_tests/favorites.yaml +++ b/.maestro/release_tests/favorites.yaml @@ -1,7 +1,10 @@ # favorites.yaml - appId: com.duckduckgo.mobile.ios +tags: + - release + --- + # Set up - clearState - launchApp @@ -10,7 +13,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: @@ -26,7 +29,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml + file: ../shared/onboarding_browsing.yaml # Add site to favorites from menu - assertVisible: "Browsing menu" diff --git a/.maestro/release_tests/tabs.yaml b/.maestro/release_tests/tabs.yaml index c0a4aa085f..23e4024e3e 100644 --- a/.maestro/release_tests/tabs.yaml +++ b/.maestro/release_tests/tabs.yaml @@ -1,7 +1,10 @@ # tabs.yaml - appId: com.duckduckgo.mobile.ios +tags: + - release + --- + # Set up - clearState - launchApp @@ -10,7 +13,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Let’s Do It!" index: 0 - file: ./shared/onboarding.yaml + file: ../shared/onboarding.yaml # Load Site - assertVisible: @@ -26,7 +29,7 @@ appId: com.duckduckgo.mobile.ios visible: text: "Got It" index: 0 - file: ./shared/onboarding_browsing.yaml + file: ../shared/onboarding_browsing.yaml - assertVisible: ".*Privacy Test Pages.*" diff --git a/fastlane/Fastfile b/fastlane/Fastfile index a4eef3a73b..755788c816 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -157,18 +157,6 @@ lane :increment_build_number_for_version do |options| }) end -desc 'Setup Maestro e2e tests' -lane :setup_e2e_tests do |options| - shared_folder = 'shared' - e2e_test_folders = [ - 'release_tests', - 'privacy_tests', - 'ad_click_detection_flow_tests' - ] - - e2e_test_folders.each { | test_folder | FileUtils.copy_entry "../.maestro/#{shared_folder}", "../.maestro/#{test_folder}/#{shared_folder}" } -end - ################################################# # Private lanes ################################################# From f08eca70213ce642a31797b56286a605a44fe28a Mon Sep 17 00:00:00 2001 From: Tom Strba <57389842+tomasstrba@users.noreply.github.com> Date: Wed, 11 Oct 2023 15:43:03 +0200 Subject: [PATCH 09/28] BSK hotfix 80.3.0-1 merged to the main branch (#2079) --- DuckDuckGo.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/swiftpm/Package.resolved | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 5ccb32bbef..362c45d9a3 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -8962,7 +8962,7 @@ repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 81.1.0; + version = 81.1.1; }; }; C14882EB27F211A000D59F0C /* XCRemoteSwiftPackageReference "SwiftSoup" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index ce52c2c554..3eff1187f7 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/DuckDuckGo/BrowserServicesKit", "state": { "branch": null, - "revision": "43fd829917f61f605fc110b68bb1bf1841276b3c", - "version": "81.1.0" + "revision": "92948321f544c00bcdef7c23ebec739b84f71a8a", + "version": "81.1.1" } }, { @@ -156,7 +156,7 @@ }, { "package": "TrackerRadarKit", - "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit.git", + "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit", "state": { "branch": null, "revision": "4684440d03304e7638a2c8086895367e90987463", From 835b19c8e31bb65ef553134a9977573562bbe356 Mon Sep 17 00:00:00 2001 From: David Harbage Date: Wed, 11 Oct 2023 10:25:54 -0400 Subject: [PATCH 10/28] Bump C-S-S to 4.39.0 (#2085) Task/Issue URL: https://app.asana.com/0/0/1205693429987634/f Description: Fixes an issue where strictHide element hiding rules aren't applied properly. --- DuckDuckGo.xcodeproj/project.pbxproj | 2 +- .../xcshareddata/swiftpm/Package.resolved | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 362c45d9a3..affaf75885 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -8962,7 +8962,7 @@ repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 81.1.1; + version = 81.2.0; }; }; C14882EB27F211A000D59F0C /* XCRemoteSwiftPackageReference "SwiftSoup" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 3eff1187f7..53e9e0734f 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/DuckDuckGo/BrowserServicesKit", "state": { "branch": null, - "revision": "92948321f544c00bcdef7c23ebec739b84f71a8a", - "version": "81.1.1" + "revision": "20ef8a4b3791a57d475cd848afdecb85fa010a5e", + "version": "81.2.0" } }, { @@ -33,8 +33,8 @@ "repositoryURL": "https://github.com/duckduckgo/content-scope-scripts", "state": { "branch": null, - "revision": "74b6142c016be354144f28551de41b50c4864b1f", - "version": "4.37.0" + "revision": "aa279a3b006a0b1e009707311283c7fcaed24fb7", + "version": "4.39.0" } }, { @@ -156,7 +156,7 @@ }, { "package": "TrackerRadarKit", - "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit", + "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit.git", "state": { "branch": null, "revision": "4684440d03304e7638a2c8086895367e90987463", From 2f2e016d4fd51ae8f1958a5e8825f1388bbc38ad Mon Sep 17 00:00:00 2001 From: Dax Mobile <44842493+daxmobile@users.noreply.github.com> Date: Thu, 12 Oct 2023 07:58:40 +1100 Subject: [PATCH 11/28] Update BSK with autofill 8.4.2 (#2084) Co-authored-by: GioSensation Co-authored-by: Graeme Arthur --- DuckDuckGo.xcodeproj/project.pbxproj | 6 +++--- .../xcshareddata/swiftpm/Package.resolved | 10 +++++----- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index affaf75885..aa9134c664 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -693,8 +693,8 @@ C17B59592A03AAD30055F2D1 /* PasswordGenerationPromptViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17B59562A03AAD30055F2D1 /* PasswordGenerationPromptViewModel.swift */; }; C17B595A2A03AAD30055F2D1 /* PasswordGenerationPromptViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17B59572A03AAD30055F2D1 /* PasswordGenerationPromptViewController.swift */; }; C17B595B2A03AAD30055F2D1 /* PasswordGenerationPromptView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17B59582A03AAD30055F2D1 /* PasswordGenerationPromptView.swift */; }; - C18ED43C2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */; }; C18ED43A2AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18ED4392AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift */; }; + C18ED43C2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */; }; C1963863283794A000298D4D /* BookmarksCachingSearch.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1963862283794A000298D4D /* BookmarksCachingSearch.swift */; }; C1B0F6422AB08BE9001EAF05 /* MockPrivacyConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B0F6412AB08BE9001EAF05 /* MockPrivacyConfiguration.swift */; }; C1B7B51C28941E980098FD6A /* HomeMessageViewModelBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B7B51B28941E980098FD6A /* HomeMessageViewModelBuilder.swift */; }; @@ -2265,8 +2265,8 @@ C17B59562A03AAD30055F2D1 /* PasswordGenerationPromptViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PasswordGenerationPromptViewModel.swift; sourceTree = ""; }; C17B59572A03AAD30055F2D1 /* PasswordGenerationPromptViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PasswordGenerationPromptViewController.swift; sourceTree = ""; }; C17B59582A03AAD30055F2D1 /* PasswordGenerationPromptView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PasswordGenerationPromptView.swift; sourceTree = ""; }; - C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileTextPreviewDebugViewController.swift; sourceTree = ""; }; C18ED4392AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutofillSettingsEnableFooterView.swift; sourceTree = ""; }; + C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileTextPreviewDebugViewController.swift; sourceTree = ""; }; C1963862283794A000298D4D /* BookmarksCachingSearch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BookmarksCachingSearch.swift; sourceTree = ""; }; C1B0F6412AB08BE9001EAF05 /* MockPrivacyConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockPrivacyConfiguration.swift; sourceTree = ""; }; C1B7B51B28941E980098FD6A /* HomeMessageViewModelBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeMessageViewModelBuilder.swift; sourceTree = ""; }; @@ -8962,7 +8962,7 @@ repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 81.2.0; + version = 81.3.0; }; }; C14882EB27F211A000D59F0C /* XCRemoteSwiftPackageReference "SwiftSoup" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 53e9e0734f..97ad8e77b8 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/DuckDuckGo/BrowserServicesKit", "state": { "branch": null, - "revision": "20ef8a4b3791a57d475cd848afdecb85fa010a5e", - "version": "81.2.0" + "revision": "7cd525e28fe6d38f5dd4df85658a4ee6c688eebc", + "version": "81.3.0" } }, { @@ -51,8 +51,8 @@ "repositoryURL": "https://github.com/duckduckgo/duckduckgo-autofill.git", "state": { "branch": null, - "revision": "55466f10a339843cb79a27af62d5d61c030740b2", - "version": "8.4.1" + "revision": "6dd7d696d4e666cedb2f1890a46fe53615226646", + "version": "8.4.2" } }, { @@ -156,7 +156,7 @@ }, { "package": "TrackerRadarKit", - "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit.git", + "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit", "state": { "branch": null, "revision": "4684440d03304e7638a2c8086895367e90987463", From e8e7fc7b2b6785a04e5a3c20485853a54c6156cd Mon Sep 17 00:00:00 2001 From: Dominik Kapusta Date: Thu, 12 Oct 2023 17:47:05 +0200 Subject: [PATCH 12/28] Ignore form factor specific favorites if they're received in Sync response (#2083) Task/Issue URL: https://app.asana.com/0/414235014887631/1205688495536992/f Description: Until FFS favorites support is released, deliberately ignore any FFS favorites folders received in Sync response. --- DuckDuckGo.xcodeproj/project.pbxproj | 2 +- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index aa9134c664..c3c1596e66 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -8962,7 +8962,7 @@ repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 81.3.0; + version = 81.3.1; }; }; C14882EB27F211A000D59F0C /* XCRemoteSwiftPackageReference "SwiftSoup" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 97ad8e77b8..d12c93a90a 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/DuckDuckGo/BrowserServicesKit", "state": { "branch": null, - "revision": "7cd525e28fe6d38f5dd4df85658a4ee6c688eebc", - "version": "81.3.0" + "revision": "89cd93fe9e394f518131bc26d4a3d02c96ee07e6", + "version": "81.3.1" } }, { From 9be6e24845576ec19376c5b1c88b24c54e3dde5b Mon Sep 17 00:00:00 2001 From: Lorenzo Mattei Date: Fri, 13 Oct 2023 13:28:29 +0200 Subject: [PATCH 13/28] Update tabs tests (#2088) Co-authored-by: Lorenzo Mattei --- .maestro/release_tests/tabs.yaml | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/.maestro/release_tests/tabs.yaml b/.maestro/release_tests/tabs.yaml index 23e4024e3e..fd9b7460fe 100644 --- a/.maestro/release_tests/tabs.yaml +++ b/.maestro/release_tests/tabs.yaml @@ -20,7 +20,7 @@ tags: id: "searchEntry" - tapOn: id: "searchEntry" -- inputText: "https://privacy-test-pages.glitch.me" +- inputText: "https://privacy-test-pages.site" - pressKey: Enter # Manage onboarding @@ -34,10 +34,8 @@ tags: - assertVisible: ".*Privacy Test Pages.*" # Add tab -- assertVisible: - id: "Tabs" -- tapOn: - id: "Tabs" +- assertVisible: Tab Switcher +- tapOn: Tab Switcher - assertVisible: ".*Privacy Test Pages.*" - assertVisible: id: "Add" @@ -52,23 +50,19 @@ tags: - assertVisible: "Search engine" # Switch Tab -- assertVisible: - id: "Tabs" -- tapOn: - id: "Tabs" +- assertVisible: Tab Switcher +- tapOn: Tab Switcher - assertVisible: ".*Privacy Test Pages.*" - assertVisible: ".*Ad Click Flow.*" - assertVisible: "2 Private Tabs" -- tapOn: "Open \"Privacy Test Pages - Home\" at privacy-test-pages.glitch.me" +- tapOn: "Open \"Privacy Test Pages - Home\" at privacy-test-pages.site" - assertNotVisible: ".*Ad Click Flow.*" - assertVisible: ".*Privacy Test Pages.*" - tapOn: "Refresh Page" # Close Tab -- assertVisible: - id: "Tabs" -- tapOn: - id: "Tabs" +- assertVisible: Tab Switcher +- tapOn: Tab Switcher - assertVisible: ".*Privacy Test Pages.*" - assertVisible: ".*Ad Click Flow.*" - assertVisible: "2 Private Tabs" From 27c542509c1fe411205a551b9f67e7ca261fb76a Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Fri, 13 Oct 2023 16:30:34 +0200 Subject: [PATCH 14/28] Release 7.93.0 (#2096) Co-authored-by: Tom Strba <57389842+tomasstrba@users.noreply.github.com> Co-authored-by: David Harbage Co-authored-by: Dax Mobile <44842493+daxmobile@users.noreply.github.com> Co-authored-by: GioSensation --- DuckDuckGo.xcodeproj/project.pbxproj | 48 +++++++++---------- .../xcshareddata/swiftpm/Package.resolved | 14 +++--- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index 5ccb32bbef..368af03976 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -693,8 +693,8 @@ C17B59592A03AAD30055F2D1 /* PasswordGenerationPromptViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17B59562A03AAD30055F2D1 /* PasswordGenerationPromptViewModel.swift */; }; C17B595A2A03AAD30055F2D1 /* PasswordGenerationPromptViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17B59572A03AAD30055F2D1 /* PasswordGenerationPromptViewController.swift */; }; C17B595B2A03AAD30055F2D1 /* PasswordGenerationPromptView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C17B59582A03AAD30055F2D1 /* PasswordGenerationPromptView.swift */; }; - C18ED43C2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */; }; C18ED43A2AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18ED4392AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift */; }; + C18ED43C2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */; }; C1963863283794A000298D4D /* BookmarksCachingSearch.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1963862283794A000298D4D /* BookmarksCachingSearch.swift */; }; C1B0F6422AB08BE9001EAF05 /* MockPrivacyConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B0F6412AB08BE9001EAF05 /* MockPrivacyConfiguration.swift */; }; C1B7B51C28941E980098FD6A /* HomeMessageViewModelBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = C1B7B51B28941E980098FD6A /* HomeMessageViewModelBuilder.swift */; }; @@ -2265,8 +2265,8 @@ C17B59562A03AAD30055F2D1 /* PasswordGenerationPromptViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PasswordGenerationPromptViewModel.swift; sourceTree = ""; }; C17B59572A03AAD30055F2D1 /* PasswordGenerationPromptViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PasswordGenerationPromptViewController.swift; sourceTree = ""; }; C17B59582A03AAD30055F2D1 /* PasswordGenerationPromptView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PasswordGenerationPromptView.swift; sourceTree = ""; }; - C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileTextPreviewDebugViewController.swift; sourceTree = ""; }; C18ED4392AB6F77600BF3805 /* AutofillSettingsEnableFooterView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutofillSettingsEnableFooterView.swift; sourceTree = ""; }; + C18ED43B2AB8364400BF3805 /* FileTextPreviewDebugViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = FileTextPreviewDebugViewController.swift; sourceTree = ""; }; C1963862283794A000298D4D /* BookmarksCachingSearch.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BookmarksCachingSearch.swift; sourceTree = ""; }; C1B0F6412AB08BE9001EAF05 /* MockPrivacyConfiguration.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockPrivacyConfiguration.swift; sourceTree = ""; }; C1B7B51B28941E980098FD6A /* HomeMessageViewModelBuilder.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeMessageViewModelBuilder.swift; sourceTree = ""; }; @@ -7621,7 +7621,7 @@ CODE_SIGN_ENTITLEMENTS = PacketTunnelProvider/PacketTunnelProvider.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; @@ -7658,7 +7658,7 @@ CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -7750,7 +7750,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -7777,7 +7777,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -7923,7 +7923,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -7947,7 +7947,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; INFOPLIST_FILE = DuckDuckGo/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -8011,7 +8011,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEAD_CODE_STRIPPING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Widgets/Info.plist; @@ -8046,7 +8046,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8080,7 +8080,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = OpenAction/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -8110,7 +8110,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8396,7 +8396,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGoAlpha.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8422,7 +8422,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8454,7 +8454,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8491,7 +8491,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8527,7 +8527,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8562,11 +8562,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 0; + DYLIB_CURRENT_VERSION = 2; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8740,11 +8740,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 0; + DYLIB_CURRENT_VERSION = 2; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8773,10 +8773,10 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 0; + DYLIB_CURRENT_VERSION = 2; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8962,7 +8962,7 @@ repositoryURL = "https://github.com/DuckDuckGo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 81.1.0; + version = 81.3.0; }; }; C14882EB27F211A000D59F0C /* XCRemoteSwiftPackageReference "SwiftSoup" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index ce52c2c554..97ad8e77b8 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -15,8 +15,8 @@ "repositoryURL": "https://github.com/DuckDuckGo/BrowserServicesKit", "state": { "branch": null, - "revision": "43fd829917f61f605fc110b68bb1bf1841276b3c", - "version": "81.1.0" + "revision": "7cd525e28fe6d38f5dd4df85658a4ee6c688eebc", + "version": "81.3.0" } }, { @@ -33,8 +33,8 @@ "repositoryURL": "https://github.com/duckduckgo/content-scope-scripts", "state": { "branch": null, - "revision": "74b6142c016be354144f28551de41b50c4864b1f", - "version": "4.37.0" + "revision": "aa279a3b006a0b1e009707311283c7fcaed24fb7", + "version": "4.39.0" } }, { @@ -51,8 +51,8 @@ "repositoryURL": "https://github.com/duckduckgo/duckduckgo-autofill.git", "state": { "branch": null, - "revision": "55466f10a339843cb79a27af62d5d61c030740b2", - "version": "8.4.1" + "revision": "6dd7d696d4e666cedb2f1890a46fe53615226646", + "version": "8.4.2" } }, { @@ -156,7 +156,7 @@ }, { "package": "TrackerRadarKit", - "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit.git", + "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit", "state": { "branch": null, "revision": "4684440d03304e7638a2c8086895367e90987463", From 3586115f17811ae47711d3c71581f5ceb6b65383 Mon Sep 17 00:00:00 2001 From: Graeme Arthur Date: Fri, 13 Oct 2023 16:30:34 +0200 Subject: [PATCH 15/28] Release 7.93.0 (#2096) Co-authored-by: Tom Strba <57389842+tomasstrba@users.noreply.github.com> Co-authored-by: David Harbage Co-authored-by: Dax Mobile <44842493+daxmobile@users.noreply.github.com> Co-authored-by: GioSensation --- DuckDuckGo.xcodeproj/project.pbxproj | 42 ++++++++++++++-------------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index c3c1596e66..ecb3e45d5a 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -7621,7 +7621,7 @@ CODE_SIGN_ENTITLEMENTS = PacketTunnelProvider/PacketTunnelProvider.entitlements; CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; GENERATE_INFOPLIST_FILE = YES; @@ -7658,7 +7658,7 @@ CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -7750,7 +7750,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = ShareExtension/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -7777,7 +7777,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -7923,7 +7923,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -7947,7 +7947,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGo.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; INFOPLIST_FILE = DuckDuckGo/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -8011,7 +8011,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEAD_CODE_STRIPPING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = Widgets/Info.plist; @@ -8046,7 +8046,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8080,7 +8080,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; GCC_C_LANGUAGE_STANDARD = gnu11; INFOPLIST_FILE = OpenAction/Info.plist; LD_RUNPATH_SEARCH_PATHS = ( @@ -8110,7 +8110,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8396,7 +8396,7 @@ CODE_SIGN_ENTITLEMENTS = DuckDuckGo/DuckDuckGoAlpha.entitlements; CODE_SIGN_IDENTITY = "iPhone Distribution"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEVELOPMENT_ASSET_PATHS = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8422,7 +8422,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8454,7 +8454,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8491,7 +8491,7 @@ CODE_SIGN_IDENTITY = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEAD_CODE_STRIPPING = NO; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; @@ -8527,7 +8527,7 @@ CODE_SIGN_IDENTITY = "Apple Development"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution"; CODE_SIGN_STYLE = Manual; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEVELOPMENT_TEAM = ""; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = HKE973VLUW; GCC_C_LANGUAGE_STANDARD = gnu11; @@ -8562,11 +8562,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 0; + DYLIB_CURRENT_VERSION = 2; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8740,11 +8740,11 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 0; + DYLIB_CURRENT_VERSION = 2; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; @@ -8773,10 +8773,10 @@ CLANG_ENABLE_MODULES = YES; CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; - CURRENT_PROJECT_VERSION = 0; + CURRENT_PROJECT_VERSION = 2; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 0; + DYLIB_CURRENT_VERSION = 2; DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = Core/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; From 1fef42a543b2d5db3e42cd843a660bf5c642b764 Mon Sep 17 00:00:00 2001 From: Lorenzo Mattei Date: Sun, 15 Oct 2023 21:44:38 +0200 Subject: [PATCH 16/28] Add note about Danger matching rules (#2087) Co-authored-by: Lorenzo Mattei --- .../AppPrivacyConfigurationDataProvider.swift | 4 +- Core/AppURLs.swift | 3 + Core/ios-config.json | 823 ++++++++---------- scripts/update_embedded.sh | 3 +- 4 files changed, 376 insertions(+), 457 deletions(-) diff --git a/Core/AppPrivacyConfigurationDataProvider.swift b/Core/AppPrivacyConfigurationDataProvider.swift index 56755c581d..1ce3b85874 100644 --- a/Core/AppPrivacyConfigurationDataProvider.swift +++ b/Core/AppPrivacyConfigurationDataProvider.swift @@ -23,8 +23,8 @@ import BrowserServicesKit final public class AppPrivacyConfigurationDataProvider: EmbeddedDataProvider { public struct Constants { - public static let embeddedDataETag = "\"54efb258435567856e087913f93d43df\"" - public static let embeddedDataSHA = "d0f9c70c5baba23a0966b277f8b4c949ecf01612558a50d2bda720fe1919b43f" + public static let embeddedDataETag = "\"81da520221d37e6398ea3d8940595810\"" + public static let embeddedDataSHA = "19766ed7e598cdc123c9db702264b99d0cff5ddfb2ed226fba85b06d304f7e0b" } public var embeddedDataEtag: String { diff --git a/Core/AppURLs.swift b/Core/AppURLs.swift index 6feb8e7407..e7ebfa07f1 100644 --- a/Core/AppURLs.swift +++ b/Core/AppURLs.swift @@ -33,6 +33,9 @@ public extension URL { static let aboutLink = URL(string: AppDeepLinkSchemes.quickLink.appending("\(ddg.host!)/about"))! static let surrogates = URL(string: "\(staticBase)/surrogates.txt")! + + // The following URLs shall match the ones in update_embedded.sh. + // Danger checks that the URLs match on every PR. If the code changes, the regex that Danger uses may need an update. static let privacyConfig = URL(string: "\(staticBase)/trackerblocking/config/v3/ios-config.json")! static let trackerDataSet = URL(string: "\(staticBase)/trackerblocking/v5/current/ios-tds.json")! static let bloomFilter = URL(string: "\(staticBase)/https/https-mobile-v2-bloom.bin")! diff --git a/Core/ios-config.json b/Core/ios-config.json index b9847b8298..2598db1b60 100644 --- a/Core/ios-config.json +++ b/Core/ios-config.json @@ -1,6 +1,6 @@ { "readme": "https://github.com/duckduckgo/privacy-configuration", - "version": 1695828991975, + "version": 1697058000288, "features": { "adClickAttribution": { "readme": "https://help.duckduckgo.com/duckduckgo-help-pages/privacy/web-tracking-protections/#3rd-party-tracker-loading-protection", @@ -313,66 +313,6 @@ { "domain": "roll20.net", "reason": "Performance issue for too many fields." - }, - { - "domain": "amazon.ca", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.cn", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.co.jp", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.com", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.com.au", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.com.mx", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.co.uk", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.de", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.es", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.eu", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.fr", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.in", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.it", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.nl", - "reason": "Performance issue, infinite loop." - }, - { - "domain": "amazon.sa", - "reason": "Performance issue, infinite loop." } ], "state": "enabled", @@ -398,7 +338,7 @@ "minSupportedVersion": "7.75.0" } }, - "hash": "c427670d1be007f3bd4af4c0e83addfb" + "hash": "0050520033bd94b10474e9d2f649f8f9" }, "clickToLoad": { "exceptions": [ @@ -1198,6 +1138,10 @@ "domain": "iamexpat.nl", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1247" }, + { + "domain": "pocketbook.digital", + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1368" + }, { "domain": "earth.google.com", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1099" @@ -1230,7 +1174,7 @@ } }, "state": "disabled", - "hash": "396f535f481c52cc31108ac8a0f7e53a" + "hash": "282361b69a7a17fbd3a6c53cdfba6b97" }, "clickToPlay": { "exceptions": [ @@ -1274,6 +1218,14 @@ "domain": "welt.de", "reason": "Video pauses at about 13-15 seconds in. Playing the video again results in a single frame rendering without progressing to the next frame." }, + { + "domain": "optout.aboutads.info", + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1377" + }, + { + "domain": "optout.networkadvertising.org", + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1377" + }, { "domain": "earth.google.com", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1099" @@ -1291,7 +1243,7 @@ "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1085" } ], - "hash": "acdaea57d6585b8b4c15750545c477ff" + "hash": "f43e0ec67d1177139fe5cfc603cbd8a3" }, "cookie": { "settings": { @@ -1325,6 +1277,14 @@ "domain": "nespresso.com", "reason": "Clicking 'Continue' after filling out details for account creation yields an error." }, + { + "domain": "optout.aboutads.info", + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1377" + }, + { + "domain": "optout.networkadvertising.org", + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1377" + }, { "domain": "earth.google.com", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1099" @@ -1343,10 +1303,145 @@ } ], "state": "disabled", - "hash": "d391a768cdcd83fe39d2229cfca7239c" + "hash": "ee691572b20893705632f670a2f72801" }, "customUserAgent": { "settings": { + "defaultPolicy": "ddg", + "ddgFixedSites": [], + "ddgDefaultSites": [ + { + "domain": "duckduckgo.com", + "reason": "Internal exclusion to roll out experiment" + } + ], + "ddgFixedUserAgent": { + "versions": [ + "391", + "389", + "388", + "386", + "383", + "382", + "379", + "377", + "376", + "374", + "371", + "370", + "367", + "365", + "364", + "361", + "360", + "358", + "356", + "353", + "351", + "349", + "348", + "345", + "343", + "341", + "340", + "338", + "336", + "334", + "332", + "330", + "327", + "325", + "324", + "322", + "319", + "317", + "316", + "314", + "311", + "310", + "307", + "305", + "303", + "301", + "299", + "297", + "296", + "294", + "292", + "290", + "288", + "286", + "283", + "282", + "280", + "277", + "275", + "273", + "272", + "270", + "267", + "265", + "264", + "261", + "259", + "258", + "255", + "253", + "252", + "250", + "247", + "246", + "243", + "242", + "240", + "237", + "235", + "233", + "231", + "229", + "227", + "225", + "224", + "221", + "219", + "217", + "216", + "214", + "212", + "210", + "207", + "206", + "204", + "201", + "200", + "198", + "195", + "193", + "192", + "189", + "188", + "186", + "183", + "181", + "179", + "177", + "175", + "174", + "172", + "170", + "168", + "166", + "164", + "162", + "159", + "158", + "156", + "153", + "151", + "149", + "147" + ] + }, "omitApplicationSites": [ { "domain": "thingiverse.com", @@ -1466,7 +1561,7 @@ }, "exceptions": [], "state": "enabled", - "hash": "8b39b35be3b5b92c999539eb1ebc252f" + "hash": "512418708ceed91fa734fcdbae795543" }, "duckPlayer": { "exceptions": [], @@ -1630,7 +1725,7 @@ } ], "settings": { - "useStrictHideStyleTag": true, + "useStrictHideStyleTag": false, "rules": [ { "selector": "[id*='gpt-']", @@ -1780,6 +1875,10 @@ "selector": "#topBanner", "type": "hide-empty" }, + { + "selector": ".top-ad", + "type": "hide-empty" + }, { "selector": ".ad-banner-container", "type": "hide-empty" @@ -2001,6 +2100,10 @@ { "domain": "github.com", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1058" + }, + { + "domain": "pocketbook.digital", + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1365" } ], "hideTimeouts": [ @@ -2026,6 +2129,7 @@ "advertisements", "advertisment", "advertisementclose", + "advertisementadvertisement", "advertisementcontinue reading the main story", "advertisement\ncontinue reading the main story", "advertisement\n\ncontinue reading the main story", @@ -2044,6 +2148,7 @@ "sponsored", "sponsorisé", "story continues below advertisement", + "story continues below advertisementadvertisement", "publicité", "publicidade", "reklama", @@ -2963,6 +3068,15 @@ } ] }, + { + "domain": "refinery29.com", + "rules": [ + { + "selector": ".section-ad", + "type": "hide-empty" + } + ] + }, { "domain": "reuters.com", "rules": [ @@ -3049,6 +3163,15 @@ } ] }, + { + "domain": "slate.com", + "rules": [ + { + "selector": ".slate-ad", + "type": "hide-empty" + } + ] + }, { "domain": "snopes.com", "rules": [ @@ -3272,6 +3395,10 @@ { "selector": "#cx-what-to-read-next", "type": "closest-empty" + }, + { + "selector": "[class*='WSJTheme--adWrapper']", + "type": "hide-empty" } ] }, @@ -3299,6 +3426,10 @@ { "selector": ".darla", "type": "closest-empty" + }, + { + "selector": "[data-content='Advertisement']", + "type": "hide-empty" } ] }, @@ -3437,7 +3568,7 @@ ] }, "state": "enabled", - "hash": "d0034c140c0ee9ce9015b74b428523b3" + "hash": "0d1bbb9811caae04c96e677d78d9b9ce" }, "exceptionHandler": { "exceptions": [ @@ -3680,190 +3811,6 @@ "domain": "hyatt.com", "reason": "Site loads blank and does not proceed." }, - { - "domain": "bank.marksandspencer.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "www7.marksandspencer.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "fidelity.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "citi.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "americanexpress.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "capitalone.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "marcus.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bankofamerica.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "wellsfargo.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "usbank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "citizensbankonline.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "sofi.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "regions.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "usaa.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "boh.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "santander.com.br", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "pnc.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "edwardjones.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "ally.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "metrobank.com.ph", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "key.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "synchronybank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "oldglorybank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "santander.com.mx", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "secureinternetbank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bankfirst.com.au", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "fnbo.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "salliemae.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bnc.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "kanza.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "prosperity.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "firstwestern.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "penncrest.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "northwest.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bell.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "dollar.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "dellsbank.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "rcbbank.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "ebt.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "mybct.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "wells.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "365.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "atom.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "ibanking-services.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bmo.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "tsb.co.uk", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, { "domain": "earth.google.com", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1099" @@ -3882,7 +3829,7 @@ } ], "state": "enabled", - "hash": "f28bbd2f54f441ea5f830398df41f45e" + "hash": "c2469977eaaaf117362492d2c993fd1c" }, "fingerprintingScreenSize": { "settings": { @@ -3924,190 +3871,6 @@ "domain": "secureserver.net", "reason": "After entering login details and clicking to log in, the site shows an adwall and prevents login." }, - { - "domain": "bank.marksandspencer.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "www7.marksandspencer.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "fidelity.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "citi.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - }, - { - "domain": "americanexpress.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "capitalone.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "marcus.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bankofamerica.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "wellsfargo.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "usbank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "citizensbankonline.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "sofi.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "regions.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "usaa.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "boh.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "santander.com.br", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "pnc.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "edwardjones.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "ally.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "metrobank.com.ph", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "key.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "synchronybank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "oldglorybank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "santander.com.mx", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "secureinternetbank.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bankfirst.com.au", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "fnbo.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "salliemae.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bnc.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "kanza.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "prosperity.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "firstwestern.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "penncrest.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "northwest.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bell.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "dollar.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "dellsbank.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "rcbbank.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "ebt.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "mybct.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "wells.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "365.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "atom.bank", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "ibanking-services.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "bmo.com", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, - { - "domain": "tsb.co.uk", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1265" - }, { "domain": "earth.google.com", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1099" @@ -4126,7 +3889,7 @@ } ], "state": "enabled", - "hash": "702a26f39577785255f35af7fc7f2578" + "hash": "27afff6e74517f41184f4d3df479c53b" }, "fingerprintingTemporaryStorage": { "exceptions": [ @@ -4363,6 +4126,10 @@ "domain": "act.alz.org", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1158" }, + { + "domain": "amica.com", + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1336" + }, { "domain": "earth.google.com", "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1099" @@ -4380,7 +4147,7 @@ "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1085" } ], - "hash": "8de33b0e54940edad6504523c8db58ff" + "hash": "22b055005a4ea3a5f5d387000c4b838b" }, "incontextSignup": { "exceptions": [], @@ -4395,11 +4162,18 @@ "state": "disabled", "features": { "rollout": { - "state": "disabled" + "state": "enabled", + "rollout": { + "steps": [ + { + "percent": 0.5 + } + ] + } } }, "exceptions": [], - "hash": "c1293c7b2687c8a2f7c5433a4d7a330d" + "hash": "429cea8d27316dc62af04159ec7c42b5" }, "navigatorInterface": { "exceptions": [ @@ -4435,10 +4209,13 @@ "features": { "waitlist": { "state": "disabled" + }, + "waitlistBetaActive": { + "state": "disabled" } }, "exceptions": [], - "hash": "bf4c9cd751a7626bd89136f6cc98ccf1" + "hash": "ba52a36920a4a76343fc3c44d98936f9" }, "newTabContinueSetUp": { "exceptions": [], @@ -5106,6 +4883,48 @@ }, "connatix.com": { "rules": [ + { + "rule": "cd.connatix.com", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/768" + }, + { + "rule": "cds.connatix.com", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/768" + }, + { + "rule": "cdn.connatix.com", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/768" + }, + { + "rule": "capi.connatix.com", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/768" + }, + { + "rule": "vid.connatix.com", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/768" + }, + { + "rule": "img.connatix.com", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/768" + }, { "rule": "connatix.com", "domains": [ @@ -5365,6 +5184,17 @@ } ] }, + "eccmp.com": { + "rules": [ + { + "rule": "eccmp.com/sts/scripts/conversen-SDK.js", + "domains": [ + "pch.com" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1344" + } + ] + }, "edgekey.net": { "rules": [ { @@ -5667,9 +5497,10 @@ "rule": "google-analytics.com/analytics.js", "domains": [ "doterra.com", - "easyjet.com" + "easyjet.com", + "worlddutyfree.com" ], - "reason": "doterra.com - For doterra.com/login/loading, the page shows a loading indicator and never redirects.,easyjet.com - Clicking 'Show Worldwide flights' after entering parameters for a worldwide flight in the flight viewing form does nothing." + "reason": "doterra.com - For doterra.com/login/loading, the page shows a loading indicator and never redirects.,easyjet.com - Clicking 'Show Worldwide flights' after entering parameters for a worldwide flight in the flight viewing form does nothing.,worlddutyfree.com - https://github.com/duckduckgo/privacy-configuration/issues/1380" }, { "rule": "www.google-analytics.com/plugins/ua/ecommerce.js", @@ -6193,7 +6024,8 @@ { "rule": "static.klaviyo.com/onsite/js/klaviyo.js", "domains": [ - "kidsguide.com" + "kidsguide.com", + "urbanebikes.com" ], "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1277" }, @@ -6216,6 +6048,13 @@ "andieswim.com" ], "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1285" + }, + { + "rule": "lightboxcdn.com/vendor/.*/user.js", + "domains": [ + "nascar.com" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1373" } ] }, @@ -6786,6 +6625,17 @@ } ] }, + "rokt.com": { + "rules": [ + { + "rule": "rokt.com/wsdk/integrations/snippet.js", + "domains": [ + "pch.com" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1344" + } + ] + }, "rumble.com": { "rules": [ { @@ -7020,6 +6870,34 @@ "royalcaribbean.com" ], "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1255" + }, + { + "rule": "tags.tiqcdn.com/utag/lbg/", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1334" + }, + { + "rule": "tags.tiqcdn.com/utag/pch/", + "domains": [ + "pch.com" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1344" + }, + { + "rule": "tags.tiqcdn.com/utag/tiqapp/utag.v.js", + "domains": [ + "oracle.com" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1353" + }, + { + "rule": "tags.tiqcdn.com/utag/politico/main/prod/utag.js", + "domains": [ + "politico.com" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1382" } ] }, @@ -7196,6 +7074,13 @@ "" ], "reason": "https://github.com/duckduckgo/privacy-configuration/issues/366" + }, + { + "rule": "yandex.ru/map-widget/", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1384" } ] }, @@ -7268,6 +7153,17 @@ } ] }, + "zopim.com": { + "rules": [ + { + "rule": "widget-mediator.zopim.com", + "domains": [ + "" + ], + "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1360" + } + ] + }, "citi.com": { "rules": [ { @@ -7329,6 +7225,17 @@ "reason": "CNAME ENTRY GENERATED FROM: qualtrics.com" } ] + }, + "yandex.tm": { + "rules": [ + { + "rule": "mc.yandex.tm/map-widget/", + "domains": [ + "" + ], + "reason": "CNAME ENTRY GENERATED FROM: yandex.ru" + } + ] } } }, @@ -7350,7 +7257,7 @@ "reason": "https://github.com/duckduckgo/privacy-configuration/issues/1085" } ], - "hash": "f9b5279848f985f769d973e76d09b28b" + "hash": "631ad08511317fe79ad266992d5a05a5" }, "trackingCookies1p": { "settings": { @@ -7560,17 +7467,25 @@ "state": "enabled", "features": { "rollout": { - "state": "disabled" + "state": "enabled", + "rollout": { + "steps": [ + { + "percent": 1 + }, + { + "percent": 5 + }, + { + "percent": 15 + } + ] + } } }, "exceptions": [], - "hash": "54776d4aa010391dc14a53ad69cd1777" + "hash": "39a36ca9002bd5aea4dd7b6bdb5b79d4" } }, - "unprotectedTemporary": [ - { - "domain": "vinted.fr", - "reason": "https://github.com/duckduckgo/privacy-configuration/issues/794" - } - ] + "unprotectedTemporary": [] } \ No newline at end of file diff --git a/scripts/update_embedded.sh b/scripts/update_embedded.sh index 892183b2c3..0001b6d31c 100755 --- a/scripts/update_embedded.sh +++ b/scripts/update_embedded.sh @@ -60,5 +60,6 @@ performUpdate() { rm -f "$TEMP_ETAG_FILENAME" } +# The following URLs shall match the ones in AppURLs.swift. Danger checks that the URLs match on every PR. If the code changes, the regex that Danger uses may need an update. performUpdate 'https://staticcdn.duckduckgo.com/trackerblocking/v5/current/ios-tds.json' "${base_dir}/Core/AppTrackerDataSetProvider.swift" "${base_dir}/Core/trackerData.json" -performUpdate 'https://staticcdn.duckduckgo.com/trackerblocking/config/v2/ios-config.json' "${base_dir}/Core/AppPrivacyConfigurationDataProvider.swift" "${base_dir}/Core/ios-config.json" +performUpdate 'https://staticcdn.duckduckgo.com/trackerblocking/config/v3/ios-config.json' "${base_dir}/Core/AppPrivacyConfigurationDataProvider.swift" "${base_dir}/Core/ios-config.json" From e119bad1c4a130d8d3deccc31c19ce16f4283ecc Mon Sep 17 00:00:00 2001 From: Lorenzo Mattei Date: Mon, 16 Oct 2023 17:14:10 +0200 Subject: [PATCH 17/28] Fix privacy tests (#2097) Co-authored-by: Lorenzo Mattei --- .maestro/privacy_tests/06_multi-tab.yaml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.maestro/privacy_tests/06_multi-tab.yaml b/.maestro/privacy_tests/06_multi-tab.yaml index cee868a46d..b55aa36cbc 100644 --- a/.maestro/privacy_tests/06_multi-tab.yaml +++ b/.maestro/privacy_tests/06_multi-tab.yaml @@ -70,10 +70,8 @@ tags: - tapOn: "Done" - assertVisible: text: "Publisher site" -- assertVisible: - id: "Tabs" -- tapOn: - id: "Tabs" +- assertVisible: Tab Switcher +- tapOn: Tab Switcher - assertVisible: id: "Add" - tapOn: From 62615496d6e4cc2c44a72107c4293473606e3e57 Mon Sep 17 00:00:00 2001 From: Christopher Brind Date: Mon, 16 Oct 2023 20:12:13 +0100 Subject: [PATCH 18/28] address bar position (#2072) --- Core/PixelEvent.swift | 8 +- Core/UserDefaultsPropertyWrapper.swift | 3 + DuckDuckGo.xcodeproj/project.pbxproj | 20 +- .../xcshareddata/swiftpm/Package.resolved | 4 +- DuckDuckGo/ActionMessageView.swift | 19 +- ...essBarPositionSettingsViewController.swift | 99 ++++++++ DuckDuckGo/AppDelegate.swift | 7 +- DuckDuckGo/AppSettings.swift | 3 +- DuckDuckGo/AppUserDefaults.swift | 17 +- .../Arrow-Down-Left-24.svg | 3 + .../Arrow-Down-Left-24.imageset/Contents.json | 16 ++ .../24px/Share-24.imageset/Contents.json | 2 +- .../24px/Share-24.imageset/Share-24.pdf | Bin 2300 -> 0 bytes .../24px/Share-24.imageset/Share-Apple-24.svg | 4 + DuckDuckGo/AutocompleteViewController.swift | 50 +++- .../AutocompleteViewControllerDelegate.swift | 1 + .../Base.lproj/DaxOnboarding.storyboard | 31 ++- DuckDuckGo/Base.lproj/OmniBar.xib | 9 +- DuckDuckGo/Base.lproj/Settings.storyboard | 180 ++++++++++---- DuckDuckGo/BlankSnapshot.storyboard | 106 -------- DuckDuckGo/BlankSnapshotViewController.swift | 109 +++++---- DuckDuckGo/BrowserChromeManager.swift | 2 +- .../BrowsingMenuViewController.swift | 12 +- DuckDuckGo/DarkTheme.swift | 19 +- DuckDuckGo/FavoritesOverlay.swift | 22 +- .../FullscreenDaxDialogViewController.swift | 29 ++- DuckDuckGo/LightTheme.swift | 18 +- DuckDuckGo/MainView.swift | 122 +++++++-- .../MainViewController+CookiesManaged.swift | 2 +- DuckDuckGo/MainViewController+Email.swift | 4 +- .../MainViewController+KeyCommands.swift | 4 +- DuckDuckGo/MainViewController.swift | 231 +++++++++++------- DuckDuckGo/OmniBar.swift | 35 ++- DuckDuckGo/SettingsViewController.swift | 34 ++- DuckDuckGo/SuggestionTableViewCell.swift | 10 +- DuckDuckGo/TabViewController.swift | 38 ++- ...bViewControllerBrowsingMenuExtension.swift | 22 +- ...ControllerLongPressBookmarkExtension.swift | 12 +- DuckDuckGo/Theme+DesignSystem.swift | 36 +++ DuckDuckGo/UserText.swift | 5 +- DuckDuckGo/en.lproj/Localizable.strings | 6 + DuckDuckGo/menu_dark.json | 2 +- DuckDuckGo/menu_light.json | 2 +- DuckDuckGoTests/AppSettingsMock.swift | 5 + DuckDuckGoTests/BarsAnimatorTests.swift | 2 +- LocalPackages/Waitlist/Package.swift | 2 +- 46 files changed, 925 insertions(+), 442 deletions(-) create mode 100644 DuckDuckGo/AddressBarPositionSettingsViewController.swift create mode 100644 DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Arrow-Down-Left-24.svg create mode 100644 DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Contents.json delete mode 100644 DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Share-24.pdf create mode 100644 DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Share-Apple-24.svg delete mode 100644 DuckDuckGo/BlankSnapshot.storyboard create mode 100644 DuckDuckGo/Theme+DesignSystem.swift diff --git a/Core/PixelEvent.swift b/Core/PixelEvent.swift index 1b1193ddc2..e3b1b8dc82 100644 --- a/Core/PixelEvent.swift +++ b/Core/PixelEvent.swift @@ -245,6 +245,9 @@ extension Pixel { case autofillJSPixelFired(_ pixel: AutofillUserScript.JSPixel) + case navigationbarPositionBottom + case navigationBarPositionTop + case secureVaultInitError case secureVaultError @@ -576,7 +579,10 @@ extension Pixel.Event { case .autocompleteSelectedLocal: return "m_au_l" case .autocompleteSelectedRemote: return "m_au_r" - + + case .navigationbarPositionBottom: return "m_seturlbar_bottom" + case .navigationBarPositionTop: return "m_seturlbar_top" + case .feedbackPositive: return "mfbs_positive_submit" case .feedbackNegativePrefix(category: let category): return "mfbs_negative_\(category)" diff --git a/Core/UserDefaultsPropertyWrapper.swift b/Core/UserDefaultsPropertyWrapper.swift index 0d657b9533..7949c231c3 100644 --- a/Core/UserDefaultsPropertyWrapper.swift +++ b/Core/UserDefaultsPropertyWrapper.swift @@ -99,6 +99,9 @@ public struct UserDefaultsWrapper { case syncEnvironment = "com.duckduckgo.ios.sync-environment" case networkProtectionDebugOptionAlwaysOnDisabled = "com.duckduckgo.network-protection.always-on.disabled" + + case addressBarPosition = "com.duckduckgo.ios.addressbarposition" + case showFullSiteAddress = "com.duckduckgo.ios.showfullsiteaddress" } private let key: Key diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index ecb3e45d5a..0f645d1aea 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -374,6 +374,7 @@ 853273B624FFE0BB00E3C778 /* WidgetKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 8512EA4E24ED30D20073EE19 /* WidgetKit.framework */; settings = {ATTRIBUTES = (Weak, ); }; }; 8536A1C8209AF2410050739E /* MockVariantManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8536A1C7209AF2410050739E /* MockVariantManager.swift */; }; 8536A1CA209AF6490050739E /* HomeRowReminderTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8536A1C9209AF6480050739E /* HomeRowReminderTests.swift */; }; + 8536A1FD2ACF114B003AC5BA /* Theme+DesignSystem.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8536A1FC2ACF114B003AC5BA /* Theme+DesignSystem.swift */; }; 85371D242121B9D500920548 /* new_tab.json in Resources */ = {isa = PBXBuildFile; fileRef = 85371D232121B9D400920548 /* new_tab.json */; }; 85372447220DD103009D09CD /* UIKeyCommandExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85372446220DD103009D09CD /* UIKeyCommandExtension.swift */; }; 85374D3821AC419800FF5A1E /* NavigationSearchHomeViewSectionRenderer.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85374D3721AC419800FF5A1E /* NavigationSearchHomeViewSectionRenderer.swift */; }; @@ -405,6 +406,7 @@ 85514FFD2372DA0100DBC528 /* ios13-home-row.mp4 in Resources */ = {isa = PBXBuildFile; fileRef = 85514FFC2372DA0000DBC528 /* ios13-home-row.mp4 */; }; 8551912724746EDC0010FDD0 /* SnapshotHelper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8551912624746EDC0010FDD0 /* SnapshotHelper.swift */; }; 85582E0029D7409700E9AE35 /* SyncSettingsViewController+PDFRendering.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85582DFF29D7409700E9AE35 /* SyncSettingsViewController+PDFRendering.swift */; }; + 855D45D32ACD7DD1008F7AC6 /* AddressBarPositionSettingsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 855D45D22ACD7DD1008F7AC6 /* AddressBarPositionSettingsViewController.swift */; }; 855D914D2063EF6A00C4B448 /* TabSwitcherTransition.swift in Sources */ = {isa = PBXBuildFile; fileRef = 855D914C2063EF6A00C4B448 /* TabSwitcherTransition.swift */; }; 8563A03C1F9288D600F04442 /* BrowserChromeManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8563A03B1F9288D600F04442 /* BrowserChromeManager.swift */; }; 8565A34B1FC8D96B00239327 /* LaunchTabNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8565A34A1FC8D96B00239327 /* LaunchTabNotification.swift */; }; @@ -501,7 +503,6 @@ 981CA7EA2617797500E119D5 /* MainViewController+AddFavoriteFlow.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981CA7E92617797500E119D5 /* MainViewController+AddFavoriteFlow.swift */; }; 981FED692201FE69008488D7 /* AutoClearSettingsScreenTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981FED682201FE69008488D7 /* AutoClearSettingsScreenTests.swift */; }; 981FED6E22025151008488D7 /* BlankSnapshotViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981FED6C22025151008488D7 /* BlankSnapshotViewController.swift */; }; - 981FED712202519C008488D7 /* BlankSnapshot.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 981FED702202519C008488D7 /* BlankSnapshot.storyboard */; }; 981FED7422046017008488D7 /* AutoClearTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981FED7322046017008488D7 /* AutoClearTests.swift */; }; 981FED76220464EF008488D7 /* AutoClearSettingsModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981FED75220464EF008488D7 /* AutoClearSettingsModel.swift */; }; 9820EAF522613CD30089094D /* WebProgressWorker.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9820EAF422613CD30089094D /* WebProgressWorker.swift */; }; @@ -1376,6 +1377,7 @@ 853273B124FF114700E3C778 /* DeepLinks.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeepLinks.swift; sourceTree = ""; }; 8536A1C7209AF2410050739E /* MockVariantManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MockVariantManager.swift; sourceTree = ""; }; 8536A1C9209AF6480050739E /* HomeRowReminderTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = HomeRowReminderTests.swift; sourceTree = ""; }; + 8536A1FC2ACF114B003AC5BA /* Theme+DesignSystem.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "Theme+DesignSystem.swift"; sourceTree = ""; }; 85371D232121B9D400920548 /* new_tab.json */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.json; path = new_tab.json; sourceTree = ""; }; 85372446220DD103009D09CD /* UIKeyCommandExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIKeyCommandExtension.swift; sourceTree = ""; }; 85374D3721AC419800FF5A1E /* NavigationSearchHomeViewSectionRenderer.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = NavigationSearchHomeViewSectionRenderer.swift; sourceTree = ""; }; @@ -1409,6 +1411,7 @@ 85519124247468580010FDD0 /* TrackerRadarIntegrationTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TrackerRadarIntegrationTests.swift; sourceTree = ""; }; 8551912624746EDC0010FDD0 /* SnapshotHelper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = SnapshotHelper.swift; path = fastlane/SnapshotHelper.swift; sourceTree = SOURCE_ROOT; }; 85582DFF29D7409700E9AE35 /* SyncSettingsViewController+PDFRendering.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "SyncSettingsViewController+PDFRendering.swift"; sourceTree = ""; }; + 855D45D22ACD7DD1008F7AC6 /* AddressBarPositionSettingsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddressBarPositionSettingsViewController.swift; sourceTree = ""; }; 855D914C2063EF6A00C4B448 /* TabSwitcherTransition.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabSwitcherTransition.swift; sourceTree = ""; }; 8563A03B1F9288D600F04442 /* BrowserChromeManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BrowserChromeManager.swift; sourceTree = ""; }; 8565A34A1FC8D96B00239327 /* LaunchTabNotification.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LaunchTabNotification.swift; sourceTree = ""; }; @@ -1544,7 +1547,6 @@ 981DCA992521EFAB00CD4C18 /* nb */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = nb; path = nb.lproj/Localizable.strings; sourceTree = ""; }; 981FED682201FE69008488D7 /* AutoClearSettingsScreenTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoClearSettingsScreenTests.swift; sourceTree = ""; }; 981FED6C22025151008488D7 /* BlankSnapshotViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BlankSnapshotViewController.swift; sourceTree = ""; }; - 981FED702202519C008488D7 /* BlankSnapshot.storyboard */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; path = BlankSnapshot.storyboard; sourceTree = ""; }; 981FED7322046017008488D7 /* AutoClearTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoClearTests.swift; sourceTree = ""; }; 981FED75220464EF008488D7 /* AutoClearSettingsModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AutoClearSettingsModel.swift; sourceTree = ""; }; 9820A5D522B1C0B20024E37C /* DDG Trace.tracetemplate */ = {isa = PBXFileReference; lastKnownFileType = file.bplist; path = "DDG Trace.tracetemplate"; sourceTree = ""; }; @@ -3684,19 +3686,20 @@ isa = PBXGroup; children = ( F1CDD3F11F16911700BE0581 /* AboutViewController.swift */, - 1E865AEF272042DB001C74F3 /* TextSizeSettingsViewController.swift */, + 855D45D22ACD7DD1008F7AC6 /* AddressBarPositionSettingsViewController.swift */, AA3D854623D9E88E00788410 /* AppIconSettingsCell.swift */, AA3D854423D9942200788410 /* AppIconSettingsViewController.swift */, 98F0FC1F21FF18E700CE77AB /* AutoClearSettingsViewController.swift */, + 1EE7C298294227EC0026C8CB /* AutoconsentSettingsViewController.swift */, + 02C57C4A2514FEFB009E5129 /* DoNotSellSettingsViewController.swift */, F456B3B425810BB900B79B90 /* FireButtonAnimationSettingsViewController.swift */, 85449EF423FDA02800512AAF /* KeyboardSettingsViewController.swift */, 8540BD5523D9E9C20057FDD2 /* PreserveLoginsSettingsViewController.swift */, F176699D1E40BC86003D3222 /* Settings.storyboard */, F1AB2B411E3F7D5C00868554 /* SettingsViewController.swift */, + 1E865AEF272042DB001C74F3 /* TextSizeSettingsViewController.swift */, 9881439B23326DC200573F7C /* ThemeSettingsViewController.swift */, 8531A08D1F9950E6000484F0 /* UnprotectedSitesViewController.swift */, - 02C57C4A2514FEFB009E5129 /* DoNotSellSettingsViewController.swift */, - 1EE7C298294227EC0026C8CB /* AutoconsentSettingsViewController.swift */, ); name = UI; sourceTree = ""; @@ -4067,6 +4070,7 @@ 98DA6EC92181E41F00E65433 /* ThemeManager.swift */, 98F3A1D9217B37200011A0D4 /* LightTheme.swift */, 98F3A1DB217B373E0011A0D4 /* DarkTheme.swift */, + 8536A1FC2ACF114B003AC5BA /* Theme+DesignSystem.swift */, ); name = Themes; sourceTree = ""; @@ -4933,7 +4937,6 @@ children = ( 984147B624F0264B00362052 /* Authentication.storyboard */, F1AE54E71F0425FC00D9A700 /* AuthenticationViewController.swift */, - 981FED702202519C008488D7 /* BlankSnapshot.storyboard */, 981FED6C22025151008488D7 /* BlankSnapshotViewController.swift */, F1CA3C3A1F045B65005FADB3 /* Authenticator.swift */, F1CA3C361F045878005FADB3 /* PrivacyStore.swift */, @@ -5709,7 +5712,6 @@ 1E16260B296845120004127F /* cookie-banner-illustration-animated.json in Resources */, AA4D6AD323DE4D27007E8790 /* AppIconPurple29x29@2x.png in Resources */, AA4D6AA123DE4CC4007E8790 /* AppIconBlue60x60@3x.png in Resources */, - 981FED712202519C008488D7 /* BlankSnapshot.storyboard in Resources */, 984147A824F0259000362052 /* Onboarding.storyboard in Resources */, AA4D6AF723DF0312007E8790 /* AppIconRed60x60@2x.png in Resources */, AA4D6AE923DE4D33007E8790 /* AppIconGreen29x29@3x.png in Resources */, @@ -6166,6 +6168,7 @@ F4147354283BF834004AA7A5 /* AutofillContentScopeFeatureToggles.swift in Sources */, 986DA94A24884B18004A7E39 /* WebViewTransition.swift in Sources */, 31B524572715BB23002225AB /* WebJSAlert.swift in Sources */, + 8536A1FD2ACF114B003AC5BA /* Theme+DesignSystem.swift in Sources */, F114C55B1E66EB020018F95F /* NibLoading.swift in Sources */, C10CB5F32A1A5BDF0048E503 /* AutofillViews.swift in Sources */, 982E5630222C3D5B008D861B /* FeedbackPickerViewController.swift in Sources */, @@ -6388,6 +6391,7 @@ 027F48782A4B663C001A1C6C /* AppTPFAQView.swift in Sources */, 02A4EACA29B0F464009BE006 /* AppTPToggleViewModel.swift in Sources */, 4B6484EE27FD1E350050A7A1 /* WindowsBrowserWaitlistDebugViewController.swift in Sources */, + 855D45D32ACD7DD1008F7AC6 /* AddressBarPositionSettingsViewController.swift in Sources */, F1D796EE1E7AF2EB0019D451 /* UIViewControllerExtension.swift in Sources */, 1EE411F12857C3640003FE64 /* TrackerAnimationImageProvider.swift in Sources */, 1E7A711C2934EEBC00B7EA19 /* OmniBarNotification.swift in Sources */, @@ -8978,7 +8982,7 @@ repositoryURL = "https://github.com/duckduckgo/DesignResourcesKit"; requirement = { kind = exactVersion; - version = 1.1.1; + version = 2.0.0; }; }; F486D2EF25069482002D07D7 /* XCRemoteSwiftPackageReference "Kingfisher" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index d12c93a90a..6b534cc924 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -42,8 +42,8 @@ "repositoryURL": "https://github.com/duckduckgo/DesignResourcesKit", "state": { "branch": null, - "revision": "5de78d59358ff60651b2cf9322c74a2297927b4e", - "version": "1.1.1" + "revision": "d7ea2561ec7624c224f52e1c9b349075ddf1c782", + "version": "2.0.0" } }, { diff --git a/DuckDuckGo/ActionMessageView.swift b/DuckDuckGo/ActionMessageView.swift index 37e86221b5..57ff705e6e 100644 --- a/DuckDuckGo/ActionMessageView.swift +++ b/DuckDuckGo/ActionMessageView.swift @@ -22,9 +22,9 @@ import UIKit extension ActionMessageView: NibLoading {} class ActionMessageView: UIView { - + enum PresentationLocation { - case withBottomBar + case withBottomBar(andAddressBarBottom: Bool) case withoutBottomBar } @@ -45,6 +45,11 @@ class ActionMessageView: UIView { return 70 } + + static var windowBottomPaddingWithAddressBar: CGFloat { + return windowBottomPaddingWithBottomBar + 52 + } + static var windowBottomPaddingWithoutBottomBar: CGFloat { return 0 } @@ -53,8 +58,8 @@ class ActionMessageView: UIView { private static func bottomPadding(for location: PresentationLocation) -> CGFloat { switch location { - case .withBottomBar: - return Constants.windowBottomPaddingWithBottomBar + case .withBottomBar(let isAddressBarBottom): + return isAddressBarBottom ? Constants.windowBottomPaddingWithAddressBar : Constants.windowBottomPaddingWithBottomBar case .withoutBottomBar: return Constants.windowBottomPaddingWithoutBottomBar } @@ -84,7 +89,7 @@ class ActionMessageView: UIView { static func present(message: NSAttributedString, numberOfLines: Int = 0, actionTitle: String? = nil, - presentationLocation: PresentationLocation = .withBottomBar, + presentationLocation: PresentationLocation = .withBottomBar(andAddressBarBottom: false), onAction: @escaping () -> Void = {}, onDidDismiss: @escaping () -> Void = {}) { let messageView = loadFromXib() @@ -100,7 +105,7 @@ class ActionMessageView: UIView { static func present(message: String, actionTitle: String? = nil, - presentationLocation: PresentationLocation = .withBottomBar, + presentationLocation: PresentationLocation = .withBottomBar(andAddressBarBottom: false), onAction: @escaping () -> Void = {}, onDidDismiss: @escaping () -> Void = {}) { let messageView = loadFromXib() @@ -116,7 +121,7 @@ class ActionMessageView: UIView { private static func present(messageView: ActionMessageView, message: String, actionTitle: String? = nil, - presentationLocation: PresentationLocation = .withBottomBar, + presentationLocation: PresentationLocation = .withBottomBar(andAddressBarBottom: false), onAction: @escaping () -> Void = {}, onDidDismiss: @escaping () -> Void = {}) { guard let window = UIApplication.shared.windows.filter({ $0.isKeyWindow }).first else { return } diff --git a/DuckDuckGo/AddressBarPositionSettingsViewController.swift b/DuckDuckGo/AddressBarPositionSettingsViewController.swift new file mode 100644 index 0000000000..b7df80ab5e --- /dev/null +++ b/DuckDuckGo/AddressBarPositionSettingsViewController.swift @@ -0,0 +1,99 @@ +// +// AddressBarPositionSettingsViewController.swift +// DuckDuckGo +// +// Copyright © 2023 DuckDuckGo. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import UIKit +import Core + +class AddressBarPositionSettingsViewController: UITableViewController { + + private lazy var appSettings = AppDependencyProvider.shared.appSettings + + private lazy var options = AddressBarPosition.allCases + + override func viewDidLoad() { + super.viewDidLoad() + + applyTheme(ThemeManager.shared.currentTheme) + } + + override func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { + return options.count + } + + override func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { + return tableView.dequeueReusableCell(withIdentifier: "Cell", for: indexPath) + } + + override func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) { + let theme = ThemeManager.shared.currentTheme + cell.backgroundColor = theme.tableCellBackgroundColor + cell.setHighlightedStateBackgroundColor(theme.tableCellHighlightedBackgroundColor) + + cell.tintColor = theme.buttonTintColor + cell.textLabel?.textColor = theme.tableCellTextColor + + cell.textLabel?.text = options[indexPath.row].descriptionText + cell.accessoryType = appSettings.currentAddressBarPosition.descriptionText == cell.textLabel?.text ? .checkmark : .none + } + + override func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { + appSettings.currentAddressBarPosition = AddressBarPosition.allCases[indexPath.row] + + switch appSettings.currentAddressBarPosition { + case .top: + Pixel.fire(pixel: .navigationBarPositionTop) + case .bottom: + Pixel.fire(pixel: .navigationbarPositionBottom) + } + + tableView.performBatchUpdates { + tableView.reloadSections(IndexSet(integer: 0), with: .automatic) + tableView.deselectRow(at: indexPath, animated: true) + } + } +} + +extension AddressBarPositionSettingsViewController: Themable { + + func decorate(with theme: Theme) { + + tableView.backgroundColor = theme.backgroundColor + tableView.separatorColor = theme.tableCellSeparatorColor + + tableView.reloadData() + } +} + +enum AddressBarPosition: String, CaseIterable { + case top + case bottom + + var isBottom: Bool { + self == .bottom + } + + var descriptionText: String { + switch self { + case .top: + return UserText.addressBarPositionTop + case .bottom: + return UserText.addressBarPositionBottom + } + } +} diff --git a/DuckDuckGo/AppDelegate.swift b/DuckDuckGo/AppDelegate.swift index 604b6db7f2..8707bce4f6 100644 --- a/DuckDuckGo/AppDelegate.swift +++ b/DuckDuckGo/AppDelegate.swift @@ -214,7 +214,8 @@ class AppDelegate: UIResponder, UIApplicationDelegate { bookmarksDatabaseCleaner: syncDataProviders.bookmarksAdapter.databaseCleaner, appTrackingProtectionDatabase: appTrackingProtectionDatabase, syncService: syncService, - syncDataProviders: syncDataProviders) + syncDataProviders: syncDataProviders, + appSettings: AppDependencyProvider.shared.appSettings) main.loadViewIfNeeded() window = UIWindow(frame: UIScreen.main.bounds) @@ -543,9 +544,9 @@ class AppDelegate: UIResponder, UIApplicationDelegate { overlayWindow = UIWindow(frame: frame) overlayWindow?.windowLevel = UIWindow.Level.alert - let overlay = BlankSnapshotViewController.loadFromStoryboard() + let overlay = BlankSnapshotViewController(appSettings: AppDependencyProvider.shared.appSettings) overlay.delegate = self - + overlayWindow?.rootViewController = overlay overlayWindow?.makeKeyAndVisible() window?.isHidden = true diff --git a/DuckDuckGo/AppSettings.swift b/DuckDuckGo/AppSettings.swift index d79c06e746..45b1354046 100644 --- a/DuckDuckGo/AppSettings.swift +++ b/DuckDuckGo/AppSettings.swift @@ -31,7 +31,8 @@ protocol AppSettings: AnyObject { var sendDoNotSell: Bool { get set } var currentFireButtonAnimation: FireButtonAnimationType { get set } - + var currentAddressBarPosition: AddressBarPosition { get set } + var textSize: Int { get set } var autofillCredentialsEnabled: Bool { get set } diff --git a/DuckDuckGo/AppUserDefaults.swift b/DuckDuckGo/AppUserDefaults.swift index 0a7d98d880..efbfe51d59 100644 --- a/DuckDuckGo/AppUserDefaults.swift +++ b/DuckDuckGo/AppUserDefaults.swift @@ -30,6 +30,7 @@ public class AppUserDefaults: AppSettings { public static let autofillEnabledChange = Notification.Name("com.duckduckgo.app.AutofillEnabledChange") public static let didVerifyInternalUser = Notification.Name("com.duckduckgo.app.DidVerifyInternalUser") public static let inspectableWebViewsToggled = Notification.Name("com.duckduckgo.app.DidToggleInspectableWebViews") + public static let addressBarPositionChanged = Notification.Name("com.duckduckgo.app.AddressBarPositionChanged") } private let groupName: String @@ -176,7 +177,21 @@ public class AppUserDefaults: AppSettings { userDefaults?.setValue(newValue.rawValue, forKey: Keys.currentFireButtonAnimationKey) } } - + + @UserDefaultsWrapper(key: .addressBarPosition, defaultValue: nil) + private var addressBarPositionStorage: String? + + var currentAddressBarPosition: AddressBarPosition { + get { + return AddressBarPosition(rawValue: addressBarPositionStorage?.lowercased() ?? "") ?? .top + } + + set { + addressBarPositionStorage = newValue.rawValue + NotificationCenter.default.post(name: Notifications.addressBarPositionChanged, object: currentAddressBarPosition) + } + } + @UserDefaultsWrapper(key: .textSize, defaultValue: 100) var textSize: Int diff --git a/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Arrow-Down-Left-24.svg b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Arrow-Down-Left-24.svg new file mode 100644 index 0000000000..a2d3aa85a9 --- /dev/null +++ b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Arrow-Down-Left-24.svg @@ -0,0 +1,3 @@ + + + diff --git a/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Contents.json b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Contents.json new file mode 100644 index 0000000000..e7a4bdced3 --- /dev/null +++ b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Arrow-Down-Left-24.imageset/Contents.json @@ -0,0 +1,16 @@ +{ + "images" : [ + { + "filename" : "Arrow-Down-Left-24.svg", + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + }, + "properties" : { + "preserves-vector-representation" : true, + "template-rendering-intent" : "template" + } +} diff --git a/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Contents.json b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Contents.json index baf2e36c14..75bb7a584e 100644 --- a/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Contents.json +++ b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Contents.json @@ -1,7 +1,7 @@ { "images" : [ { - "filename" : "Share-24.pdf", + "filename" : "Share-Apple-24.svg", "idiom" : "universal" } ], diff --git a/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Share-24.pdf b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Share-24.pdf deleted file mode 100644 index 0031e2fa919d01be6aeeaf624dfa25145467550a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2300 zcmb7`O>Y}F5Qgvk6}%Wo4q9>eO&|!+*hx{eMI5EKpa*rmaTHj)t)vube|=tZm&0{k zpy(cq(Zk_zzR2;_?aiAFbwLP{N>0Ch7E-==Az!`}!+4i}3ccprpN8@N@<|%NUDi5Z zPQ(5vwl~9{hkn?7|4LrJU;paQ;txTcDxXwU*s#QFx~_%J&D#A@u-a4M+>au4#zWUh za-H_kl99&@tqBwhbT%52KsrP}BddZn8IiV87cK26knDx-l1bh~tZE&#Qt|=JnP9z@ zv5Pk05D7w2M-QUON0mS#R+N#Ui)6iVuw^N; zgMIDIT-RV+%nqu~2b73RpHM7g0{bV;Kk(6qt3kTSI@;nb{& z?nwm6)qVx5rDK-s8I4h>VpB};#`)xnJ(pBUC>^@YxMI#kAE2MN+Th5SbB(h`>0DxR zKFoRquk+R?m!KD)#78lTcmMnHk*P8K_wC~wyJ6{w>$2nkugcPmRND=xCa4Mx^|bVeoeixpIth1vHnqa~ zUrt&vb_owm(`4`Q#5CHHhK|UW)WX&33Gp+~7(9)0-uzlK);%q8(5n&g*=2X7>}LtH z(ufOcU4A?BRV~tn{a9s*Sua{f8RmC1CiE~;&yd~N@F5McH~Cqv&am{r9i9i(GKK2M z%F}5cW#nDrNoE;i!fn4B$LVsGAAZHe!?*qAuipo`z1`mr3;21sJM3RgU*(7PPI93% z$JnH5X*ZmwFQ9EpFviZ{3A;_z%w7%0>9p0_7Btjv$!$+ZH5Oe&klFb=cH_R i({zzJ;F93&`@`P@yf6Q!>`#{xj#eRxtE<;<-+Tj}ZPiZz diff --git a/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Share-Apple-24.svg b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Share-Apple-24.svg new file mode 100644 index 0000000000..4615b33b2c --- /dev/null +++ b/DuckDuckGo/Assets.xcassets/DesignSystemIcons/24px/Share-24.imageset/Share-Apple-24.svg @@ -0,0 +1,4 @@ + + + + diff --git a/DuckDuckGo/AutocompleteViewController.swift b/DuckDuckGo/AutocompleteViewController.swift index 6113b67a2d..cc13fc7ead 100644 --- a/DuckDuckGo/AutocompleteViewController.swift +++ b/DuckDuckGo/AutocompleteViewController.swift @@ -43,9 +43,17 @@ class AutocompleteViewController: UIViewController { private var bookmarksSearch: BookmarksStringSearch! + private var appSettings: AppSettings! + + var backgroundColor: UIColor { + appSettings.currentAddressBarPosition.isBottom ? + UIColor(designSystemColor: .background) : + UIColor.black.withAlphaComponent(0.2) + } + var showBackground = true { didSet { - view.backgroundColor = showBackground ? UIColor.black.withAlphaComponent(0.2) : UIColor.clear + view.backgroundColor = showBackground ? backgroundColor : UIColor.clear } } @@ -61,12 +69,15 @@ class AutocompleteViewController: UIViewController { @IBOutlet weak var tableView: UITableView! var shouldOffsetY = false - static func loadFromStoryboard(bookmarksSearch: BookmarksStringSearch) -> AutocompleteViewController { + static func loadFromStoryboard(bookmarksSearch: BookmarksStringSearch, + appSettings: AppSettings = AppDependencyProvider.shared.appSettings) -> AutocompleteViewController { let storyboard = UIStoryboard(name: "Autocomplete", bundle: nil) + guard let controller = storyboard.instantiateInitialViewController() as? AutocompleteViewController else { fatalError("Failed to instatiate correct Autocomplete view controller") } controller.bookmarksSearch = bookmarksSearch + controller.appSettings = appSettings return controller } @@ -101,13 +112,18 @@ class AutocompleteViewController: UIViewController { override func viewWillDisappear(_ animated: Bool) { super.viewWillDisappear(animated) - resetNaviagtionBar() + resetNavigationBar() } - private func resetNaviagtionBar() { + private func resetNavigationBar() { navigationController?.hidesBarsOnSwipe = hidesBarsOnSwipeDefault } + override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { + super.traitCollectionDidChange(previousTraitCollection) + tableView.reloadData() + } + func updateQuery(query: String) { self.query = query selectedItem = -1 @@ -210,12 +226,16 @@ extension AutocompleteViewController: UITableViewDataSource { let currentTheme = ThemeManager.shared.currentTheme - cell.updateFor(query: query, suggestion: suggestions[indexPath.row], with: currentTheme) + cell.updateFor(query: query, + suggestion: suggestions[indexPath.row], + with: currentTheme, + isAddressBarAtBottom: appSettings.currentAddressBarPosition.isBottom) cell.plusButton.tag = indexPath.row - let color = indexPath.row == selectedItem ? currentTheme.tableCellSelectedColor : UIColor(designSystemColor: .panel) - - cell.backgroundColor = color + let baseBackgroundColor = isPad ? UIColor(designSystemColor: .panel) : UIColor(designSystemColor: .background) + let backgroundColor = indexPath.row == selectedItem ? currentTheme.tableCellSelectedColor : baseBackgroundColor + + cell.backgroundColor = backgroundColor cell.tintColor = currentTheme.autocompleteCellAccessoryColor cell.setHighlightedStateBackgroundColor(currentTheme.tableCellHighlightedBackgroundColor) @@ -229,14 +249,24 @@ extension AutocompleteViewController: UITableViewDataSource { } let currentTheme = ThemeManager.shared.currentTheme - cell.backgroundColor = UIColor(designSystemColor: .panel) + cell.backgroundColor = appSettings.currentAddressBarPosition.isBottom ? + UIColor(designSystemColor: .background) : + UIColor(designSystemColor: .panel) + cell.tintColor = currentTheme.autocompleteCellAccessoryColor cell.label?.textColor = currentTheme.tableCellTextColor cell.setHighlightedStateBackgroundColor(currentTheme.tableCellHighlightedBackgroundColor) - + return cell } + func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { + if appSettings.currentAddressBarPosition.isBottom && suggestions.isEmpty { + return view.frame.height + } + return 46 + } + func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { return receivedResponse ? max(Constants.minItems, suggestions.count) : 0 } diff --git a/DuckDuckGo/AutocompleteViewControllerDelegate.swift b/DuckDuckGo/AutocompleteViewControllerDelegate.swift index d345970988..fbb0b6d9fb 100644 --- a/DuckDuckGo/AutocompleteViewControllerDelegate.swift +++ b/DuckDuckGo/AutocompleteViewControllerDelegate.swift @@ -28,6 +28,7 @@ protocol AutocompleteViewControllerDelegate: AnyObject { func autocomplete(pressedPlusButtonForSuggestion suggestion: Suggestion) func autocompleteWasDismissed() + } protocol AutocompleteViewControllerPresentationDelegate: AnyObject { diff --git a/DuckDuckGo/Base.lproj/DaxOnboarding.storyboard b/DuckDuckGo/Base.lproj/DaxOnboarding.storyboard index f9ac8b1264..f95f44d472 100644 --- a/DuckDuckGo/Base.lproj/DaxOnboarding.storyboard +++ b/DuckDuckGo/Base.lproj/DaxOnboarding.storyboard @@ -1,9 +1,9 @@ - + - + @@ -149,7 +149,7 @@ DuckDuckGo! - + @@ -161,7 +161,7 @@ DuckDuckGo! - +