Skip to content

Commit

Permalink
Remove Old onboarding intro (#3554)
Browse files Browse the repository at this point in the history
Task/Issue URL:
https://app.asana.com/0/72649045549333/1208711411340874/f

**Description**:
Remove the old onboarding for returning users as discussed in [Asana](https://app.asana.com/0/1205738382433043/1208592180486162/f)
  • Loading branch information
alessandroboron authored Nov 12, 2024
1 parent e8b0c2b commit 1fd625f
Show file tree
Hide file tree
Showing 11 changed files with 6 additions and 437 deletions.
4 changes: 0 additions & 4 deletions DuckDuckGo.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,6 @@
85864FBC24D31EF300E756FF /* SuggestionTrayViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85864FBB24D31EF300E756FF /* SuggestionTrayViewController.swift */; };
858650D12469BCDE00C36F8A /* DaxDialogs.swift in Sources */ = {isa = PBXBuildFile; fileRef = 858650D02469BCDE00C36F8A /* DaxDialogs.swift */; };
858650D32469BFAD00C36F8A /* DaxDialogTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 858650D22469BFAD00C36F8A /* DaxDialogTests.swift */; };
858650D9246B0D3C00C36F8A /* DaxOnboardingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 858650D8246B0D3C00C36F8A /* DaxOnboardingViewController.swift */; };
858650DB246B111900C36F8A /* DaxOnboarding.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 858650DA246B111900C36F8A /* DaxOnboarding.xcassets */; };
8586A10D24CBA7070049720E /* FindInPageActivity.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8586A10C24CBA7070049720E /* FindInPageActivity.swift */; };
8586A10E24CBAF5B0049720E /* Core.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F143C2E41E4A4CD400CFDE3A /* Core.framework */; };
Expand Down Expand Up @@ -1815,7 +1814,6 @@
85864FBB24D31EF300E756FF /* SuggestionTrayViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SuggestionTrayViewController.swift; sourceTree = "<group>"; };
858650D02469BCDE00C36F8A /* DaxDialogs.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DaxDialogs.swift; sourceTree = "<group>"; };
858650D22469BFAD00C36F8A /* DaxDialogTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DaxDialogTests.swift; sourceTree = "<group>"; };
858650D8246B0D3C00C36F8A /* DaxOnboardingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DaxOnboardingViewController.swift; sourceTree = "<group>"; };
858650DA246B111900C36F8A /* DaxOnboarding.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = DaxOnboarding.xcassets; sourceTree = "<group>"; };
8586A10C24CBA7070049720E /* FindInPageActivity.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FindInPageActivity.swift; sourceTree = "<group>"; };
8586A10F24CCCD040049720E /* TabsBarViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TabsBarViewController.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -4431,7 +4429,6 @@
984147CB24F02E9E00362052 /* DaxOnboarding.storyboard */,
858650D02469BCDE00C36F8A /* DaxDialogs.swift */,
858650DA246B111900C36F8A /* DaxOnboarding.xcassets */,
858650D8246B0D3C00C36F8A /* DaxOnboardingViewController.swift */,
8524CC93246C5C8900E59D45 /* DaxDialogViewController.swift */,
8524CC99246DA81700E59D45 /* FullscreenDaxDialogViewController.swift */,
F42EF9302614BABD00101FB9 /* ActionSheetDaxDialogViewController.swift */,
Expand Down Expand Up @@ -7746,7 +7743,6 @@
9FF7E9862C23D10300902BE5 /* BrowsersComparisonChart.swift in Sources */,
6F64AA532C47E92600CF4489 /* FavoritesFaviconLoader.swift in Sources */,
4B274F602AFEAECC003F0745 /* NetworkProtectionWidgetRefreshModel.swift in Sources */,
858650D9246B0D3C00C36F8A /* DaxOnboardingViewController.swift in Sources */,
312E5746283BB04A00C18FA0 /* AutofillEmptySearchView.swift in Sources */,
8565A34B1FC8D96B00239327 /* LaunchTabNotification.swift in Sources */,
311BD1AD2836BB3900AEF6C1 /* AutofillItemsEmptyView.swift in Sources */,
Expand Down
153 changes: 4 additions & 149 deletions DuckDuckGo/Base.lproj/DaxOnboarding.storyboard

Large diffs are not rendered by default.

This file was deleted.

Binary file not shown.
Binary file not shown.
206 changes: 0 additions & 206 deletions DuckDuckGo/DaxOnboardingViewController.swift

This file was deleted.

15 changes: 2 additions & 13 deletions DuckDuckGo/MainViewController+Segues.swift
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,8 @@ extension MainViewController {
Logger.lifecycle.debug(#function)
hideAllHighlightsIfNeeded()

var controller: (Onboarding & UIViewController)?

if DefaultVariantManager().isNewIntroFlow {
controller = OnboardingIntroViewController(onboardingPixelReporter: contextualOnboardingPixelReporter)
} else {
let storyboard = UIStoryboard(name: "DaxOnboarding", bundle: nil)
controller = storyboard.instantiateInitialViewController(creator: { coder in
DaxOnboardingViewController(coder: coder, pixelReporting: self.contextualOnboardingPixelReporter)
})
}

controller?.delegate = self
guard let controller else { return assertionFailure() }
let controller = OnboardingIntroViewController(onboardingPixelReporter: contextualOnboardingPixelReporter)
controller.delegate = self
controller.modalPresentationStyle = .overFullScreen
present(controller, animated: false)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ import BrowserServicesKit

extension VariantManager {

var isNewIntroFlow: Bool {
isSupported(feature: .newOnboardingIntro) || isSupported(feature: .newOnboardingIntroHighlights)
}

var isOnboardingHighlightsExperiment: Bool {
isSupported(feature: .newOnboardingIntroHighlights)
}
Expand Down
4 changes: 0 additions & 4 deletions DuckDuckGo/UserText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,6 @@ public struct UserText {

public static let favorite = NSLocalizedString("favorite", value: "Favorite", comment: "")

public static let launchscreenWelcomeMessage = NSLocalizedString("launchscreenWelcomeMessage", value: "Welcome to\nDuckDuckGo!", comment: "Please preserve newline character")
public static let onboardingWelcomeHeader = NSLocalizedString("onboardingWelcomeHeader", value: "Welcome to DuckDuckGo!", comment: "")
public static let onboardingContinue = NSLocalizedString("onboardingContinue", value: "Continue", comment: "")
public static let onboardingSkip = NSLocalizedString("onboardingSkip", value: "Skip", comment: "")
Expand Down Expand Up @@ -274,9 +273,6 @@ public struct UserText {
public static let daxDialogFireButtonEducationConfirmAction = NSLocalizedString("dax.onboarding.fire.button.confirmAction", value: "Close Tabs and Clear Data", comment: "Encourage user to try clearing data with the fire button")
public static let daxDialogFireButtonEducationCancelAction = NSLocalizedString("dax.onboarding.fire.button.cancelAction", value: "Cancel", comment: "Cancel action")


public static let daxDialogOnboardingMessage = NSLocalizedString("dax.onboarding.message", value: "The Internet can be kinda creepy.\n\nNot to worry! Searching and browsing privately is easier than you think.", comment: "")

public static let daxDialogHideTitle = NSLocalizedString("dax.hide.title", value: "Hide remaining tips?", comment: "Title in Hide Dax dialog")
public static let daxDialogHideMessage = NSLocalizedString("dax.hide.message", value: "There are only a few, and we tried to make them informative.", comment: "Subtitle in Hide Dax dialog")
public static let daxDialogHideButton = NSLocalizedString("dax.hide.button", value: "Hide Tips Forever", comment: "")
Expand Down
6 changes: 0 additions & 6 deletions DuckDuckGo/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -962,9 +962,6 @@
/* ad = advertisment */
"dax.onboarding.home.subsequent" = "You’ve got this!\n\nRemember: Every time you browse with me, a creepy ad loses its wings. 👍";

/* No comment provided by engineer. */
"dax.onboarding.message" = "The Internet can be kinda creepy.\n\nNot to worry! Searching and browsing privately is easier than you think.";

/* Default string used if users device is not iPhone or iPad */
"device.type.default" = "device";

Expand Down Expand Up @@ -1565,9 +1562,6 @@
/* No comment provided by engineer. */
"keyCommandShowAllTabs" = "Show All Tabs";

/* Please preserve newline character */
"launchscreenWelcomeMessage" = "Welcome to\nDuckDuckGo!";

/* Summary text for the macOS browser waitlist */
"mac-browser.waitlist.summary" = "DuckDuckGo for Mac has the speed you need, the browsing features you expect, and comes packed with our best-in-class privacy essentials.";

Expand Down
35 changes: 0 additions & 35 deletions DuckDuckGoTests/DefaultVariantManagerOnboardingTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,41 +24,6 @@ import BrowserServicesKit

final class DefaultVariantManagerOnboardingTests: XCTestCase {

// MARK: - Is New Intro Flow

func testWhenIsNewIntroFlow_AndFeatureIsNewOnboardingIntro_ThenReturnTrue() {
// GIVEN
let sut = makeVariantManager(features: [.newOnboardingIntro])

// WHEN
let result = sut.isNewIntroFlow

// THEN
XCTAssertTrue(result)
}

func testWhenIsNewIntroFlow_AndFeaturesContainNewOnboardingIntroHighlights_ThenReturnTrue() {
// GIVEN
let sut = makeVariantManager(features: [.newOnboardingIntroHighlights])

// WHEN
let result = sut.isNewIntroFlow

// THEN
XCTAssertTrue(result)
}

func testWhenIsNewIntroFlow_AndFeaturesDoNotContainNewOnboardingIntroOrNewOnboardingIntroHighlights_ThenReturnFalse() {
// GIVEN
let sut = makeVariantManager(features: [.contextualDaxDialogs])

// WHEN
let result = sut.isNewIntroFlow

// THEN
XCTAssertFalse(result)
}

// MARK: - Is Onboarding Highlights

func testWhenIsOnboardingHighlights_AndFeaturesContainOnboardingHighlights_ThenReturnTrue() {
Expand Down

0 comments on commit 1fd625f

Please sign in to comment.