Skip to content

Commit

Permalink
Remove experimental code
Browse files Browse the repository at this point in the history
  • Loading branch information
jaceklyp authored and mgurgel committed Dec 13, 2024
1 parent e02fcf7 commit b9cc5e9
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 247 deletions.
10 changes: 2 additions & 8 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -982,8 +982,6 @@
CB5516D2286500290079B175 /* AtbServerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85F21DBD21121147002631A6 /* AtbServerTests.swift */; };
CB6CC7E42CD2529000320907 /* BrokenSitePrompt in Frameworks */ = {isa = PBXBuildFile; productRef = CB6CC7E32CD2529000320907 /* BrokenSitePrompt */; };
CB6D8E982C80A9B100D0E772 /* SpecialErrorPages in Frameworks */ = {isa = PBXBuildFile; productRef = CB6D8E972C80A9B100D0E772 /* SpecialErrorPages */; };
CB825C922C071B1400BCC586 /* AlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB825C912C071B1400BCC586 /* AlertView.swift */; };
CB825C962C071C9300BCC586 /* AlertViewPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB825C952C071C9300BCC586 /* AlertViewPresenter.swift */; };
CB84C7BD29A3EF530088A5B8 /* AppConfigurationURLProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB24F70E29A3EB15006DCC58 /* AppConfigurationURLProvider.swift */; };
CB941A6E2B96AB08000F9E7A /* PrivacyDashboard in Frameworks */ = {isa = PBXBuildFile; productRef = CB941A6D2B96AB08000F9E7A /* PrivacyDashboard */; };
CB9B8739278C8E72001F4906 /* WidgetEducationViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB9B8738278C8E72001F4906 /* WidgetEducationViewController.swift */; };
Expand Down Expand Up @@ -2880,8 +2878,6 @@
CB6CE65B2AF6D4EE00119848 /* es */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = es; path = es.lproj/InfoPlist.strings; sourceTree = "<group>"; };
CB7407BC2AF6D56D0090A41C /* pl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = pl; path = pl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
CB75AA132AF6D5AA00AED266 /* sl */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = sl; path = sl.lproj/InfoPlist.strings; sourceTree = "<group>"; };
CB825C912C071B1400BCC586 /* AlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertView.swift; sourceTree = "<group>"; };
CB825C952C071C9300BCC586 /* AlertViewPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AlertViewPresenter.swift; sourceTree = "<group>"; };
CB84C7C029A3F0280088A5B8 /* ConfigurationStore.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ConfigurationStore.swift; sourceTree = "<group>"; };
CB8EF4A32AF6D4C200EF158D /* cs */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = cs; path = cs.lproj/InfoPlist.strings; sourceTree = "<group>"; };
CB8F1F7D2AF6D5370024BF0E /* it */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = it; path = it.lproj/InfoPlist.strings; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2909,6 +2905,7 @@
CBDD5DDE29A6736A00832877 /* APIHeadersTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = APIHeadersTests.swift; sourceTree = "<group>"; };
CBDD5DE029A6741300832877 /* MockBundle.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MockBundle.swift; sourceTree = "<group>"; };
CBE099292AF6D54D000EFC47 /* lv */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = lv; path = lv.lproj/InfoPlist.strings; sourceTree = "<group>"; };
CBE66FB22CEF436D009A57F1 /* BrowserServicesKit */ = {isa = PBXFileReference; lastKnownFileType = wrapper; name = BrowserServicesKit; path = ../BrowserServicesKit; sourceTree = SOURCE_ROOT; };
CBECB27B2AF6D58D006960FA /* ru */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = ru; path = ru.lproj/InfoPlist.strings; sourceTree = "<group>"; };
CBECDB792CD981C6005B8B87 /* AppPageRefreshMonitor.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppPageRefreshMonitor.swift; sourceTree = "<group>"; };
CBEF49902AF6D50600BFBD7D /* fi */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fi; path = fi.lproj/InfoPlist.strings; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3452,8 +3449,6 @@
1E162604296840D80004127F /* Triangle.swift */,
1E1626062968413B0004127F /* ViewExtension.swift */,
EE4BE0082A740BED00CD6AA8 /* ClearTextField.swift */,
CB825C912C071B1400BCC586 /* AlertView.swift */,
CB825C952C071C9300BCC586 /* AlertViewPresenter.swift */,
6FD3F80E2C3EF4F000DA5797 /* DeviceOrientationEnvironmentValue.swift */,
9FEA222D2C324ECD006B03BF /* ViewVisibility.swift */,
9F69331E2C5B1D0C00CD6A5D /* OnFirstAppearViewModifier.swift */,
Expand Down Expand Up @@ -4367,6 +4362,7 @@
84E341891E2F7EFB00BDBA6F = {
isa = PBXGroup;
children = (
CBE66FB22CEF436D009A57F1 /* BrowserServicesKit */,
EE3B98EB2A963515002F63A0 /* WidgetsExtensionAlpha.entitlements */,
6FB030C7234331B400A10DB9 /* Configuration.xcconfig */,
EEB8FDB92A990AEE00EBEDCF /* Configuration-Alpha.xcconfig */,
Expand Down Expand Up @@ -7876,7 +7872,6 @@
85DFEDED24C7CCA500973FE7 /* AppWidthObserver.swift in Sources */,
4B6484F327FD1E350050A7A1 /* MenuControllerView.swift in Sources */,
9F9A92342C86B42B001D036D /* AppIconPicker.swift in Sources */,
CB825C962C071C9300BCC586 /* AlertViewPresenter.swift in Sources */,
1EE7C299294227EC0026C8CB /* AutoconsentSettingsViewController.swift in Sources */,
1E8AD1D527C2E22900ABA377 /* DownloadsListSectionViewModel.swift in Sources */,
EE0798C52B179936000A4F64 /* NetworkProtectionVPNCountryLabelsModel.swift in Sources */,
Expand Down Expand Up @@ -8077,7 +8072,6 @@
1DEAADEC2BA45B4500E25A97 /* SettingsAccessibilityView.swift in Sources */,
85C8E61D2B0E47380029A6BD /* BookmarksDatabaseSetup.swift in Sources */,
3132FA2C27A07A1B00DD7A12 /* FilePreview.swift in Sources */,
CB825C922C071B1400BCC586 /* AlertView.swift in Sources */,
1DDF40292BA04FCD006850D9 /* SettingsPrivacyProtectionsView.swift in Sources */,
BDE91CD82C629A910005CB74 /* UnifiedFeedbackSender.swift in Sources */,
6F64AA5F2C49463C00CF4489 /* ShortcutsModel.swift in Sources */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@
"version" : "3.0.0"
}
},
{
"identity" : "browserserviceskit",
"kind" : "remoteSourceControl",
"location" : "https://github.com/DuckDuckGo/BrowserServicesKit",
"state" : {
"branch" : "jacek/new-breakage-form",
"revision" : "7560c3ec9642ab0956190d6996a0c4f19ee4f38b"
}
},
{
"identity" : "content-scope-scripts",
"kind" : "remoteSourceControl",
Expand Down
83 changes: 0 additions & 83 deletions DuckDuckGo/AlertView.swift

This file was deleted.

90 changes: 0 additions & 90 deletions DuckDuckGo/AlertViewPresenter.swift

This file was deleted.

2 changes: 0 additions & 2 deletions DuckDuckGo/MainViewController+Segues.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,6 @@ extension MainViewController {
}

currentTab?.privacyDashboard = controller
controller.delegate = currentTab
currentTab?.breakageCategory = nil

controller.popoverPresentationController?.delegate = controller
controller.view.backgroundColor = UIColor(designSystemColor: .backgroundSheets)
Expand Down
12 changes: 0 additions & 12 deletions DuckDuckGo/PrivacyDashboard/PrivacyDashboardViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,19 +26,11 @@ import PrivacyDashboard
import Common
import os.log

protocol PrivacyDashboardViewControllerDelegate: AnyObject {

func privacyDashboardViewController(_ privacyDashboardViewController: PrivacyDashboardViewController,
didSelectBreakageCategory breakageCategory: String)

}

final class PrivacyDashboardViewController: UIViewController {

@IBOutlet private(set) weak var webView: WKWebView!

public var breakageAdditionalInfo: BreakageAdditionalInfo?
public weak var delegate: PrivacyDashboardViewControllerDelegate?

private let privacyDashboardController: PrivacyDashboardController
private let privacyConfigurationManager: PrivacyConfigurationManaging
Expand Down Expand Up @@ -175,10 +167,6 @@ extension PrivacyDashboardViewController {
// MARK: - PrivacyDashboardControllerDelegate

extension PrivacyDashboardViewController: PrivacyDashboardControllerDelegate {

func privacyDashboardController(_ privacyDashboardController: PrivacyDashboardController, didSelectBreakageCategory category: String) {
delegate?.privacyDashboardViewController(self, didSelectBreakageCategory: category)
}

func privacyDashboardController(_ privacyDashboardController: PrivacyDashboardController,
didChangeProtectionSwitch protectionState: ProtectionState,
Expand Down
31 changes: 0 additions & 31 deletions DuckDuckGo/TabViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -954,8 +954,6 @@ class TabViewController: UIViewController {
controller.popoverPresentationController?.sourceRect = iconView.bounds
}
privacyDashboard = controller
privacyDashboard?.delegate = self
breakageCategory = nil
}

if let controller = segue.destination as? FullscreenDaxDialogViewController {
Expand Down Expand Up @@ -1228,26 +1226,6 @@ class TabViewController: UIViewController {
job()
}

private var alertPresenter: AlertViewPresenter?
var breakageCategory: String?
private func schedulePrivacyProtectionsOffAlert() {
guard let breakageCategory else { return }
DispatchQueue.main.asyncAfter(deadline: .now() + 3) {
self.alertPresenter?.hide()
self.alertPresenter = AlertViewPresenter(title: UserText.brokenSiteReportToggleAlertTitle,
image: "SiteBreakage",
leftButton: (UserText.brokenSiteReportToggleAlertYesButton, { [weak self] in
(self?.parent as? MainViewController)?.segueToReportBrokenSite(entryPoint: .afterTogglePrompt(category: breakageCategory,
didToggleProtectionsFixIssue: true))
}),
rightButton: (UserText.brokenSiteReportToggleAlertNoButton, { [weak self] in
(self?.parent as? MainViewController)?.segueToReportBrokenSite(entryPoint: .afterTogglePrompt(category: breakageCategory,
didToggleProtectionsFixIssue: false))
}))
self.alertPresenter?.present(in: self, animated: true)
}
}

deinit {
rulesCompilationMonitor.tabWillClose(tabModel.uid)
removeObservers()
Expand All @@ -1256,14 +1234,6 @@ class TabViewController: UIViewController {
}
}

extension TabViewController: PrivacyDashboardViewControllerDelegate {

func privacyDashboardViewController(_ privacyDashboardViewController: PrivacyDashboardViewController, didSelectBreakageCategory breakageCategory: String) {
self.breakageCategory = breakageCategory
}

}

// MARK: - LoginFormDetectionDelegate
extension TabViewController: LoginFormDetectionDelegate {

Expand Down Expand Up @@ -2592,7 +2562,6 @@ extension TabViewController: UserContentControllerDelegate {
}) {

reload()
schedulePrivacyProtectionsOffAlert()
}
}

Expand Down
3 changes: 0 additions & 3 deletions DuckDuckGo/UserText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1322,9 +1322,6 @@ But if you *do* want a peek under the hood, you can find more information about
public static let brokenSiteReportMissingDescriptionAlertTitle = NSLocalizedString("broken.site.report.missing.description.alert.title", value: "Description Required", comment: "It appears as an alert after user tries to send a report without submitting any details")
public static let brokenSiteReportMissingDescriptionAlertDescription = NSLocalizedString("broken.site.report.missing.description.alert.description", value: "Please describe the issue you experienced on this site so we can better understand how to fix it.", comment: "It appears as an alert after user tries to send a report without submitting any details")
public static let brokenSiteReportMissingDescriptionAlertButton = NSLocalizedString("broken.site.report.missing.description.alert.button", value: "Got It", comment: "Acknowledge button")
public static let brokenSiteReportToggleAlertTitle = NSLocalizedString("broken.site.report.toggle.alert.title", value: "Did turning Privacy Protections off resolve the issue on this site?", comment: "An alert that appears after user turns off the privacy protection")
public static let brokenSiteReportToggleAlertYesButton = NSLocalizedString("broken.site.report.toggle.alert.yes.button", value: "Yes", comment: "Button to answer question 'Did turning off protections resolve the issue on this site?'")
public static let brokenSiteReportToggleAlertNoButton = NSLocalizedString("broken.site.report.toggle.alert.no.button", value: "No", comment: "Button to answer question 'Did turning off protections resolve the issue on this site?'")

// Duck Player
public static let duckPlayerAlwaysEnabledLabel = NSLocalizedString("duckPlayer.alwaysEnabled.label", value: "Always", comment: "Text displayed when DuckPlayer is always enabled")
Expand Down
9 changes: 0 additions & 9 deletions DuckDuckGo/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -789,15 +789,6 @@
/* Message that appears after submitting report */
"broken.site.report.success.toast" = "Your report helps make DuckDuckGo better for everyone!";

/* Button to answer question 'Did turning off protections resolve the issue on this site?' */
"broken.site.report.toggle.alert.no.button" = "No";

/* An alert that appears after user turns off the privacy protection */
"broken.site.report.toggle.alert.title" = "Did turning Privacy Protections off resolve the issue on this site?";

/* Button to answer question 'Did turning off protections resolve the issue on this site?' */
"broken.site.report.toggle.alert.yes.button" = "Yes";

/* Button to continue the onboarding process */
"contextual.onboarding.addToDock.buttons.skip" = "Skip";

Expand Down

0 comments on commit b9cc5e9

Please sign in to comment.