Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Re-Enable Broken Site Toast on iOS #946

Merged
merged 3 commits into from
Aug 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public enum PrivacyFeature: String {
case sslCertificates
case brokenSiteReportExperiment
case toggleReports
case brokenSitePrompt
case remoteMessaging
case additionalCampaignPixelParams
}
Expand Down
1 change: 1 addition & 0 deletions Sources/PrivacyDashboard/PrivacyDashboardController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
6 changes: 6 additions & 0 deletions Sources/PrivacyDashboard/PrivacyDashboardEntryPoint.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -47,6 +51,7 @@ public enum PrivacyDashboardEntryPoint: Equatable {

case (.afterTogglePrompt, _): return .choiceBreakageForm

case (.prompt, _): return .promptBreakageForm
case (.toggleReport, _): return .toggleReport
}
}
Expand All @@ -57,6 +62,7 @@ public enum PrivacyDashboardEntryPoint: Equatable {
(.dashboard, .dashboard),
(.report, .report),
(.toggleReport, .toggleReport),
(.prompt, .prompt),
(.afterTogglePrompt, .afterTogglePrompt):
return true
default:
Expand Down
Loading