Skip to content

Commit

Permalink
Remove waitlist beta "Thank You" logic (#3101)
Browse files Browse the repository at this point in the history
Task/Issue URL: https://app.asana.com/0/1199230911884351/1208050130733767/f
Tech Design URL:
CC:

Description:

This PR removes some code that was only used for the waitlist beta. It is no longer used, so it's being removed.
  • Loading branch information
samsymons authored Aug 14, 2024
1 parent b2c958e commit 30bb281
Show file tree
Hide file tree
Showing 15 changed files with 0 additions and 421 deletions.
18 changes: 0 additions & 18 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1212,8 +1212,6 @@
4B4D60E22A0C883A00BCD287 /* AppMain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4D60E12A0C883A00BCD287 /* AppMain.swift */; };
4B4D60E32A0C883A00BCD287 /* AppMain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4D60E12A0C883A00BCD287 /* AppMain.swift */; };
4B4F72EC266B2ED300814C60 /* CollectionExtension.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B4F72EB266B2ED300814C60 /* CollectionExtension.swift */; };
4B520F632BA5573A006405C7 /* WaitlistThankYouView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B520F622BA5573A006405C7 /* WaitlistThankYouView.swift */; };
4B520F642BA5573A006405C7 /* WaitlistThankYouView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B520F622BA5573A006405C7 /* WaitlistThankYouView.swift */; };
4B59023E26B35F3600489384 /* ChromiumLoginReader.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B59023926B35F3600489384 /* ChromiumLoginReader.swift */; };
4B59024026B35F3600489384 /* ChromiumDataImporter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B59023B26B35F3600489384 /* ChromiumDataImporter.swift */; };
4B59024826B3673600489384 /* ThirdPartyBrowser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B59024726B3673600489384 /* ThirdPartyBrowser.swift */; };
Expand All @@ -1230,8 +1228,6 @@
4B6785482AA8DE69008A5004 /* VPNUninstaller.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B6785432AA8DE1F008A5004 /* VPNUninstaller.swift */; };
4B67854A2AA8DE75008A5004 /* VPNFeatureGatekeeper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BD8679A2A9E9E000063B9F7 /* VPNFeatureGatekeeper.swift */; };
4B67854B2AA8DE76008A5004 /* VPNFeatureGatekeeper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7BD8679A2A9E9E000063B9F7 /* VPNFeatureGatekeeper.swift */; };
4B6B64842BA930420009FF9F /* WaitlistThankYouPromptPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B6B64832BA930420009FF9F /* WaitlistThankYouPromptPresenter.swift */; };
4B6B64852BA930420009FF9F /* WaitlistThankYouPromptPresenter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B6B64832BA930420009FF9F /* WaitlistThankYouPromptPresenter.swift */; };
4B70C00127B0793D000386ED /* DuckDuckGo-ExampleCrash.ips in Resources */ = {isa = PBXBuildFile; fileRef = 4B70BFFF27B0793D000386ED /* DuckDuckGo-ExampleCrash.ips */; };
4B70C00227B0793D000386ED /* CrashReportTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B70C00027B0793D000386ED /* CrashReportTests.swift */; };
4B723E0526B0003E00E14D75 /* DataImportMocks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B723DFF26B0003E00E14D75 /* DataImportMocks.swift */; };
Expand Down Expand Up @@ -1595,8 +1591,6 @@
7B7F5D222C526CE600826256 /* AddExcludedDomainView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B7F5D202C526CE600826256 /* AddExcludedDomainView.swift */; };
7B7F5D242C52725A00826256 /* AddExcludedDomainButtonsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B7F5D232C52725A00826256 /* AddExcludedDomainButtonsView.swift */; };
7B7F5D252C52725A00826256 /* AddExcludedDomainButtonsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B7F5D232C52725A00826256 /* AddExcludedDomainButtonsView.swift */; };
7B7FCD0F2BA33B2700C04FBE /* UserDefaults+vpnLegacyUser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B7FCD0E2BA33B2700C04FBE /* UserDefaults+vpnLegacyUser.swift */; };
7B7FCD102BA33B2700C04FBE /* UserDefaults+vpnLegacyUser.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B7FCD0E2BA33B2700C04FBE /* UserDefaults+vpnLegacyUser.swift */; };
7B8594192B5B26230007EB3E /* UDSHelper in Frameworks */ = {isa = PBXBuildFile; productRef = 7B8594182B5B26230007EB3E /* UDSHelper */; };
7B8DB31A2B504D7500EC16DA /* VPNAppEventsHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B8DB3192B504D7500EC16DA /* VPNAppEventsHandler.swift */; };
7B934C412A866DD400FC8F9C /* UserDefaults+NetworkProtectionShared.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B934C402A866DD400FC8F9C /* UserDefaults+NetworkProtectionShared.swift */; };
Expand Down Expand Up @@ -3295,7 +3289,6 @@
4B4D60D22A0C84F700BCD287 /* UserText+NetworkProtection.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "UserText+NetworkProtection.swift"; sourceTree = "<group>"; };
4B4D60E12A0C883A00BCD287 /* AppMain.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppMain.swift; sourceTree = "<group>"; };
4B4F72EB266B2ED300814C60 /* CollectionExtension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CollectionExtension.swift; sourceTree = "<group>"; };
4B520F622BA5573A006405C7 /* WaitlistThankYouView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistThankYouView.swift; sourceTree = "<group>"; };
4B59023926B35F3600489384 /* ChromiumLoginReader.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChromiumLoginReader.swift; sourceTree = "<group>"; };
4B59023B26B35F3600489384 /* ChromiumDataImporter.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChromiumDataImporter.swift; sourceTree = "<group>"; };
4B59024726B3673600489384 /* ThirdPartyBrowser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ThirdPartyBrowser.swift; sourceTree = "<group>"; };
Expand All @@ -3313,7 +3306,6 @@
4B677440255DBEEA00025BD8 /* Database.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Database.swift; sourceTree = "<group>"; };
4B677454255DC18000025BD8 /* Bridging.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Bridging.h; sourceTree = "<group>"; };
4B6785432AA8DE1F008A5004 /* VPNUninstaller.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = VPNUninstaller.swift; sourceTree = "<group>"; };
4B6B64832BA930420009FF9F /* WaitlistThankYouPromptPresenter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = WaitlistThankYouPromptPresenter.swift; sourceTree = "<group>"; };
4B70BFFF27B0793D000386ED /* DuckDuckGo-ExampleCrash.ips */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "DuckDuckGo-ExampleCrash.ips"; sourceTree = "<group>"; };
4B70C00027B0793D000386ED /* CrashReportTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CrashReportTests.swift; sourceTree = "<group>"; };
4B723DEB26B0002B00E14D75 /* DataImport.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DataImport.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -3553,7 +3545,6 @@
7B76E6852AD5D77600186A84 /* XPCHelper */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = XPCHelper; sourceTree = "<group>"; };
7B7F5D202C526CE600826256 /* AddExcludedDomainView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddExcludedDomainView.swift; sourceTree = "<group>"; };
7B7F5D232C52725A00826256 /* AddExcludedDomainButtonsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AddExcludedDomainButtonsView.swift; sourceTree = "<group>"; };
7B7FCD0E2BA33B2700C04FBE /* UserDefaults+vpnLegacyUser.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UserDefaults+vpnLegacyUser.swift"; sourceTree = "<group>"; };
7B8594172B5B25FB0007EB3E /* UDSHelper */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = UDSHelper; sourceTree = "<group>"; };
7B8DB3192B504D7500EC16DA /* VPNAppEventsHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VPNAppEventsHandler.swift; sourceTree = "<group>"; };
7B9167A82C09E88800322310 /* AppLauncher */ = {isa = PBXFileReference; lastKnownFileType = wrapper; path = AppLauncher; sourceTree = "<group>"; };
Expand Down Expand Up @@ -5742,7 +5733,6 @@
7BD8679A2A9E9E000063B9F7 /* VPNFeatureGatekeeper.swift */,
4B6785432AA8DE1F008A5004 /* VPNUninstaller.swift */,
7BFF35722C10D75000F89673 /* IPCServiceLauncher.swift */,
7B7FCD0E2BA33B2700C04FBE /* UserDefaults+vpnLegacyUser.swift */,
31F2D1FE2AF026D800BF0144 /* WaitlistTermsAndConditionsActionHandler.swift */,
31C9ADE42AF0564500CEF57D /* WaitlistFeatureSetupHandler.swift */,
4B9DB0072A983B23000927DB /* Waitlist.swift */,
Expand Down Expand Up @@ -5789,8 +5779,6 @@
4B9DB0182A983B24000927DB /* WaitlistDialogView.swift */,
4B9DB0192A983B24000927DB /* WaitlistModalViewController.swift */,
3168506C2AF3AD1C009A2828 /* WaitlistViewControllerPresenter.swift */,
4B520F622BA5573A006405C7 /* WaitlistThankYouView.swift */,
4B6B64832BA930420009FF9F /* WaitlistThankYouPromptPresenter.swift */,
);
path = Views;
sourceTree = "<group>";
Expand Down Expand Up @@ -9900,7 +9888,6 @@
3706FA7E293F65D500E42796 /* LottieAnimationCache.swift in Sources */,
9F982F0E2B8224BF00231028 /* AddEditBookmarkFolderDialogViewModel.swift in Sources */,
3706FA7F293F65D500E42796 /* TabIndex.swift in Sources */,
4B520F642BA5573A006405C7 /* WaitlistThankYouView.swift in Sources */,
3706FA80293F65D500E42796 /* TabLazyLoaderDataSource.swift in Sources */,
3706FA81293F65D500E42796 /* LoginImport.swift in Sources */,
560C40002BCD5A1E00F589CE /* PermanentSurveyManager.swift in Sources */,
Expand Down Expand Up @@ -10223,7 +10210,6 @@
1D4071AF2BD64267002D4537 /* DockCustomizer.swift in Sources */,
4B41EDA42B1543B9001EEDF4 /* VPNPreferencesModel.swift in Sources */,
1E559BB22BBCA9F1002B4AF6 /* RedirectNavigationResponder.swift in Sources */,
7B7FCD102BA33B2700C04FBE /* UserDefaults+vpnLegacyUser.swift in Sources */,
3706FB6C293F65D500E42796 /* FaviconStore.swift in Sources */,
3706FB6D293F65D500E42796 /* SuggestionListCharacteristics.swift in Sources */,
F1C70D7A2BFF50A400599292 /* DataBrokerProtectionLoginItemInterface.swift in Sources */,
Expand Down Expand Up @@ -10481,7 +10467,6 @@
4B9DB0452A983B24000927DB /* WaitlistModalViewController.swift in Sources */,
B66CA41F2AD910B300447CF0 /* DataImportView.swift in Sources */,
3706FC0C293F65D500E42796 /* NSAttributedStringExtension.swift in Sources */,
4B6B64852BA930420009FF9F /* WaitlistThankYouPromptPresenter.swift in Sources */,
C1DAF3B62B9A44860059244F /* AutofillPopoverPresenter.swift in Sources */,
3706FC0D293F65D500E42796 /* AnimationView.swift in Sources */,
9FA173DB2B79BD8A00EE4E6E /* BookmarkDialogContainerView.swift in Sources */,
Expand Down Expand Up @@ -11759,7 +11744,6 @@
7B430EA12A71411A00BAC4A1 /* NetworkProtectionSimulateFailureMenu.swift in Sources */,
1E7E2E942902AC0E00C01B54 /* PrivacyDashboardPermissionHandler.swift in Sources */,
AA9FF95F24A1FB690039E328 /* TabCollectionViewModel.swift in Sources */,
4B520F632BA5573A006405C7 /* WaitlistThankYouView.swift in Sources */,
4BF0E5052AD2551A00FFEC9E /* NetworkProtectionPixelEvent.swift in Sources */,
AAC5E4D125D6A709007F5990 /* BookmarkManager.swift in Sources */,
37CD54CD27F2FDD100F1F7B9 /* AboutPreferences.swift in Sources */,
Expand Down Expand Up @@ -12053,7 +12037,6 @@
4B379C1E27BDB7FF008A968E /* DeviceAuthenticator.swift in Sources */,
1456D6E124EFCBC300775049 /* TabBarCollectionView.swift in Sources */,
4B4D60BF2A0C848A00BCD287 /* NetworkProtection+ConvenienceInitializers.swift in Sources */,
4B6B64842BA930420009FF9F /* WaitlistThankYouPromptPresenter.swift in Sources */,
7B5A23682C468233007213AC /* ExcludedDomainsViewController.swift in Sources */,
BDA7647C2BC497BE00D0400C /* DefaultVPNLocationFormatter.swift in Sources */,
3158B1592B0BF76400AF130C /* DataBrokerProtectionFeatureDisabler.swift in Sources */,
Expand Down Expand Up @@ -12156,7 +12139,6 @@
9F514F912B7D88AD001832A9 /* AddEditBookmarkFolderDialogView.swift in Sources */,
9FA173E32B7A12B600EE4E6E /* BookmarkDialogFolderManagementView.swift in Sources */,
37534CA8281198CD002621E7 /* AdjacentItemEnumerator.swift in Sources */,
7B7FCD0F2BA33B2700C04FBE /* UserDefaults+vpnLegacyUser.swift in Sources */,
987799F62999996B005D8EB6 /* BookmarkDatabase.swift in Sources */,
7BB4BC6A2C5CD96200E06FC8 /* ActiveDomainPublisher.swift in Sources */,
4BE53374286E39F10019DBFD /* ChromiumKeychainPrompt.swift in Sources */,
Expand Down
1 change: 0 additions & 1 deletion DuckDuckGo/Application/URLEventHandler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,6 @@ final class URLEventHandler {
}

if url.scheme?.isNetworkProtectionScheme == false && url.scheme?.isDataBrokerProtectionScheme == false {
WaitlistModalDismisser.dismissWaitlistModalViewControllerIfNecessary(url)
WindowControllersManager.shared.show(url: url, source: .appOpenUrl, newTab: true)
}
}
Expand Down
20 changes: 0 additions & 20 deletions DuckDuckGo/Common/Localizables/UserText+NetworkProtection.swift
Original file line number Diff line number Diff line change
Expand Up @@ -226,23 +226,3 @@ extension UserText {
return "\(city), \(country)"
}
}

// MARK: - Thank You Modals

extension UserText {
static let dbpThankYouTitle = "Personal Information Removal early access is over"
static let dbpThankYouSubtitle = "Thank you for being a tester!"
static let dbpThankYouBody1 = "To continue using Personal Information Removal, subscribe to DuckDuckGo Privacy Pro and get 40% off with promo code THANKYOU"

static let vpnThankYouTitle = "DuckDuckGo VPN early access is over"
static let vpnThankYouSubtitle = "Thank you for being a tester!"
static let vpnThankYouBody1 = "To continue using the VPN, subscribe to DuckDuckGo Privacy Pro and get 40% off with promo code THANKYOU"

#if APPSTORE
static let dbpThankYouBody2 = "Offer redeemable for a limited time only in the desktop version of the DuckDuckGo browser by U.S. testers when you download from duckduckgo.com/app"
static let vpnThankYouBody2 = "Offer redeemable for a limited time only in the desktop version of the DuckDuckGo browser by U.S. testers when you download from duckduckgo.com/app"
#else
static let dbpThankYouBody2 = "Offer redeemable for a limited time in the desktop version of the DuckDuckGo browser by U.S. beta testers only."
static let vpnThankYouBody2 = "Offer redeemable for a limited time in the desktop version of the DuckDuckGo browser by U.S. beta testers only."
#endif
}
4 changes: 0 additions & 4 deletions DuckDuckGo/Common/Utilities/UserDefaultsWrapper.swift
Original file line number Diff line number Diff line change
Expand Up @@ -174,17 +174,13 @@ public struct UserDefaultsWrapper<T> {
// VPN

case networkProtectionExcludedRoutes = "netp.excluded-routes"
case networkProtectionTermsAndConditionsAccepted = "network-protection.waitlist-terms-and-conditions.accepted"
case networkProtectionWaitlistSignUpPromptDismissed = "network-protection.waitlist.sign-up-prompt-dismissed"

// VPN: Shared Defaults
// ---
// Please note that shared defaults MUST have a name that matches exactly their value,
// or else KVO will just not work as of 2023-08-07

case networkProtectionOnboardingStatusRawValue = "networkProtectionOnboardingStatusRawValue"
case networkProtectionWaitlistActiveOverrideRawValue = "networkProtectionWaitlistActiveOverrideRawValue"
case networkProtectionWaitlistEnabledOverrideRawValue = "networkProtectionWaitlistEnabledOverrideRawValue"

// Updates
case automaticUpdates = "updates.automatic"
Expand Down
2 changes: 0 additions & 2 deletions DuckDuckGo/Menus/MainMenu.swift
Original file line number Diff line number Diff line change
Expand Up @@ -601,8 +601,6 @@ final class MainMenu: NSMenu {
NSMenuItem(title: "Show Save Credentials Popover", action: #selector(MainViewController.showSaveCredentialsPopover))
NSMenuItem(title: "Show Credentials Saved Popover", action: #selector(MainViewController.showCredentialsSavedPopover))
NSMenuItem(title: "Show Pop Up Window", action: #selector(MainViewController.showPopUpWindow))
NSMenuItem(title: "Show VPN Thank You Modal", action: #selector(MainViewController.showVPNThankYouModal))
NSMenuItem(title: "Reset Thank You Modal Checks", action: #selector(MainViewController.resetThankYouModalChecks))
}
NSMenuItem(title: "Remote Configuration") {
customConfigurationUrlMenuItem
Expand Down
15 changes: 0 additions & 15 deletions DuckDuckGo/Menus/MainMenuActions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,6 @@ extension MainViewController {
///
private func clearPrivacyProState() {
Application.appDelegate.subscriptionManager.accountManager.signOut()
resetThankYouModalChecks(nil)
UserDefaults.netP.networkProtectionEntitlementsExpired = false
}

Expand Down Expand Up @@ -897,20 +896,6 @@ extension MainViewController {
WindowsManager.openPopUpWindow(with: tab, origin: nil, contentSize: nil)
}

@objc func resetThankYouModalChecks(_ sender: Any?) {
let presenter = WaitlistThankYouPromptPresenter()
presenter.resetPromptCheck()
UserDefaults.netP.removeObject(forKey: UserDefaults.vpnLegacyUserAccessDisabledOnceKey)
}

@objc func showVPNThankYouModal(_ sender: Any?) {
let thankYouModalView = WaitlistBetaThankYouDialogViewController(copy: .vpn)
let thankYouWindowController = thankYouModalView.wrappedInWindowController()
if let thankYouWindow = thankYouWindowController.window {
WindowsManager.windows.first?.beginSheet(thankYouWindow)
}
}

@objc func resetEmailProtectionInContextPrompt(_ sender: Any?) {
EmailManager().resetEmailProtectionInContextPrompt()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,6 @@ final class NetworkProtectionDebugUtilities {

settings.resetToDefaults()

UserDefaults().removeObject(forKey: UserDefaultsWrapper<Bool>.Key.networkProtectionTermsAndConditionsAccepted.rawValue)
NotificationCenter.default.post(name: .networkProtectionWaitlistAccessChanged, object: nil)
UserDefaults.netP.networkProtectionEntitlementsExpired = false
}

Expand Down
1 change: 0 additions & 1 deletion DuckDuckGo/Waitlist/Models/WaitlistViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,6 @@ final class WaitlistViewModel: ObservableObject {
switch action {
case .joinQueue:
await joinWaitlist()
NotificationCenter.default.post(name: .networkProtectionWaitlistAccessChanged, object: nil)
case .requestNotificationPermission:
requestNotificationPermission()
case .showTermsAndConditions: showTermsAndConditions()
Expand Down
40 changes: 0 additions & 40 deletions DuckDuckGo/Waitlist/UserDefaults+vpnLegacyUser.swift

This file was deleted.

10 changes: 0 additions & 10 deletions DuckDuckGo/Waitlist/Views/WaitlistModalViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,3 @@ extension WaitlistModalViewController: WaitlistViewModelDelegate {
}

}

struct WaitlistModalDismisser {

// Small hack to force the waitlist modal view controller to dismiss all instances of itself whenever the user opens a link from the T&C view.
static func dismissWaitlistModalViewControllerIfNecessary(_ url: URL) {
if ["https://duckduckgo.com/privacy", "https://duckduckgo.com/terms"].contains(url.absoluteString) {
NotificationCenter.default.post(name: .waitlistModalViewControllerShouldDismiss, object: nil)
}
}
}
Loading

0 comments on commit 30bb281

Please sign in to comment.