Skip to content

Commit

Permalink
Update Add To Dock copy
Browse files Browse the repository at this point in the history
  • Loading branch information
alessandroboron committed Nov 6, 2024
1 parent 599ff9e commit 6de2142
Show file tree
Hide file tree
Showing 9 changed files with 44 additions and 47 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ struct AddToDockTutorial_Previews: PreviewProvider {
AddToDockTutorialView(
title: UserText.AddToDockOnboarding.Tutorial.title,
message: UserText.AddToDockOnboarding.Tutorial.message,
cta: UserText.AddToDockOnboarding.Buttons.dismiss,
cta: UserText.AddToDockOnboarding.Buttons.startBrowsing,
action: {}
)
.padding()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,14 @@ extension OnboardingView {

var body: some View {
if showAddToDockTutorial {
OnboardingAddToDockTutorialContent(cta: UserText.AddToDockOnboarding.Intro.tutorialDismissCTA) {
OnboardingAddToDockTutorialContent(cta: UserText.AddToDockOnboarding.Buttons.gotIt) {
dismissAction(true)
}
} else {
ContextualDaxDialogContent(
title: UserText.AddToDockOnboarding.Intro.title,
title: UserText.AddToDockOnboarding.Promo.title,
titleFont: Font(UIFont.daxTitle3()),
message: NSAttributedString(string: UserText.AddToDockOnboarding.Intro.message),
message: NSAttributedString(string: UserText.AddToDockOnboarding.Promo.introMessage),
messageFont: Font.system(size: 16),
customView: AnyView(addToDockPromoView),
customActionView: AnyView(customActionView)
Expand All @@ -75,14 +75,14 @@ extension OnboardingView {
private var customActionView: some View {
VStack {
OnboardingCTAButton(
title: UserText.AddToDockOnboarding.Buttons.addToDockTutorial,
title: UserText.AddToDockOnboarding.Buttons.tutorial,
action: {
showAddToDockTutorial = true
}
)

OnboardingCTAButton(
title: UserText.AddToDockOnboarding.Intro.skipCTA,
title: UserText.AddToDockOnboarding.Buttons.skip,
buttonStyle: .ghost,
action: {
dismissAction(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ struct OnboardingFinalDialog: View {
ScrollView(.vertical, showsIndicators: false) {
DaxDialogView(logoPosition: logoPosition) {
if showAddToDockTutorial {
OnboardingAddToDockTutorialContent(cta: UserText.AddToDockOnboarding.Buttons.dismiss) {
OnboardingAddToDockTutorialContent(cta: UserText.AddToDockOnboarding.Buttons.startBrowsing) {
dismissAction(true)
}
} else {
Expand Down Expand Up @@ -232,7 +232,7 @@ struct OnboardingFinalDialog: View {
VStack {
if canShowAddToDockTutorial {
OnboardingCTAButton(
title: UserText.AddToDockOnboarding.Buttons.addToDockTutorial,
title: UserText.AddToDockOnboarding.Buttons.tutorial,
action: {
showAddToDockTutorial = true
}
Expand Down Expand Up @@ -335,8 +335,8 @@ struct OnboardingAddToDockTutorialContent: View {
#Preview("Final Dialog - Add to Dock Tutorial") {
OnboardingFinalDialog(
logoPosition: .left,
message: UserText.AddToDockOnboarding.EndOfJourney.message,
cta: UserText.AddToDockOnboarding.Buttons.dismiss,
message: UserText.AddToDockOnboarding.Promo.contextualMessage,
cta: UserText.AddToDockOnboarding.Buttons.startBrowsing,
canShowAddToDockTutorial: true,
dismissAction: { _ in }
)
Expand All @@ -358,11 +358,11 @@ struct OnboardingAddToDockTutorialContent: View {
}

#Preview("Add To Dock Tutorial - Light") {
OnboardingAddToDockTutorialContent(cta: UserText.AddToDockOnboarding.Buttons.dismiss, dismissAction: {})
OnboardingAddToDockTutorialContent(cta: UserText.AddToDockOnboarding.Buttons.startBrowsing, dismissAction: {})
.preferredColorScheme(.light)
}

#Preview("Add To Dock Tutorial - Dark") {
OnboardingAddToDockTutorialContent(cta: UserText.AddToDockOnboarding.Buttons.dismiss, dismissAction: {})
OnboardingAddToDockTutorialContent(cta: UserText.AddToDockOnboarding.Buttons.startBrowsing, dismissAction: {})
.preferredColorScheme(.dark)
}
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ final class NewTabDaxDialogFactory: NewTabDaxDialogProvider {
let shouldShowAddToDock = onboardingManager.addToDockEnabledState == .contextual

let (message, cta) = if shouldShowAddToDock {
(UserText.AddToDockOnboarding.EndOfJourney.message, UserText.AddToDockOnboarding.Buttons.dismiss)
(UserText.AddToDockOnboarding.Promo.contextualMessage, UserText.AddToDockOnboarding.Buttons.startBrowsing)
} else {
(
onboardingManager.isOnboardingHighlightsEnabled ? UserText.HighlightsOnboardingExperiment.ContextualOnboarding.onboardingFinalScreenMessage : UserText.DaxOnboardingExperiment.ContextualOnboarding.onboardingFinalScreenMessage,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ final class ExperimentContextualDaxDialogsFactory: ContextualDaxDialogsFactory {
let shouldShowAddToDock = onboardingManager.addToDockEnabledState == .contextual

let (message, cta) = if shouldShowAddToDock {
(UserText.AddToDockOnboarding.EndOfJourney.message, UserText.AddToDockOnboarding.Buttons.dismiss)
(UserText.AddToDockOnboarding.Promo.contextualMessage, UserText.AddToDockOnboarding.Buttons.startBrowsing)
} else {
(
onboardingManager.isOnboardingHighlightsEnabled ? UserText.HighlightsOnboardingExperiment.ContextualOnboarding.onboardingFinalScreenMessage : UserText.DaxOnboardingExperiment.ContextualOnboarding.onboardingFinalScreenMessage,
Expand Down
23 changes: 10 additions & 13 deletions DuckDuckGo/UserText.swift
Original file line number Diff line number Diff line change
Expand Up @@ -1415,25 +1415,22 @@ But if you *do* want a peek under the hood, you can find more information about
}

public enum AddToDockOnboarding {
public enum Buttons {
static let addToDockTutorial = NSLocalizedString("contextual.onboarding.addToDock.buttons.tutorial", value: "Show Me How", comment: "Button at the end of the browser onboarding. On click it shows the user a video about how to add the application to the device dock.")
static let dismiss = NSLocalizedString("contextual.onboarding.addToDock.buttons.dismiss", value: "Start Browsing", comment: "Button on the last screen of the onboarding, it will dismiss the onboarding screen.")
}

public enum EndOfJourney {
static let message = NSLocalizedString("contextual.onboarding.addToDock.endOfJourney.message", value: "Remember, every time you browse with me a creepy ad loses its wings.\n\nSo keep me in your Dock for daily browsing.", comment: "Message of the last screen of the onboarding to the browser app.")
public enum Promo {
static let title = NSLocalizedString("contextual.onboarding.addToDock.promo.title", value: "Add me to your Dock!", comment: "The title of the onboarding dialog popup that promotes adding the DDG browser icon to the dock.")
static let introMessage = NSLocalizedString("contextual.onboarding.addToDock.promo.intro.message", value: "I’ll nest in easy reach for all your daily browsing.", comment: "The message of the onboarding dialog popup that promotes adding the DDG browser icon to the dock.")
static let contextualMessage = NSLocalizedString("contextual.onboarding.addToDock.promo.contextual.message", value: "Remember, every time you browse with me a creepy ad loses its wings.\n\nSo keep me in your Dock for daily browsing.", comment: "Message of the last screen of the onboarding that promotes adding the DDG browser icon to the dock.")
}

public enum Tutorial {
static let title = NSLocalizedString("contextual.onboarding.addToDock.tutorial.title", value: "Adding me to your Dock is easy.", comment: "The title of the onboarding dialog popup that explains how to add the DDG browser icon to the dock.")
static let message = NSLocalizedString("contextual.onboarding.addToDock.tutorial.message", value: "Find or search for the DuckDuckGo icon on your home screen. Then press and drag into place. That’s it!", comment: "The message of the onboarding dialog popup that explains how to add the DDG browser icon to the dock.")
static let message = NSLocalizedString("contextual.onboarding.addToDock.tutorial.message", value: "Find the DuckDuckGo icon on your Home Screen. Then press and drag it into place. That’s it!", comment: "The message of the onboarding dialog popup that explains how to add the DDG browser icon to the dock.")
}

public enum Intro {
static let title = NSLocalizedString("onboarding.addToDock.title", value: "Want to add me to your Dock?", comment: "The title of the onboarding dialog popup informing the user on the benefits of adding the DDG browser icon to the dock.")
static let message = NSLocalizedString("onboarding.addToDock.message", value: "I can paddle into the Dock and perch there until you need me.", comment: "The message of the onboarding dialog popup informing the user on the benefits of adding the DDG browser icon to the dock.")
static let skipCTA = NSLocalizedString("onboarding.addToDock.cta", value: "Skip", comment: "The title of the dialog button CTA to skip adding the DDB browser icon to the dock.")
static let tutorialDismissCTA = NSLocalizedString("onboarding.addToDock.tutorial.cta", value: "Got It", comment: "Button on the Add to Dock tutorial screen of the onboarding, it will dismiss the screen and proceed to the next step.")
public enum Buttons {
static let tutorial = NSLocalizedString("contextual.onboarding.addToDock.buttons.tutorial", value: "Show Me How", comment: "Button of the onboarding dialog. On click it shows a dialog with a tutorial video about how to add the DDG browser icon to the device dock.")
static let startBrowsing = NSLocalizedString("contextual.onboarding.addToDock.buttons.startBrowsing", value: "Start Browsing", comment: "Button on the last screen of the onboarding, it will dismiss the onboarding screen.")
static let skip = NSLocalizedString("contextual.onboarding.addToDock.buttons.skip", value: "Skip", comment: "Button to continue the onboarding process")
static let gotIt = NSLocalizedString("onboarding.addToDock.buttons.gotIt", value: "Got It", comment: "Button on the Add to Dock tutorial screen of the onboarding, it will proceed to the next step of the onboarding.")
}
}
}
32 changes: 16 additions & 16 deletions DuckDuckGo/en.lproj/Localizable.strings
Original file line number Diff line number Diff line change
Expand Up @@ -764,17 +764,26 @@
/* 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";

/* Button on the last screen of the onboarding, it will dismiss the onboarding screen. */
"contextual.onboarding.addToDock.buttons.dismiss" = "Start Browsing";
"contextual.onboarding.addToDock.buttons.startBrowsing" = "Start Browsing";

/* Button at the end of the browser onboarding. On click it shows the user a video about how to add the application to the device dock. */
/* Button of the onboarding dialog. On click it shows a dialog with a tutorial video about how to add the DDG browser icon to the device dock. */
"contextual.onboarding.addToDock.buttons.tutorial" = "Show Me How";

/* Message of the last screen of the onboarding to the browser app. */
"contextual.onboarding.addToDock.endOfJourney.message" = "Remember, every time you browse with me a creepy ad loses its wings.\n\nSo keep me in your Dock for daily browsing.";
/* Message of the last screen of the onboarding that promotes adding the DDG browser icon to the dock. */
"contextual.onboarding.addToDock.promo.contextual.message" = "Remember, every time you browse with me a creepy ad loses its wings.\n\nSo keep me in your Dock for daily browsing.";

/* The message of the onboarding dialog popup that promotes adding the DDG browser icon to the dock. */
"contextual.onboarding.addToDock.promo.intro.message" = "I’ll nest in easy reach for all your daily browsing.";

/* The title of the onboarding dialog popup that promotes adding the DDG browser icon to the dock. */
"contextual.onboarding.addToDock.promo.title" = "Add me to your Dock!";

/* The message of the onboarding dialog popup that explains how to add the DDG browser icon to the dock. */
"contextual.onboarding.addToDock.tutorial.message" = "Find or search for the DuckDuckGo icon on your home screen. Then press and drag into place. That’s it!";
"contextual.onboarding.addToDock.tutorial.message" = "Find the DuckDuckGo icon on your Home Screen. Then press and drag it into place. That’s it!";

/* The title of the onboarding dialog popup that explains how to add the DDG browser icon to the dock. */
"contextual.onboarding.addToDock.tutorial.title" = "Adding me to your Dock is easy.";
Expand Down Expand Up @@ -1859,17 +1868,8 @@ https://duckduckgo.com/mac";
/* Text displayed on notification appearing in the address bar when the browser hides a cookie popup */
"omnibar.notification.popup-hidden" = "Pop-up Hidden";

/* The title of the dialog button CTA to skip adding the DDB browser icon to the dock. */
"onboarding.addToDock.cta" = "Skip";

/* The message of the onboarding dialog popup informing the user on the benefits of adding the DDG browser icon to the dock. */
"onboarding.addToDock.message" = "I can paddle into the Dock and perch there until you need me.";

/* The title of the onboarding dialog popup informing the user on the benefits of adding the DDG browser icon to the dock. */
"onboarding.addToDock.title" = "Want to add me to your Dock?";

/* Button on the Add to Dock tutorial screen of the onboarding, it will dismiss the screen and proceed to the next step. */
"onboarding.addToDock.tutorial.cta" = "Got It";
/* Button on the Add to Dock tutorial screen of the onboarding, it will proceed to the next step of the onboarding. */
"onboarding.addToDock.buttons.gotIt" = "Got It";

/* Button to change the default browser */
"onboarding.browsers.cta" = "Choose Your Browser";
Expand Down
4 changes: 2 additions & 2 deletions DuckDuckGoTests/ContextualDaxDialogsFactoryTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -352,8 +352,8 @@ final class ContextualDaxDialogsFactoryTests: XCTestCase {
let result = try XCTUnwrap(find(OnboardingFinalDialog.self, in: dialog))

// THEN
XCTAssertEqual(result.message, UserText.AddToDockOnboarding.EndOfJourney.message)
XCTAssertEqual(result.cta, UserText.AddToDockOnboarding.Buttons.dismiss)
XCTAssertEqual(result.message, UserText.AddToDockOnboarding.Promo.contextualMessage)
XCTAssertEqual(result.cta, UserText.AddToDockOnboarding.Buttons.startBrowsing)
}

func testWhenEndOfJourneyDialogAndAddToDockIsContextualThenCanShowAddToDockTutorialIsTrue() throws {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,8 @@ class ContextualOnboardingNewTabDialogFactoryTests: XCTestCase {
let result = try XCTUnwrap(find(OnboardingFinalDialog.self, in: dialog))

// THEN
XCTAssertEqual(result.message, UserText.AddToDockOnboarding.EndOfJourney.message)
XCTAssertEqual(result.cta, UserText.AddToDockOnboarding.Buttons.dismiss)
XCTAssertEqual(result.message, UserText.AddToDockOnboarding.Promo.contextualMessage)
XCTAssertEqual(result.cta, UserText.AddToDockOnboarding.Buttons.startBrowsing)
}

func testWhenEndOfJourneyDialogAndAddToDockIsContextualThenCanShowAddToDockTutorialIsTrue() throws {
Expand Down

0 comments on commit 6de2142

Please sign in to comment.