Skip to content

Commit

Permalink
Removing the temporary password manager survey code (#2910)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/0/1207424646529837/f
Tech Design URL:
CC:

Description:
Cleaning out all (now obsolete) code related to the temporary password manager survey
  • Loading branch information
amddg44 authored Jun 4, 2024
1 parent e5c1029 commit 5faff38
Show file tree
Hide file tree
Showing 14 changed files with 9 additions and 281 deletions.
3 changes: 0 additions & 3 deletions Core/PixelEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,6 @@ extension Pixel {
case autofillLoginsPasswordGenerationPromptConfirmed
case autofillLoginsPasswordGenerationPromptDismissed

case autofillManagementScreenVisitSurveyAvailable

case autofillLoginsLaunchWidgetHome
case autofillLoginsLaunchWidgetLock
case autofillLoginsLaunchAppShortcut
Expand Down Expand Up @@ -953,7 +951,6 @@ extension Pixel.Event {
case .autofillLoginsPasswordGenerationPromptConfirmed: return "m_autofill_logins_password_generation_prompt_confirmed"
case .autofillLoginsPasswordGenerationPromptDismissed: return "m_autofill_logins_password_generation_prompt_dismissed"

case .autofillManagementScreenVisitSurveyAvailable: return "m_autofill_management_screen_visit_survey_available"
case .autofillLoginsLaunchWidgetHome: return "m_autofill_logins_launch_widget_home"
case .autofillLoginsLaunchWidgetLock: return "m_autofill_logins_launch_widget_lock"
case .autofillLoginsLaunchAppShortcut: return "m_autofill_logins_launch_app_shortcut"
Expand Down
1 change: 0 additions & 1 deletion Core/UserDefaultsPropertyWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,6 @@ public struct UserDefaultsWrapper<T> {
case autofillCredentialsHasBeenEnabledAutomaticallyIfNecessary =
"com.duckduckgo.ios.autofillCredentialsHasBeenEnabledAutomaticallyIfNecessary"
case autofillImportViaSyncStart = "com.duckduckgo.ios.autofillImportViaSyncStart"
case autofillSurveyEnabled = "com.duckduckgo.ios.autofillSurveyEnabled"
case autofillSearchDauDate = "com.duckduckgo.app.autofill.SearchDauDate"
case autofillFillDate = "com.duckduckgo.app.autofill.FillDate"
case autofillOnboardedUser = "com.duckduckgo.app.autofill.OnboardedUser"
Expand Down
4 changes: 0 additions & 4 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,6 @@
C12726EE2A5FF88C00215B02 /* EmailSignupPromptView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12726ED2A5FF88C00215B02 /* EmailSignupPromptView.swift */; };
C12726F02A5FF89900215B02 /* EmailSignupPromptViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12726EF2A5FF89900215B02 /* EmailSignupPromptViewModel.swift */; };
C12726F22A5FF8CB00215B02 /* EmailSignupPromptViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12726F12A5FF8CB00215B02 /* EmailSignupPromptViewController.swift */; };
C136C7542BEB8CFC00ACC3B0 /* PasswordsSurveyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C136C7532BEB8CFC00ACC3B0 /* PasswordsSurveyView.swift */; };
C13B32D22A0E750700A59236 /* AutofillSettingStatus.swift in Sources */ = {isa = PBXBuildFile; fileRef = C13B32D12A0E750700A59236 /* AutofillSettingStatus.swift */; };
C13F3F682B7F88100083BE40 /* AuthConfirmationPromptView.swift in Sources */ = {isa = PBXBuildFile; fileRef = C13F3F672B7F88100083BE40 /* AuthConfirmationPromptView.swift */; };
C13F3F6A2B7F883A0083BE40 /* AuthConfirmationPromptViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = C13F3F692B7F883A0083BE40 /* AuthConfirmationPromptViewController.swift */; };
Expand Down Expand Up @@ -2272,7 +2271,6 @@
C12726ED2A5FF88C00215B02 /* EmailSignupPromptView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmailSignupPromptView.swift; sourceTree = "<group>"; };
C12726EF2A5FF89900215B02 /* EmailSignupPromptViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmailSignupPromptViewModel.swift; sourceTree = "<group>"; };
C12726F12A5FF8CB00215B02 /* EmailSignupPromptViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmailSignupPromptViewController.swift; sourceTree = "<group>"; };
C136C7532BEB8CFC00ACC3B0 /* PasswordsSurveyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PasswordsSurveyView.swift; sourceTree = "<group>"; };
C13B32D12A0E750700A59236 /* AutofillSettingStatus.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AutofillSettingStatus.swift; sourceTree = "<group>"; };
C13F3F672B7F88100083BE40 /* AuthConfirmationPromptView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthConfirmationPromptView.swift; sourceTree = "<group>"; };
C13F3F692B7F883A0083BE40 /* AuthConfirmationPromptViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AuthConfirmationPromptViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -5393,7 +5391,6 @@
C1CDA3152AFB9C7F006D1476 /* AutofillNeverPromptWebsitesManager.swift */,
C13B32D12A0E750700A59236 /* AutofillSettingStatus.swift */,
319A370F28299A850079FBCE /* PasswordHider.swift */,
C136C7532BEB8CFC00ACC3B0 /* PasswordsSurveyView.swift */,
31C70B5428045E3500FB6AD1 /* SecureVaultReporter.swift */,
C1AFFC4B2B8773060060448E /* AuthConfirmation */,
F407605328131910006B1E0B /* AutofillLoginUI */,
Expand Down Expand Up @@ -6548,7 +6545,6 @@
BD862E0B2B30F9300073E2EE /* VPNFeedbackFormView.swift in Sources */,
850365F323DE087800D0F787 /* UIImageViewExtension.swift in Sources */,
373608922ABB430D00629E7F /* FavoritesDisplayMode+UserDefaults.swift in Sources */,
C136C7542BEB8CFC00ACC3B0 /* PasswordsSurveyView.swift in Sources */,
C160544129D6044D00B715A1 /* AutofillInterfaceUsernameTruncator.swift in Sources */,
31C70B5528045E3500FB6AD1 /* SecureVaultReporter.swift in Sources */,
F4CE6D1B257EA33C00D0A6AA /* FireButtonAnimator.swift in Sources */,
Expand Down
1 change: 0 additions & 1 deletion DuckDuckGo/AppSettings.swift
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ protocol AppSettings: AnyObject {
func setAutofillIsNewInstallForOnByDefault()
var autofillImportViaSyncStart: Date? { get set }
func clearAutofillImportViaSyncStart()
var autofillSurveyEnabled: Bool { get set }

var voiceSearchEnabled: Bool { get set }

Expand Down
3 changes: 0 additions & 3 deletions DuckDuckGo/AppUserDefaults.swift
Original file line number Diff line number Diff line change
Expand Up @@ -300,9 +300,6 @@ public class AppUserDefaults: AppSettings {
autofillImportViaSyncStart = nil
}

@UserDefaultsWrapper(key: .autofillSurveyEnabled, defaultValue: true)
var autofillSurveyEnabled: Bool

@UserDefaultsWrapper(key: .voiceSearchEnabled, defaultValue: false)
var voiceSearchEnabled: Bool

Expand Down

This file was deleted.

This file was deleted.

4 changes: 0 additions & 4 deletions DuckDuckGo/AutofillDebugViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ class AutofillDebugViewController: UITableViewController {
case resetEmailProtectionInContextSignUp = 202
case resetDaysSinceInstalledTo0 = 203
case resetAutofillData = 204
case toggleAutofillSurvey = 205
}

let defaults = AppUserDefaults()
Expand All @@ -56,9 +55,6 @@ class AutofillDebugViewController: UITableViewController {
eventMapping: EventMapping<AutofillPixelEvent> { _, _, _, _ in })
autofillPixelReporter.resetStoreDefaults()
ActionMessageView.present(message: "Autofill Data reset")
} else if cell.tag == Row.toggleAutofillSurvey.rawValue {
defaults.autofillSurveyEnabled = true
ActionMessageView.present(message: "Passwords Survey enabled")
} else if cell.tag == Row.resetEmailProtectionInContextSignUp.rawValue {
EmailManager().resetEmailProtectionInContextPrompt()
tableView.deselectRow(at: indexPath, animated: true)
Expand Down
8 changes: 0 additions & 8 deletions DuckDuckGo/AutofillLoginListViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -128,14 +128,6 @@ final class AutofillLoginListViewModel: ObservableObject {

// MARK: Public Methods

func isAutofillSurveyEnabled() -> Bool {
return false
}

func disableAutofillSurvey() {
appSettings.autofillSurveyEnabled = false
}

func delete(at indexPath: IndexPath) -> Bool {
let section = sections[indexPath.section]
switch section {
Expand Down
43 changes: 0 additions & 43 deletions DuckDuckGo/AutofillLoginSettingsListViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -206,43 +206,6 @@ final class AutofillLoginSettingsListViewController: UIViewController {
updateViewState()
configureNotification()
registerForKeyboardNotifications()

addSurveyView()
}

func addSurveyView() {
guard Locale.current.isEnglishLanguage, viewModel.isAutofillSurveyEnabled() else {
if tableView.tableHeaderView != nil {
tableView.tableHeaderView = nil
}
return
}
let messageView = PasswordsSurveyView(surveyButtonAction: { [weak self] in
let survey = "https://selfserve.decipherinc.com/survey/selfserve/32ab/240409"
if let surveyURL = URL(string: survey) {
let surveyURLBuilder = DefaultRemoteMessagingSurveyURLBuilder()
let surveyURLWithParameters = surveyURLBuilder.addPasswordsCountSurveyParameter(to: surveyURL)
LaunchTabNotification.postLaunchTabNotification(urlString: surveyURLWithParameters.absoluteString)
} else {
LaunchTabNotification.postLaunchTabNotification(urlString: survey)
}
self?.viewModel.disableAutofillSurvey()
self?.dismiss(animated: true)

}, closeButtonAction: { [weak self] in
self?.viewModel.disableAutofillSurvey()
self?.removeSurveyView()
})

let hostingController = UIHostingController(rootView: messageView)
hostingController.view.frame = CGRect(origin: .zero, size: hostingController.sizeThatFits(in: UIScreen.main.bounds.size))
hostingController.view.layoutIfNeeded()
hostingController.view.backgroundColor = .clear
tableView.tableHeaderView = hostingController.view
}

func removeSurveyView() {
tableView.tableHeaderView = nil
}

override func viewDidAppear(_ animated: Bool) {
Expand Down Expand Up @@ -285,12 +248,6 @@ final class AutofillLoginSettingsListViewController: UIViewController {
viewModel.isEditing = editing
tableView.reloadData()

if editing {
removeSurveyView()
} else {
addSurveyView()
}

updateNavigationBarButtons()
updateSearchController()
updateToolbar()
Expand Down
Loading

0 comments on commit 5faff38

Please sign in to comment.