Commit fcfc3f7
authored
Custom Duck.ai Onboarding - initial screen copy alternatives (#8696)
Task/Issue URL:
https://app.asana.com/1/137249556945/project/1208671518894266/task/1214496516674987?focus=true
### Description
Provides alternative copies for initial, reinstaller, and skip
onboarding screens.
### Steps to test this PR
- [ ] Remove the `Download/DuckDuckGo` directory.
- [ ] Clean install the app.
- [ ] Verify you see the mainline copy on the screen, and only a single
action button.
- [ ] Finish onboarding.
- [ ] Clear storage and reopen the app.
- [ ] Verify you see the mainline reinstaller copy on the screen, and
two action buttons (one to skip).
- [ ] Click the "I've been here before" button.
- [ ] Verify you see the mainline skip copy on the screen.
- [ ] Click "Show tutorial".
- [ ] Verify the title on the browser comparison screen says
"Protections activated!"
- [ ] Apply this diff:
```diff
diff --git a/app/src/main/java/com/duckduckgo/app/onboarding/ui/page/BrandDesignUpdatePageViewModel.kt b/app/src/main/java/com/duckduckgo/app/onboarding/ui/page/BrandDesignUpdatePageViewModel.kt
index 4ea86fa..7ac1698fb4 100644
--- a/app/src/main/java/com/duckduckgo/app/onboarding/ui/page/BrandDesignUpdatePageViewModel.kt
+++ b/app/src/main/java/com/duckduckgo/app/onboarding/ui/page/BrandDesignUpdatePageViewModel.kt
@@ -139,7 +139,7 @@ class BrandDesignUpdatePageViewModel @Inject constructor(
val inputScreenPreviewIsSearchSelected: Boolean = false,
val hideSetDefaultBrowserRow: Boolean = false,
val hideAddWidgetRow: Boolean = false,
- val isCustomAiOnboardingCopyEnabled: Boolean = false,
+ val isCustomAiOnboardingCopyEnabled: Boolean = true,
) {
val maxPageCount = 3
}
```
- [ ] Remove the `Download/DuckDuckGo` directory.
- [ ] Clean install the app.
- [ ] Verify you see the alternative copy on the screen, and only a
single action button.
- [ ] Finish onboarding.
- [ ] Clear storage and reopen the app.
- [ ] Verify you see the alternative reinstaller copy on the screen, and
two action buttons (one to skip).
- [ ] Click the "I've been here before" button.
- [ ] Verify you see the alternative skip copy on the screen.
- [ ] Click "Show tutorial".
- [ ] Verify the title on the browser comparison screen says "Want to
make DuckDuckGo your default browser?"
### UI changes
| Before | After |
| ------ | ----- |
<img width="480" height="1071" alt="image"
src="https://github.com/user-attachments/assets/a5e6a1cd-ff4d-4bd3-b173-82e89bb0fcbd"
/><img width="480" height="1071" alt="image"
src="https://github.com/user-attachments/assets/1c947cd7-fcdc-4083-923f-ea7d4a58ceb1"
/><img width="480" height="1071" alt="image"
src="https://github.com/user-attachments/assets/ce70b5f6-ab8a-417f-8bc5-cf61d5d022a6"
/><img width="480" height="1071" alt="image"
src="https://github.com/user-attachments/assets/e9665354-4be7-40a6-a726-6eef3b6951a6"
/>|<img width="480" height="1071" alt="image"
src="https://github.com/user-attachments/assets/18528e9d-3da0-4688-a6de-637555c5b3e6"
/><img width="480" height="1071" alt="image"
src="https://github.com/user-attachments/assets/55fb59c4-eb05-4f8c-8113-1aebe5f252cd"
/><img width="480" height="1071" alt="image"
src="https://github.com/user-attachments/assets/b223aeab-f07d-4508-a399-2077de03026f"
/><img width="480" height="1071" alt="image"
src="https://github.com/user-attachments/assets/80a77856-b360-4e6f-865d-8db3595aae8e"
/>|
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> UI copy and presentation only behind a default-off flag; no auth,
data, or navigation logic changes beyond string selection.
>
> **Overview**
> Adds an optional **Duck.ai–focused copy path** for brand-design
pre-onboarding, driven by `isCustomAiOnboardingCopyEnabled` on
`BrandDesignUpdatePageViewModel.ViewState` (defaults off; PR tests by
flipping it to `true`).
>
> When enabled, **welcome** (`INITIAL` / reinstall) uses a single custom
body line and hides the second paragraph; **skip onboarding** uses
alternate body text with an inline chat icon via `appendIconToText`, a
**Start AI Chat** primary CTA, and the same layout rules as sync-restore
for hiding `bodyText2`. **Browser comparison chart** title switches from
“Protections activated!” to “Want to make DuckDuckGo your default
browser?” via `ComparisonChartConfig.Browser(isCustomAiCopy)`.
>
> `ComparisonChartConfig` is refactored from companion `Default` / `Ai`
values to a **sealed** hierarchy (`Browser` + `Ai` object). Four new
non-translated strings live in `donottranslate.xml`.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
87fdb1c. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 2d81e97 commit fcfc3f7
4 files changed
Lines changed: 77 additions & 41 deletions
File tree
- app/src/main
- java/com/duckduckgo/app/onboarding/ui/page
- res/values
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
| 147 | + | |
147 | 148 | | |
148 | 149 | | |
149 | 150 | | |
| |||
Lines changed: 39 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
89 | 89 | | |
90 | 90 | | |
91 | 91 | | |
| 92 | + | |
92 | 93 | | |
93 | 94 | | |
94 | 95 | | |
| |||
535 | 536 | | |
536 | 537 | | |
537 | 538 | | |
| 539 | + | |
538 | 540 | | |
539 | 541 | | |
540 | 542 | | |
| |||
547 | 549 | | |
548 | 550 | | |
549 | 551 | | |
| 552 | + | |
550 | 553 | | |
551 | 554 | | |
552 | 555 | | |
| |||
739 | 742 | | |
740 | 743 | | |
741 | 744 | | |
| 745 | + | |
742 | 746 | | |
743 | 747 | | |
744 | 748 | | |
| |||
769 | 773 | | |
770 | 774 | | |
771 | 775 | | |
| 776 | + | |
| 777 | + | |
| 778 | + | |
772 | 779 | | |
773 | | - | |
| 780 | + | |
774 | 781 | | |
775 | | - | |
| 782 | + | |
776 | 783 | | |
777 | 784 | | |
778 | 785 | | |
| |||
793 | 800 | | |
794 | 801 | | |
795 | 802 | | |
796 | | - | |
| 803 | + | |
797 | 804 | | |
798 | 805 | | |
799 | 806 | | |
| |||
1040 | 1047 | | |
1041 | 1048 | | |
1042 | 1049 | | |
1043 | | - | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
1044 | 1058 | | |
1045 | 1059 | | |
1046 | 1060 | | |
1047 | 1061 | | |
1048 | 1062 | | |
1049 | 1063 | | |
1050 | | - | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
1051 | 1067 | | |
1052 | 1068 | | |
1053 | 1069 | | |
| |||
1384 | 1400 | | |
1385 | 1401 | | |
1386 | 1402 | | |
| 1403 | + | |
1387 | 1404 | | |
1388 | 1405 | | |
1389 | 1406 | | |
| |||
1427 | 1444 | | |
1428 | 1445 | | |
1429 | 1446 | | |
| 1447 | + | |
| 1448 | + | |
| 1449 | + | |
1430 | 1450 | | |
1431 | | - | |
| 1451 | + | |
1432 | 1452 | | |
1433 | | - | |
| 1453 | + | |
1434 | 1454 | | |
1435 | 1455 | | |
1436 | 1456 | | |
| |||
1515 | 1535 | | |
1516 | 1536 | | |
1517 | 1537 | | |
1518 | | - | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
1519 | 1546 | | |
1520 | | - | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
1521 | 1550 | | |
1522 | 1551 | | |
1523 | 1552 | | |
| |||
2406 | 2435 | | |
2407 | 2436 | | |
2408 | 2437 | | |
2409 | | - | |
| 2438 | + | |
2410 | 2439 | | |
2411 | 2440 | | |
2412 | 2441 | | |
| |||
Lines changed: 32 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
52 | 55 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
67 | 69 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
144 | 144 | | |
145 | 145 | | |
146 | 146 | | |
147 | | - | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
148 | 152 | | |
0 commit comments