From fc48dde5db3836f4712e2587f28d5838ff94914a Mon Sep 17 00:00:00 2001 From: Marcos Gurgel Date: Mon, 18 Nov 2024 20:50:00 +0000 Subject: [PATCH 01/11] Latest breakage flow --- DuckDuckGo.xcodeproj/project.pbxproj | 2 + .../xcshareddata/swiftpm/Package.resolved | 189 +++++++++++++++++- .../View/PrivacyDashboardViewController.swift | 3 +- 3 files changed, 184 insertions(+), 10 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index a0e108064b..d3c33cceb9 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -4323,6 +4323,7 @@ 85F487B4276A8F2E003CE668 /* OnboardingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingTests.swift; sourceTree = ""; }; 85F69B3B25EDE81F00978E59 /* URLExtensionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLExtensionTests.swift; sourceTree = ""; }; 85F91D9327F47BC40096B1C8 /* History 5.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "History 5.xcdatamodel"; sourceTree = ""; }; + 8DF602922CEBDD4A00B43AE0 /* privacy-dashboard */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "privacy-dashboard"; path = "../privacy-dashboard"; sourceTree = SOURCE_ROOT; }; 9812D894276CEDA5004B6181 /* ContentBlockerRulesLists.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentBlockerRulesLists.swift; sourceTree = ""; }; 9826B09F2747DF3D0092F683 /* ContentBlocking.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentBlocking.swift; sourceTree = ""; }; 9826B0A12747DFEB0092F683 /* AppPrivacyConfigurationDataProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppPrivacyConfigurationDataProvider.swift; sourceTree = ""; }; @@ -6034,6 +6035,7 @@ 3772BEDF2D01A1400019B9EF /* Utilities */, 3720B7F82D00DA4500D20F23 /* WebKitExtensions */, 7B76E6852AD5D77600186A84 /* XPCHelper */, + 8DF602922CEBDD4A00B43AE0 /* privacy-dashboard */, ); path = LocalPackages; sourceTree = ""; diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 37df82613b..5fb3bfc98b 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,12 +1,185 @@ { - "pins" : [ - { - "identity" : "apple-toolbox", - "kind" : "remoteSourceControl", - "location" : "https://github.com/duckduckgo/apple-toolbox.git", - "state" : { - "revision" : "0c13c5f056805f2d403618ccc3bfb833c303c68d", - "version" : "3.1.2" + "object": { + "pins": [ + { + "package": "AppleToolbox", + "repositoryURL": "https://github.com/duckduckgo/apple-toolbox.git", + "state": { + "branch": null, + "revision": "0c13c5f056805f2d403618ccc3bfb833c303c68d", + "version": "3.1.2" + } + }, + { + "package": "BareBonesBrowserKit", + "repositoryURL": "https://github.com/duckduckgo/BareBonesBrowser.git", + "state": { + "branch": null, + "revision": "31e5bfedc3c2ca005640c4bf2b6959d69b0e18b9", + "version": "0.1.0" + } + }, + { + "package": "BloomFilter", + "repositoryURL": "https://github.com/duckduckgo/bloom_cpp.git", + "state": { + "branch": null, + "revision": "8076199456290b61b4544bf2f4caf296759906a0", + "version": "3.0.0" + } + }, + { + "package": "BrowserServicesKit", + "repositoryURL": "https://github.com/duckduckgo/BrowserServicesKit", + "state": { + "branch": "mgurgel/new-breakage-form", + "revision": "bb0d926828f6978b3ff717ded8db34947efcd5a7", + "version": null + } + }, + { + "package": "ContentScopeScripts", + "repositoryURL": "https://github.com/duckduckgo/content-scope-scripts", + "state": { + "branch": null, + "revision": "32c3e2bce3cc20a079d96b3ee23a9cde5d2337c3", + "version": "6.35.0" + } + }, + { + "package": "Autofill", + "repositoryURL": "https://github.com/duckduckgo/duckduckgo-autofill.git", + "state": { + "branch": null, + "revision": "c992041d16ec10d790e6204dce9abf9966d1363c", + "version": "15.1.0" + } + }, + { + "package": "GRDB", + "repositoryURL": "https://github.com/duckduckgo/GRDB.swift.git", + "state": { + "branch": null, + "revision": "5b2f6a81099d26ae0f9e38788f51490cd6a4b202", + "version": "2.4.2" + } + }, + { + "package": "Gzip", + "repositoryURL": "https://github.com/1024jp/GzipSwift.git", + "state": { + "branch": null, + "revision": "731037f6cc2be2ec01562f6597c1d0aa3fe6fd05", + "version": "6.0.1" + } + }, + { + "package": "Lottie", + "repositoryURL": "https://github.com/airbnb/lottie-spm.git", + "state": { + "branch": null, + "revision": "1d29eccc24cc8b75bff9f6804155112c0ffc9605", + "version": "4.4.3" + } + }, + { + "package": "OHHTTPStubs", + "repositoryURL": "https://github.com/AliSoftware/OHHTTPStubs.git", + "state": { + "branch": null, + "revision": "12f19662426d0434d6c330c6974d53e2eb10ecd9", + "version": "9.1.0" + } + }, + { + "package": "OpenSSL", + "repositoryURL": "https://github.com/duckduckgo/OpenSSL-XCFramework", + "state": { + "branch": null, + "revision": "71d303cbfa150e1fac99ffc7b4f67aad9c7a5002", + "version": "3.1.5004" + } + }, + { + "package": "Punycode", + "repositoryURL": "https://github.com/gumob/PunycodeSwift.git", + "state": { + "branch": null, + "revision": "30a462bdb4398ea835a3585472229e0d74b36ba5", + "version": "3.0.0" + } + }, + { + "package": "Sparkle", + "repositoryURL": "https://github.com/sparkle-project/Sparkle.git", + "state": { + "branch": null, + "revision": "b456fd404954a9e13f55aa0c88cd5a40b8399638", + "version": "2.6.3" + } + }, + { + "package": "swift-argument-parser", + "repositoryURL": "https://github.com/apple/swift-argument-parser.git", + "state": { + "branch": null, + "revision": "0fbc8848e389af3bb55c182bc19ca9d5dc2f255b", + "version": "1.4.0" + } + }, + { + "package": "swift-snapshot-testing", + "repositoryURL": "https://github.com/pointfreeco/swift-snapshot-testing", + "state": { + "branch": null, + "revision": "5b0c434778f2c1a4c9b5ebdb8682b28e84dd69bd", + "version": "1.15.4" + } + }, + { + "package": "swift-syntax", + "repositoryURL": "https://github.com/apple/swift-syntax", + "state": { + "branch": null, + "revision": "64889f0c732f210a935a0ad7cda38f77f876262d", + "version": "509.1.1" + } + }, + { + "package": "Swifter", + "repositoryURL": "https://github.com/httpswift/swifter.git", + "state": { + "branch": null, + "revision": "9483a5d459b45c3ffd059f7b55f9638e268632fd", + "version": "1.5.0" + } + }, + { + "package": "DDGSyncCrypto", + "repositoryURL": "https://github.com/duckduckgo/sync_crypto", + "state": { + "branch": null, + "revision": "0c8bf3c0e75591bc366407b9d7a73a9fcfc7736f", + "version": "0.3.0" + } + }, + { + "package": "TrackerRadarKit", + "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit", + "state": { + "branch": null, + "revision": "5de0a610a7927b638a5fd463a53032c9934a2c3b", + "version": "3.0.0" + } + }, + { + "package": "WireGuardKit", + "repositoryURL": "https://github.com/duckduckgo/wireguard-apple", + "state": { + "branch": null, + "revision": "13fd026384b1af11048451061cc1b21434990668", + "version": "1.1.3" + } } }, { diff --git a/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift b/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift index efeb045455..dd2b5360bd 100644 --- a/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift +++ b/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift @@ -34,7 +34,7 @@ final class PrivacyDashboardViewController: NSViewController { struct Constants { static let initialContentHeight: CGFloat = 489.0 - static let reportBrokenSiteInitialContentHeight = 587.0 + 28.0 + static let reportBrokenSiteInitialContentHeight = 587c.0 + 28.0 static let initialContentWidth: CGFloat = 360.0 } @@ -81,7 +81,6 @@ final class PrivacyDashboardViewController: NSViewController { let toggleReportingManager = ToggleReportingManager(feature: toggleReportingFeature) self.privacyDashboardController = PrivacyDashboardController(privacyInfo: privacyInfo, entryPoint: entryPoint, - variant: .control, toggleReportingManager: toggleReportingManager, eventMapping: eventMapping) super.init(nibName: nil, bundle: nil) From dd58f83e8870969fa733fb5e000f8fa58ac41fc1 Mon Sep 17 00:00:00 2001 From: Marcos Gurgel Date: Wed, 20 Nov 2024 14:20:03 +0000 Subject: [PATCH 02/11] Loading feedback form from Privacy Dashboard --- .../View/PrivacyDashboardViewController.swift | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift b/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift index dd2b5360bd..49798e9f9b 100644 --- a/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift +++ b/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift @@ -250,7 +250,10 @@ extension PrivacyDashboardViewController: PrivacyDashboardControllerDelegate { } func privacyDashboardControllerDidRequestShowGeneralFeedback(_ privacyDashboardController: PrivacyDashboardController) { - // Not used in macOS + DispatchQueue.main.asyncAfter(deadline: .now() + 0.35) { + FeedbackPresenter.presentFeedbackForm() + } + dismiss() } func privacyDashboardController(_ privacyDashboardController: PrivacyDashboardController, From a5df44117e67b7a45ecee86b4312d9db2d6393c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Thu, 21 Nov 2024 15:20:09 +0100 Subject: [PATCH 03/11] Change branch to jacek's --- .../xcshareddata/swiftpm/Package.resolved | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 5fb3bfc98b..a0840c4642 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "package": "BrowserServicesKit", "repositoryURL": "https://github.com/duckduckgo/BrowserServicesKit", "state": { - "branch": "mgurgel/new-breakage-form", - "revision": "bb0d926828f6978b3ff717ded8db34947efcd5a7", + "branch": "jacek/new-breakage-form", + "revision": "d015603f35a80acf247ebc28e0161e23ccd3067d", "version": null } }, @@ -42,8 +42,8 @@ "repositoryURL": "https://github.com/duckduckgo/content-scope-scripts", "state": { "branch": null, - "revision": "32c3e2bce3cc20a079d96b3ee23a9cde5d2337c3", - "version": "6.35.0" + "revision": "6cab7bdb584653a5dc007cc1ae827ec41c5a91bc", + "version": "6.29.0" } }, { @@ -60,8 +60,8 @@ "repositoryURL": "https://github.com/duckduckgo/GRDB.swift.git", "state": { "branch": null, - "revision": "5b2f6a81099d26ae0f9e38788f51490cd6a4b202", - "version": "2.4.2" + "revision": "4225b85c9a0c50544e413a1ea1e502c802b44b35", + "version": "2.4.0" } }, { From 37c65ecd8ca0ebcd843b158dc83e4ececac82c7a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Thu, 21 Nov 2024 16:52:33 +0100 Subject: [PATCH 04/11] Update to newest BSK changes --- .../xcshareddata/swiftpm/Package.resolved | 6 +++--- .../View/PrivacyDashboardViewController.swift | 19 +++---------------- 2 files changed, 6 insertions(+), 19 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index a0840c4642..78b61fab2c 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -33,7 +33,7 @@ "repositoryURL": "https://github.com/duckduckgo/BrowserServicesKit", "state": { "branch": "jacek/new-breakage-form", - "revision": "d015603f35a80acf247ebc28e0161e23ccd3067d", + "revision": "f188fb3fb4f598bd67f4c0d209aa81fe8e762916", "version": null } }, @@ -60,8 +60,8 @@ "repositoryURL": "https://github.com/duckduckgo/GRDB.swift.git", "state": { "branch": null, - "revision": "4225b85c9a0c50544e413a1ea1e502c802b44b35", - "version": "2.4.0" + "revision": "5b2f6a81099d26ae0f9e38788f51490cd6a4b202", + "version": "2.4.2" } }, { diff --git a/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift b/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift index 49798e9f9b..7bc48a3d2f 100644 --- a/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift +++ b/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift @@ -186,15 +186,6 @@ final class PrivacyDashboardViewController: NSViewController { extension PrivacyDashboardViewController: PrivacyDashboardControllerDelegate { - func privacyDashboardController(_ privacyDashboardController: PrivacyDashboardController, - didSelectBreakageCategory category: String) { - // Not used in macOS - } - - func privacyDashboardControllerDidRequestShowReportBrokenSite(_ privacyDashboardController: PrivacyDashboardController) { - // Not used in macOS: PixelKit.fire(GeneralPixel.privacyDashboardReportBrokenSite) - } - func privacyDashboardController(_ privacyDashboardController: PrivacyDashboardController, didChangeProtectionSwitch protectionState: ProtectionState, didSendReport: Bool) { @@ -245,14 +236,10 @@ extension PrivacyDashboardViewController: PrivacyDashboardControllerDelegate { dismiss() } - func privacyDashboardControllerDidRequestShowAlertForMissingDescription(_ privacyDashboardController: PrivacyDashboardController) { - // Not used in macOS - } - func privacyDashboardControllerDidRequestShowGeneralFeedback(_ privacyDashboardController: PrivacyDashboardController) { - DispatchQueue.main.asyncAfter(deadline: .now() + 0.35) { - FeedbackPresenter.presentFeedbackForm() - } +// DispatchQueue.main.asyncAfter(deadline: .now() + 0.35) { +// FeedbackPresenter.presentFeedbackForm() +// } dismiss() } From 7bf6bc1128f1dfdfe6644b6205fef72d59151ae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jacek=20=C5=81yp?= Date: Thu, 21 Nov 2024 17:41:55 +0100 Subject: [PATCH 05/11] Fix wrong dashboard showing up --- DuckDuckGo.xcodeproj/project.pbxproj | 2 - .../xcshareddata/swiftpm/Package.resolved | 189 +----------------- .../View/PrivacyDashboardViewController.swift | 4 +- 3 files changed, 9 insertions(+), 186 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index d3c33cceb9..a0e108064b 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -4323,7 +4323,6 @@ 85F487B4276A8F2E003CE668 /* OnboardingTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OnboardingTests.swift; sourceTree = ""; }; 85F69B3B25EDE81F00978E59 /* URLExtensionTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = URLExtensionTests.swift; sourceTree = ""; }; 85F91D9327F47BC40096B1C8 /* History 5.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = "History 5.xcdatamodel"; sourceTree = ""; }; - 8DF602922CEBDD4A00B43AE0 /* privacy-dashboard */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = "privacy-dashboard"; path = "../privacy-dashboard"; sourceTree = SOURCE_ROOT; }; 9812D894276CEDA5004B6181 /* ContentBlockerRulesLists.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentBlockerRulesLists.swift; sourceTree = ""; }; 9826B09F2747DF3D0092F683 /* ContentBlocking.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentBlocking.swift; sourceTree = ""; }; 9826B0A12747DFEB0092F683 /* AppPrivacyConfigurationDataProvider.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppPrivacyConfigurationDataProvider.swift; sourceTree = ""; }; @@ -6035,7 +6034,6 @@ 3772BEDF2D01A1400019B9EF /* Utilities */, 3720B7F82D00DA4500D20F23 /* WebKitExtensions */, 7B76E6852AD5D77600186A84 /* XPCHelper */, - 8DF602922CEBDD4A00B43AE0 /* privacy-dashboard */, ); path = LocalPackages; sourceTree = ""; diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 78b61fab2c..37df82613b 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -1,185 +1,12 @@ { - "object": { - "pins": [ - { - "package": "AppleToolbox", - "repositoryURL": "https://github.com/duckduckgo/apple-toolbox.git", - "state": { - "branch": null, - "revision": "0c13c5f056805f2d403618ccc3bfb833c303c68d", - "version": "3.1.2" - } - }, - { - "package": "BareBonesBrowserKit", - "repositoryURL": "https://github.com/duckduckgo/BareBonesBrowser.git", - "state": { - "branch": null, - "revision": "31e5bfedc3c2ca005640c4bf2b6959d69b0e18b9", - "version": "0.1.0" - } - }, - { - "package": "BloomFilter", - "repositoryURL": "https://github.com/duckduckgo/bloom_cpp.git", - "state": { - "branch": null, - "revision": "8076199456290b61b4544bf2f4caf296759906a0", - "version": "3.0.0" - } - }, - { - "package": "BrowserServicesKit", - "repositoryURL": "https://github.com/duckduckgo/BrowserServicesKit", - "state": { - "branch": "jacek/new-breakage-form", - "revision": "f188fb3fb4f598bd67f4c0d209aa81fe8e762916", - "version": null - } - }, - { - "package": "ContentScopeScripts", - "repositoryURL": "https://github.com/duckduckgo/content-scope-scripts", - "state": { - "branch": null, - "revision": "6cab7bdb584653a5dc007cc1ae827ec41c5a91bc", - "version": "6.29.0" - } - }, - { - "package": "Autofill", - "repositoryURL": "https://github.com/duckduckgo/duckduckgo-autofill.git", - "state": { - "branch": null, - "revision": "c992041d16ec10d790e6204dce9abf9966d1363c", - "version": "15.1.0" - } - }, - { - "package": "GRDB", - "repositoryURL": "https://github.com/duckduckgo/GRDB.swift.git", - "state": { - "branch": null, - "revision": "5b2f6a81099d26ae0f9e38788f51490cd6a4b202", - "version": "2.4.2" - } - }, - { - "package": "Gzip", - "repositoryURL": "https://github.com/1024jp/GzipSwift.git", - "state": { - "branch": null, - "revision": "731037f6cc2be2ec01562f6597c1d0aa3fe6fd05", - "version": "6.0.1" - } - }, - { - "package": "Lottie", - "repositoryURL": "https://github.com/airbnb/lottie-spm.git", - "state": { - "branch": null, - "revision": "1d29eccc24cc8b75bff9f6804155112c0ffc9605", - "version": "4.4.3" - } - }, - { - "package": "OHHTTPStubs", - "repositoryURL": "https://github.com/AliSoftware/OHHTTPStubs.git", - "state": { - "branch": null, - "revision": "12f19662426d0434d6c330c6974d53e2eb10ecd9", - "version": "9.1.0" - } - }, - { - "package": "OpenSSL", - "repositoryURL": "https://github.com/duckduckgo/OpenSSL-XCFramework", - "state": { - "branch": null, - "revision": "71d303cbfa150e1fac99ffc7b4f67aad9c7a5002", - "version": "3.1.5004" - } - }, - { - "package": "Punycode", - "repositoryURL": "https://github.com/gumob/PunycodeSwift.git", - "state": { - "branch": null, - "revision": "30a462bdb4398ea835a3585472229e0d74b36ba5", - "version": "3.0.0" - } - }, - { - "package": "Sparkle", - "repositoryURL": "https://github.com/sparkle-project/Sparkle.git", - "state": { - "branch": null, - "revision": "b456fd404954a9e13f55aa0c88cd5a40b8399638", - "version": "2.6.3" - } - }, - { - "package": "swift-argument-parser", - "repositoryURL": "https://github.com/apple/swift-argument-parser.git", - "state": { - "branch": null, - "revision": "0fbc8848e389af3bb55c182bc19ca9d5dc2f255b", - "version": "1.4.0" - } - }, - { - "package": "swift-snapshot-testing", - "repositoryURL": "https://github.com/pointfreeco/swift-snapshot-testing", - "state": { - "branch": null, - "revision": "5b0c434778f2c1a4c9b5ebdb8682b28e84dd69bd", - "version": "1.15.4" - } - }, - { - "package": "swift-syntax", - "repositoryURL": "https://github.com/apple/swift-syntax", - "state": { - "branch": null, - "revision": "64889f0c732f210a935a0ad7cda38f77f876262d", - "version": "509.1.1" - } - }, - { - "package": "Swifter", - "repositoryURL": "https://github.com/httpswift/swifter.git", - "state": { - "branch": null, - "revision": "9483a5d459b45c3ffd059f7b55f9638e268632fd", - "version": "1.5.0" - } - }, - { - "package": "DDGSyncCrypto", - "repositoryURL": "https://github.com/duckduckgo/sync_crypto", - "state": { - "branch": null, - "revision": "0c8bf3c0e75591bc366407b9d7a73a9fcfc7736f", - "version": "0.3.0" - } - }, - { - "package": "TrackerRadarKit", - "repositoryURL": "https://github.com/duckduckgo/TrackerRadarKit", - "state": { - "branch": null, - "revision": "5de0a610a7927b638a5fd463a53032c9934a2c3b", - "version": "3.0.0" - } - }, - { - "package": "WireGuardKit", - "repositoryURL": "https://github.com/duckduckgo/wireguard-apple", - "state": { - "branch": null, - "revision": "13fd026384b1af11048451061cc1b21434990668", - "version": "1.1.3" - } + "pins" : [ + { + "identity" : "apple-toolbox", + "kind" : "remoteSourceControl", + "location" : "https://github.com/duckduckgo/apple-toolbox.git", + "state" : { + "revision" : "0c13c5f056805f2d403618ccc3bfb833c303c68d", + "version" : "3.1.2" } }, { diff --git a/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift b/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift index 7bc48a3d2f..14c09325b2 100644 --- a/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift +++ b/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift @@ -237,10 +237,8 @@ extension PrivacyDashboardViewController: PrivacyDashboardControllerDelegate { } func privacyDashboardControllerDidRequestShowGeneralFeedback(_ privacyDashboardController: PrivacyDashboardController) { -// DispatchQueue.main.asyncAfter(deadline: .now() + 0.35) { -// FeedbackPresenter.presentFeedbackForm() -// } dismiss() + FeedbackPresenter.presentFeedbackForm() } func privacyDashboardController(_ privacyDashboardController: PrivacyDashboardController, From a5a71c1780c2720f9c86273c95c6c048c53b9d30 Mon Sep 17 00:00:00 2001 From: Marcos Gurgel Date: Fri, 13 Dec 2024 13:52:34 +0000 Subject: [PATCH 06/11] Updated initial height of dashboard window --- .../PrivacyDashboard/View/PrivacyDashboardViewController.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift b/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift index 14c09325b2..aff006d5ec 100644 --- a/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift +++ b/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift @@ -34,7 +34,7 @@ final class PrivacyDashboardViewController: NSViewController { struct Constants { static let initialContentHeight: CGFloat = 489.0 - static let reportBrokenSiteInitialContentHeight = 587c.0 + 28.0 + static let reportBrokenSiteInitialContentHeight = 372.0 + 28.0 static let initialContentWidth: CGFloat = 360.0 } @@ -127,6 +127,7 @@ final class PrivacyDashboardViewController: NSViewController { configuration.preferences.setValue(true, forKey: "developerExtrasEnabled") #endif let webView = PrivacyDashboardWebView(frame: .zero, configuration: configuration) + self.webView = webView view.addAndLayout(webView) From 9ecce1258b5f1448b238787e730f1422c9cc84a3 Mon Sep 17 00:00:00 2001 From: Marcos Gurgel Date: Tue, 17 Dec 2024 15:54:08 +0000 Subject: [PATCH 07/11] Disable animation on brekage report window --- DuckDuckGo/Menus/MainMenuActions.swift | 2 +- .../View/PrivacyDashboardViewController.swift | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/DuckDuckGo/Menus/MainMenuActions.swift b/DuckDuckGo/Menus/MainMenuActions.swift index 77e928f30b..33d5bf67d0 100644 --- a/DuckDuckGo/Menus/MainMenuActions.swift +++ b/DuckDuckGo/Menus/MainMenuActions.swift @@ -1241,7 +1241,7 @@ extension MainViewController: FindInPageDelegate { extension AppDelegate: PrivacyDashboardViewControllerSizeDelegate { func privacyDashboardViewControllerDidChange(size: NSSize) { - privacyDashboardWindow?.setFrame(NSRect(origin: .zero, size: size), display: true, animate: true) + privacyDashboardWindow?.setFrame(NSRect(origin: .zero, size: size), display: true, animate: false) } } diff --git a/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift b/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift index aff006d5ec..c53e89b306 100644 --- a/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift +++ b/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift @@ -34,7 +34,7 @@ final class PrivacyDashboardViewController: NSViewController { struct Constants { static let initialContentHeight: CGFloat = 489.0 - static let reportBrokenSiteInitialContentHeight = 372.0 + 28.0 + static let reportBrokenSiteInitialContentHeight = 406.0 + 28.0 static let initialContentWidth: CGFloat = 360.0 } @@ -102,7 +102,7 @@ final class PrivacyDashboardViewController: NSViewController { } override func loadView() { - view = NSView(frame: NSRect(x: 0, y: 0, width: 360, height: 489)) + view = ColorView(frame: NSRect(x: 0, y: 0, width: 360, height: 489), backgroundColor: NSColor(named: "PopoverBackgroundColor")) initWebView() } @@ -127,7 +127,7 @@ final class PrivacyDashboardViewController: NSViewController { configuration.preferences.setValue(true, forKey: "developerExtrasEnabled") #endif let webView = PrivacyDashboardWebView(frame: .zero, configuration: configuration) - + webView.setValue(false, forKey: "drawsBackground") self.webView = webView view.addAndLayout(webView) From 4f7b08cf892f9b8693a86f2e44186ef2cfe8b259 Mon Sep 17 00:00:00 2001 From: Marcos Gurgel Date: Thu, 9 Jan 2025 13:11:33 +0000 Subject: [PATCH 08/11] Privacy Dashboard 8.0.0 --- .../project.xcworkspace/xcshareddata/swiftpm/Package.resolved | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 37df82613b..443fa8ea7b 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -104,8 +104,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/privacy-dashboard", "state" : { - "revision" : "bea4d750913ef82c10cd06e791686501c8e648e4", - "version" : "7.6.0" + "revision" : "3f58e008d4e9d1b56ab12dbb95bd891045cf2758", + "version" : "8.0.0" } }, { From a271bbb44fcd715fb42a8f8810efc1572946f1e0 Mon Sep 17 00:00:00 2001 From: Marcos Gurgel Date: Fri, 17 Jan 2025 17:54:44 +0000 Subject: [PATCH 09/11] Aligning Privacy Dashboard EventMapping with iOS (#3744) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Task/Issue URL: https://app.asana.com/0/1206594217596623/1209173355503842/f **Description**: Set ups Privacy Dashboard EventMapping as to align with iOS. Each mapped event fires a pixel when invoked by the Privacy Dashboard. See https://github.com/duckduckgo/BrowserServicesKit/pull/1167 Note: not all events are currently used by the Dashboard. Some are being deprecated, which is why they might not be fired at all even though they still exist in the mapping. **Steps to test this PR**: 1. Invoke the breakage form in the two possible ways: Open the Privacy Dashboard and click on "Report a problem with this site" Open the app menu ••• and click on "Report Broken Site” (iOS) 2. Confirm that the pixel `m_report-broken-site_shown` was fired 3. Submit a report 4. Confirm that the pixels `epbf_macos_desktop` and `m_report-broken-site_sent` were fired --- .../xcshareddata/swiftpm/Package.resolved | 8 ++++---- .../View/PrivacyDashboardViewController.swift | 18 +++++++++++++++--- DuckDuckGo/Statistics/NonStandardPixel.swift | 6 ++++++ .../WebsiteBreakageReportTests.swift | 16 ++++++++++++++++ 4 files changed, 41 insertions(+), 7 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index 443fa8ea7b..b705cb640e 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -104,8 +104,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/privacy-dashboard", "state" : { - "revision" : "3f58e008d4e9d1b56ab12dbb95bd891045cf2758", - "version" : "8.0.0" + "branch" : "pr-releases/pr-302", + "revision" : "05d04de7505117b32949b2007e5a56ba2d39469b" } }, { @@ -167,8 +167,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/sync_crypto", "state" : { - "revision" : "cc726cebb67367466bc31ced4784e16d44ac68d1", - "version" : "0.4.0" + "revision" : "0c8bf3c0e75591bc366407b9d7a73a9fcfc7736f", + "version" : "0.3.0" } }, { diff --git a/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift b/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift index c53e89b306..04a6aa222d 100644 --- a/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift +++ b/DuckDuckGo/PrivacyDashboard/View/PrivacyDashboardViewController.swift @@ -62,8 +62,6 @@ final class PrivacyDashboardViewController: NSViewController { }, keyValueStoring: UserDefaults.standard) }() - private let eventMapping = EventMapping { _, _, _, _ in } - private let permissionHandler = PrivacyDashboardPermissionHandler() private var preferredMaxHeight: CGFloat = Constants.initialContentHeight func setPreferredMaxHeight(_ height: CGFloat) { @@ -73,6 +71,20 @@ final class PrivacyDashboardViewController: NSViewController { var sizeDelegate: PrivacyDashboardViewControllerSizeDelegate? private weak var tabViewModel: TabViewModel? + private let privacyDashboardEvents = EventMapping { event, _, parameters, _ in + let domainEvent: NonStandardPixel + switch event { + case .showReportBrokenSite: domainEvent = .brokenSiteReportShown + case .reportBrokenSiteShown: domainEvent = .brokenSiteReportShown + case .reportBrokenSiteSent: domainEvent = .brokenSiteReportSent + } + if let parameters { + PixelKit.fire(NonStandardEvent(domainEvent), withAdditionalParameters: parameters) + } else { + PixelKit.fire(NonStandardEvent(domainEvent)) + } + } + init(privacyInfo: PrivacyInfo? = nil, entryPoint: PrivacyDashboardEntryPoint = .dashboard, privacyConfigurationManager: PrivacyConfigurationManaging = ContentBlocking.shared.privacyConfigurationManager) { @@ -82,7 +94,7 @@ final class PrivacyDashboardViewController: NSViewController { self.privacyDashboardController = PrivacyDashboardController(privacyInfo: privacyInfo, entryPoint: entryPoint, toggleReportingManager: toggleReportingManager, - eventMapping: eventMapping) + eventMapping: privacyDashboardEvents) super.init(nibName: nil, bundle: nil) } diff --git a/DuckDuckGo/Statistics/NonStandardPixel.swift b/DuckDuckGo/Statistics/NonStandardPixel.swift index b528aef0a1..5accaf5020 100644 --- a/DuckDuckGo/Statistics/NonStandardPixel.swift +++ b/DuckDuckGo/Statistics/NonStandardPixel.swift @@ -26,6 +26,9 @@ import Configuration enum NonStandardPixel: PixelKitEventV2 { case brokenSiteReport + case brokenSiteReportShown + case brokenSiteReportSent + case privacyDashboardReportBrokenSite case emailEnabled case emailDisabled case emailUserPressedUseAddress @@ -35,6 +38,9 @@ enum NonStandardPixel: PixelKitEventV2 { var name: String { switch self { case .brokenSiteReport: return "epbf_macos_desktop" + case .brokenSiteReportSent: return "m_report-broken-site_sent" + case .brokenSiteReportShown: return "m_report-broken-site_shown" + case .privacyDashboardReportBrokenSite: return "mp_rb" case .emailEnabled: return "email_enabled_macos_desktop" case .emailDisabled: return "email_disabled_macos_desktop" case .emailUserPressedUseAddress: return "email_filled_main_macos_desktop" diff --git a/UnitTests/WebsiteBreakageReport/WebsiteBreakageReportTests.swift b/UnitTests/WebsiteBreakageReport/WebsiteBreakageReportTests.swift index cb7f619b4b..7d50333d95 100644 --- a/UnitTests/WebsiteBreakageReport/WebsiteBreakageReportTests.swift +++ b/UnitTests/WebsiteBreakageReport/WebsiteBreakageReportTests.swift @@ -33,6 +33,22 @@ class WebsiteBreakageReportTests: XCTestCase { line: #line) } + func testReportBrokenSiteShownPixel() { + fire(NonStandardEvent(NonStandardPixel.brokenSiteReportShown), + frequency: .standard, + and: .expect(pixelName: "m_report-broken-site_shown"), + file: #filePath, + line: #line) + } + + func testReportBrokenSiteSentPixel() { + fire(NonStandardEvent(NonStandardPixel.brokenSiteReportSent), + frequency: .standard, + and: .expect(pixelName: "m_report-broken-site_sent"), + file: #filePath, + line: #line) + } + func testCommonSetOfFields() throws { let breakage = BrokenSiteReport( siteUrl: URL(string: "https://example.test/")!, From 5603b6eafb5212f325fe3be0696d20fc910c85a2 Mon Sep 17 00:00:00 2001 From: Marcos Gurgel Date: Mon, 20 Jan 2025 11:39:58 +0000 Subject: [PATCH 10/11] BSK bump --- DuckDuckGo.xcodeproj/project.pbxproj | 2 +- LocalPackages/DataBrokerProtection/Package.swift | 2 +- LocalPackages/FeatureFlags/Package.swift | 2 +- LocalPackages/NetworkProtectionMac/Package.swift | 2 +- LocalPackages/NewTabPage/Package.swift | 2 +- LocalPackages/SubscriptionUI/Package.swift | 2 +- LocalPackages/WebKitExtensions/Package.swift | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.pbxproj b/DuckDuckGo.xcodeproj/project.pbxproj index a0e108064b..99377ac113 100644 --- a/DuckDuckGo.xcodeproj/project.pbxproj +++ b/DuckDuckGo.xcodeproj/project.pbxproj @@ -15386,7 +15386,7 @@ repositoryURL = "https://github.com/duckduckgo/BrowserServicesKit"; requirement = { kind = exactVersion; - version = 225.1.0; + version = 226.0.0; }; }; 9FF521422BAA8FF300B9819B /* XCRemoteSwiftPackageReference "lottie-spm" */ = { diff --git a/LocalPackages/DataBrokerProtection/Package.swift b/LocalPackages/DataBrokerProtection/Package.swift index a2017493d0..22d1e610bd 100644 --- a/LocalPackages/DataBrokerProtection/Package.swift +++ b/LocalPackages/DataBrokerProtection/Package.swift @@ -29,7 +29,7 @@ let package = Package( targets: ["DataBrokerProtection"]) ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "225.1.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "226.0.0"), .package(path: "../SwiftUIExtensions"), .package(path: "../AppKitExtensions"), .package(path: "../XPCHelper"), diff --git a/LocalPackages/FeatureFlags/Package.swift b/LocalPackages/FeatureFlags/Package.swift index 5ac496e9f2..119e017019 100644 --- a/LocalPackages/FeatureFlags/Package.swift +++ b/LocalPackages/FeatureFlags/Package.swift @@ -32,7 +32,7 @@ let package = Package( targets: ["FeatureFlags"]), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "225.1.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "226.0.0"), ], targets: [ // Targets are the basic building blocks of a package, defining a module or a test suite. diff --git a/LocalPackages/NetworkProtectionMac/Package.swift b/LocalPackages/NetworkProtectionMac/Package.swift index ac1168ca11..4339cfcd90 100644 --- a/LocalPackages/NetworkProtectionMac/Package.swift +++ b/LocalPackages/NetworkProtectionMac/Package.swift @@ -33,7 +33,7 @@ let package = Package( .library(name: "VPNAppLauncher", targets: ["VPNAppLauncher"]), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "225.1.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "226.0.0"), .package(url: "https://github.com/airbnb/lottie-spm", exact: "4.4.3"), .package(path: "../AppLauncher"), .package(path: "../UDSHelper"), diff --git a/LocalPackages/NewTabPage/Package.swift b/LocalPackages/NewTabPage/Package.swift index 5a130d08bb..ce6bf40133 100644 --- a/LocalPackages/NewTabPage/Package.swift +++ b/LocalPackages/NewTabPage/Package.swift @@ -32,7 +32,7 @@ let package = Package( targets: ["NewTabPage"]), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "225.1.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "226.0.0"), .package(path: "../WebKitExtensions"), .package(path: "../Utilities"), ], diff --git a/LocalPackages/SubscriptionUI/Package.swift b/LocalPackages/SubscriptionUI/Package.swift index 98704678ef..a9942a28e3 100644 --- a/LocalPackages/SubscriptionUI/Package.swift +++ b/LocalPackages/SubscriptionUI/Package.swift @@ -13,7 +13,7 @@ let package = Package( targets: ["SubscriptionUI"]), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "225.1.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "226.0.0"), .package(path: "../SwiftUIExtensions"), .package(path: "../FeatureFlags") ], diff --git a/LocalPackages/WebKitExtensions/Package.swift b/LocalPackages/WebKitExtensions/Package.swift index f1a43b8d6b..8a195d6853 100644 --- a/LocalPackages/WebKitExtensions/Package.swift +++ b/LocalPackages/WebKitExtensions/Package.swift @@ -32,7 +32,7 @@ let package = Package( ), ], dependencies: [ - .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "225.1.0"), + .package(url: "https://github.com/duckduckgo/BrowserServicesKit", exact: "226.0.0"), .package(path: "../AppKitExtensions") ], targets: [ From c1e1a565d55cdba7fc82a03222b766ad737209c0 Mon Sep 17 00:00:00 2001 From: Marcos Gurgel Date: Mon, 20 Jan 2025 11:45:48 +0000 Subject: [PATCH 11/11] Resolved --- .../xcshareddata/swiftpm/Package.resolved | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved index b705cb640e..244ddfe15b 100644 --- a/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved +++ b/DuckDuckGo.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -32,8 +32,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/BrowserServicesKit", "state" : { - "revision" : "fb315acdbbea9dee949cc066fcafbb1a1f3618f4", - "version" : "225.1.0" + "revision" : "d1275238d88f25cd31a29be2b4f20bbba5de9aa1", + "version" : "226.0.0" } }, { @@ -104,8 +104,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/privacy-dashboard", "state" : { - "branch" : "pr-releases/pr-302", - "revision" : "05d04de7505117b32949b2007e5a56ba2d39469b" + "revision" : "c52bd5d851b1f8f0482e82b8720852670f525497", + "version" : "8.1.0" } }, { @@ -167,8 +167,8 @@ "kind" : "remoteSourceControl", "location" : "https://github.com/duckduckgo/sync_crypto", "state" : { - "revision" : "0c8bf3c0e75591bc366407b9d7a73a9fcfc7736f", - "version" : "0.3.0" + "revision" : "cc726cebb67367466bc31ced4784e16d44ac68d1", + "version" : "0.4.0" } }, {