From f055f1403d04f9843786e78dcbf738d763f04ed9 Mon Sep 17 00:00:00 2001 From: Diego Rey Mendez Date: Fri, 28 Jul 2023 10:00:23 +0200 Subject: [PATCH 1/3] Fixes the wiring on some outlets (#1405) Task/Issue URL: https://app.asana.com/0/0/1205158222182990/f ## Description: Wires two outlets that weren't wired and changed their declaration to crash when unwired by request of @mallexxx --- DuckDuckGo/Menus/MainMenu.storyboard | 4 ++++ .../NetworkProtectionSimulateFailureMenu.swift | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/DuckDuckGo/Menus/MainMenu.storyboard b/DuckDuckGo/Menus/MainMenu.storyboard index a5c6e71fe0..cf39040135 100644 --- a/DuckDuckGo/Menus/MainMenu.storyboard +++ b/DuckDuckGo/Menus/MainMenu.storyboard @@ -889,6 +889,10 @@ CQ + + + + diff --git a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionSimulateFailureMenu.swift b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionSimulateFailureMenu.swift index a2bca99a10..32bda4396f 100644 --- a/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionSimulateFailureMenu.swift +++ b/DuckDuckGo/NetworkProtection/AppTargets/BothAppTargets/NetworkProtectionSimulateFailureMenu.swift @@ -31,8 +31,8 @@ final class NetworkProtectionSimulateFailureMenu: NSMenu { /// @objc final class NetworkProtectionSimulateFailureMenu: NSMenu { - @IBOutlet weak var simulateControllerFailureMenuItem: NSMenuItem? - @IBOutlet weak var simulateTunnelFailureMenuItem: NSMenuItem? + @IBOutlet weak var simulateControllerFailureMenuItem: NSMenuItem! + @IBOutlet weak var simulateTunnelFailureMenuItem: NSMenuItem! private var simulationOptions: NetworkProtectionSimulationOptions { NetworkProtectionTunnelController.simulationOptions @@ -53,8 +53,8 @@ final class NetworkProtectionSimulateFailureMenu: NSMenu { } override func update() { - simulateControllerFailureMenuItem?.state = simulationOptions.isEnabled(.controllerFailure) ? .on : .off - simulateTunnelFailureMenuItem?.state = simulationOptions.isEnabled(.tunnelFailure) ? .on : .off + simulateControllerFailureMenuItem.state = simulationOptions.isEnabled(.controllerFailure) ? .on : .off + simulateTunnelFailureMenuItem.state = simulationOptions.isEnabled(.tunnelFailure) ? .on : .off } } From 7d7d2cb20622a13e6286fd8066157470a4a8afd6 Mon Sep 17 00:00:00 2001 From: Diego Rey Mendez Date: Fri, 28 Jul 2023 13:35:27 +0200 Subject: [PATCH 2/3] Changes the NetP feature description (#1367) Task/Issue URL: https://app.asana.com/0/1203137811378537/1205073879356076/f ## Description: Changes the Network Protection feature description in the popover. Screenshot 2023-07-19 at 13 00 27 --- DuckDuckGo/Common/Localizables/UserText+NetworkProtection.swift | 2 +- .../Extensions/UserText+NetworkProtectionUI.swift | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DuckDuckGo/Common/Localizables/UserText+NetworkProtection.swift b/DuckDuckGo/Common/Localizables/UserText+NetworkProtection.swift index de4888f749..329b977ed7 100644 --- a/DuckDuckGo/Common/Localizables/UserText+NetworkProtection.swift +++ b/DuckDuckGo/Common/Localizables/UserText+NetworkProtection.swift @@ -33,7 +33,7 @@ extension UserText { static let networkProtectionInviteDialogMessage = NSLocalizedString("network.protection.invite.dialog.message", value: "Enter your invite code to get started.", comment: "Message for the network protection invite dialog") static let networkProtectionInviteFieldPrompt = NSLocalizedString("network.protection.invite.field.prompt", value: "Code", comment: "Prompt for the network protection invite code text field") static let networkProtectionInviteSuccessTitle = NSLocalizedString("network.protection.invite.success.title", value: "Success! You’re in.", comment: "Title for the network protection invite success view") - static let networkProtectionInviteSuccessMessage = NSLocalizedString("network.protection.invite.success.title", value: "Hide your location from websites and conceal your online activity from Internet providers and others on your network.", comment: "Message for the network protection invite success view") + static let networkProtectionInviteSuccessMessage = NSLocalizedString("network.protection.invite.success.title", value: "DuckDuckGo's VPN secures all of your device's Internet traffic anytime, anywhere.", comment: "Message for the network protection invite success view") // MARK: - Navigation Bar Status View diff --git a/LocalPackages/NetworkProtectionUI/Sources/NetworkProtectionUI/Extensions/UserText+NetworkProtectionUI.swift b/LocalPackages/NetworkProtectionUI/Sources/NetworkProtectionUI/Extensions/UserText+NetworkProtectionUI.swift index e70210bcba..ae5f5e67df 100644 --- a/LocalPackages/NetworkProtectionUI/Sources/NetworkProtectionUI/Extensions/UserText+NetworkProtectionUI.swift +++ b/LocalPackages/NetworkProtectionUI/Sources/NetworkProtectionUI/Extensions/UserText+NetworkProtectionUI.swift @@ -19,7 +19,7 @@ import Foundation final class UserText { - static let networkProtectionStatusViewFeatureDesc = NSLocalizedString("network.protection.status.view.feature.description", value: "Hide your location from websites and conceal your online activity from Internet providers and others on your network.", comment: "Feature description shown in NetworkProtection's status view.") + static let networkProtectionStatusViewFeatureDesc = NSLocalizedString("network.protection.status.view.feature.description", value: "DuckDuckGo's VPN secures all of your device's Internet traffic anytime, anywhere.", comment: "Feature description shown in NetworkProtection's status view.") static let networkProtectionStatusViewConnDetails = NSLocalizedString("network.protection.status.view.connection.details", value: "Connection Details", comment: "Connection details label shown in NetworkProtection's status view.") static let networkProtectionStatusViewConnLabel = NSLocalizedString("network.protection.status.view.connection.label", value: "Network Protection", comment: "Connection label shown in NetworkProtection's status view.") static let networkProtectionStatusViewLocation = NSLocalizedString("network.protection.status.view.location", value: "Location", comment: "Location label shown in NetworkProtection's status view.") From 46435ec06cf00eab0586d9f01350f763370a37fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Fri, 28 Jul 2023 15:33:53 +0200 Subject: [PATCH 3/3] Add new attribution pixel (#1388) Task/Issue URL: https://app.asana.com/0/414235014887631/1203017403159775/f Description: Class that aggregates detected Ad Attributions on a websites and stores that count over a certain time interval. --- DuckDuckGo.xcodeproj/project.pbxproj | 2 +- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- DuckDuckGo/ContentBlocker/ContentBlocking.swift | 2 ++ DuckDuckGo/Statistics/PixelEvent.swift | 4 ++++ DuckDuckGo/Statistics/PixelParameters.swift | 1 + LocalPackages/NetworkProtectionUI/Package.swift | 2 +- 6 files changed, 11 insertions(+), 4 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index c6c7794c48..28a27e75d1 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -10108,7 +10108,7 @@ repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 70.0.0; + version = 71.0.0; }; }; AA06B6B52672AF8100F541C5 /* XCRemoteSwiftPackageReference "Sparkle" */ = { diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index a97c0ab90f..d3871f39c7 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -14,8 +14,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { - "revision" : "214db1a9aceb643cbb5bf070b61d8f65ec196e1c", - "version" : "70.0.0" + "revision" : "f255099c2c373d7b0c484849b8903831e7b717ce", + "version" : "71.0.0" } }, { diff --git a/DuckDuckGo/ContentBlocker/ContentBlocking.swift b/DuckDuckGo/ContentBlocker/ContentBlocking.swift index 1b897202b9..d29026d189 100644 --- a/DuckDuckGo/ContentBlocker/ContentBlocking.swift +++ b/DuckDuckGo/ContentBlocker/ContentBlocking.swift @@ -156,6 +156,8 @@ final class AppContentBlocking { domainEvent = .adClickAttributionDetected case .adAttributionActive: domainEvent = .adClickAttributionActive + case .adAttributionPageLoads: + domainEvent = .adClickAttributionPageLoads } Pixel.fire(domainEvent, withAdditionalParameters: parameters ?? [:]) diff --git a/DuckDuckGo/Statistics/PixelEvent.swift b/DuckDuckGo/Statistics/PixelEvent.swift index af04c0eff5..5b80377b68 100644 --- a/DuckDuckGo/Statistics/PixelEvent.swift +++ b/DuckDuckGo/Statistics/PixelEvent.swift @@ -101,6 +101,7 @@ extension Pixel { case adClickAttributionDetected case adClickAttributionActive + case adClickAttributionPageLoads case emailEnabled case emailDisabled @@ -312,6 +313,9 @@ extension Pixel.Event { case .adClickAttributionActive: return "m_mac_ad_click_active" + case .adClickAttributionPageLoads: + return "m_mac_ad_click_page_loads" + // Deliberately omit the `m_mac_` prefix in order to format these pixels the same way as other platforms case .emailEnabled: return "email_enabled_macos_desktop" case .emailDisabled: return "email_disabled_macos_desktop" diff --git a/DuckDuckGo/Statistics/PixelParameters.swift b/DuckDuckGo/Statistics/PixelParameters.swift index 24037a2476..da9faa3967 100644 --- a/DuckDuckGo/Statistics/PixelParameters.swift +++ b/DuckDuckGo/Statistics/PixelParameters.swift @@ -99,6 +99,7 @@ extension Pixel.Event { .ampBlockingRulesCompilationFailed, .adClickAttributionDetected, .adClickAttributionActive, + .adClickAttributionPageLoads, .emailEnabled, .emailDisabled, .emailUserCreatedAlias, diff --git a/LocalPackages/NetworkProtectionUI/Package.swift b/LocalPackages/NetworkProtectionUI/Package.swift index a8589f871c..979fe27504 100644 --- a/LocalPackages/NetworkProtectionUI/Package.swift +++ b/LocalPackages/NetworkProtectionUI/Package.swift @@ -18,7 +18,7 @@ let package = Package( dependencies: [ // Dependencies declare other packages that this package depends on. // .package(url: /* package url */, from: "1.0.0"), - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "70.0.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "71.0.0"), .package(path: "../SwiftUIExtensions") ], targets: [