From 5cc9c7eb533a11a9b4280b522ab9258380b538c6 Mon Sep 17 00:00:00 2001 From: Brad Slayter Date: Thu, 15 Aug 2024 09:06:03 -0500 Subject: [PATCH 1/2] Revert "Remove prompt entry point" This reverts commit 08a925fbe0281f47b76850339f21b33749b7fa86. --- Sources/PrivacyDashboard/PrivacyDashboardEntryPoint.swift | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Sources/PrivacyDashboard/PrivacyDashboardEntryPoint.swift b/Sources/PrivacyDashboard/PrivacyDashboardEntryPoint.swift index 7f9b6042e..4ead90cf5 100644 --- a/Sources/PrivacyDashboard/PrivacyDashboardEntryPoint.swift +++ b/Sources/PrivacyDashboard/PrivacyDashboardEntryPoint.swift @@ -30,6 +30,10 @@ public enum PrivacyDashboardEntryPoint: Equatable { /// This is only available on iOS, as macOS does not have an option to disable protection outside of the dashboard. case toggleReport(completionHandler: (Bool) -> Void) + /// The prompt report screen, which is triggered whenever the user taps report from the toast popup for refreshes + /// This is currently only available on iOS. + case prompt(String) + /// The experimental after toggle prompt screen, presented in variant B. /// After the user toggles off protection, this prompt asks if the action helped and allows the user to report their experience. /// - Parameters: @@ -47,6 +51,7 @@ public enum PrivacyDashboardEntryPoint: Equatable { case (.afterTogglePrompt, _): return .choiceBreakageForm + case (.prompt, _): return .promptBreakageForm case (.toggleReport, _): return .toggleReport } } @@ -57,6 +62,7 @@ public enum PrivacyDashboardEntryPoint: Equatable { (.dashboard, .dashboard), (.report, .report), (.toggleReport, .toggleReport), + (.prompt, .prompt), (.afterTogglePrompt, .afterTogglePrompt): return true default: From 0ad8773d8e734496f2ceb7187dccf7ae4ddb5e5c Mon Sep 17 00:00:00 2001 From: Brad Slayter Date: Thu, 15 Aug 2024 10:14:19 -0500 Subject: [PATCH 2/2] Add broken site prompt config feature --- .../PrivacyConfig/Features/PrivacyFeature.swift | 1 + Sources/PrivacyDashboard/PrivacyDashboardController.swift | 1 + 2 files changed, 2 insertions(+) diff --git a/Sources/BrowserServicesKit/PrivacyConfig/Features/PrivacyFeature.swift b/Sources/BrowserServicesKit/PrivacyConfig/Features/PrivacyFeature.swift index dcff23362..44c3ad23b 100644 --- a/Sources/BrowserServicesKit/PrivacyConfig/Features/PrivacyFeature.swift +++ b/Sources/BrowserServicesKit/PrivacyConfig/Features/PrivacyFeature.swift @@ -49,6 +49,7 @@ public enum PrivacyFeature: String { case sslCertificates case brokenSiteReportExperiment case toggleReports + case brokenSitePrompt case remoteMessaging case additionalCampaignPixelParams } diff --git a/Sources/PrivacyDashboard/PrivacyDashboardController.swift b/Sources/PrivacyDashboard/PrivacyDashboardController.swift index ec87f126f..b207cdcee 100644 --- a/Sources/PrivacyDashboard/PrivacyDashboardController.swift +++ b/Sources/PrivacyDashboard/PrivacyDashboardController.swift @@ -160,6 +160,7 @@ public protocol PrivacyDashboardControllerDelegate: AnyObject { switch entryPoint { case .report: source = .appMenu case .dashboard: source = .dashboard + case .prompt(let event): source = .prompt(event) case .toggleReport: source = .onProtectionsOffMenu case .afterTogglePrompt: source = .afterTogglePrompt }