Commit 2d81e97
authored
Custom Duck.ai Onboarding - update bubble CTA copy and subscription page for custom AI onboarding (#8706)
Task/Issue URL:
https://app.asana.com/1/137249556945/project/1208671518894266/task/1214496769534854?focus=true
### Description
Adds alternative copy and link variants for onboarding bubble CTAs when
custom AI onboarding flow is engaged.
### Steps to test this PR
- [x] Apply this diff:
```diff
diff --git a/app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt b/app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt
index f3fdf90..485e6704af 100644
--- a/app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt
+++ b/app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt
@@ -113,7 +113,7 @@ class CtaViewModel @Inject constructor(
}
private suspend fun isSubscriptionCtaAvailable(): Boolean =
- subscriptions.isEligible() && hasNoSubscription() && extendedOnboardingFeatureToggles.privacyProCta().isEnabled()
+ true//subscriptions.isEligible() && hasNoSubscription() && extendedOnboardingFeatureToggles.privacyProCta().isEnabled()
private suspend fun isBrandDesignUpdateEnabled(): Boolean = withContext(dispatchers.io()) {
onboardingBrandDesignUpdateToggles.brandDesignUpdate().isEnabled()
```
- [x] Clean install the app.
- [x] Go through onboarding until reaching the End dialog.
- [x] Verify the copy matches the existing production variant.
- [x] Click the primary button.
- [x] Verify the copy on the Subscription dialog matches the existing
production variant.
- [x] Click the primary button.
- [x] Verify the default subscription page loads.
- [x] Apply this patch on top of the last:
```diff
diff --git a/app/src/main/java/com/duckduckgo/app/onboarding/store/OnboardingStoreImpl.kt b/app/src/main/java/com/duckduckgo/app/onboarding/store/OnboardingStoreImpl.kt
index 19f4e74..ad958e68ce 100644
--- a/app/src/main/java/com/duckduckgo/app/onboarding/store/OnboardingStoreImpl.kt
+++ b/app/src/main/java/com/duckduckgo/app/onboarding/store/OnboardingStoreImpl.kt
@@ -222,7 +222,7 @@ class OnboardingStoreImpl @Inject constructor(
}
override fun isCustomAiOnboardingFlow(): Boolean {
- return false
+ return true
}
```
- [x] Clean install the app.
- [x] Go through onboarding until reaching the End dialog.
- [x] Verify the copy matches the alternative variant.
- [x] Click the primary button.
- [x] Verify the copy on the Subscription dialog matches the alternative
variant.
- [x] Click the primary button.
- [x] Verify the alternative, Duck.ai-focused subscription page loads.
### UI changes
| Default | Custom AI flow |
| ------ | ----- |
|<img width="480" height="1071" alt="image"
src="https://github.com/user-attachments/assets/5fc74d9f-0169-4df6-a423-32a0ad9de13e"
/><img width="480" height="1071" alt="image"
src="https://github.com/user-attachments/assets/a4940412-c55b-4620-816c-6353c896c444"
/><img width="480" height="1071" alt="image"
src="https://github.com/user-attachments/assets/b93e702c-4e86-44e8-9e76-c8c8d841074f"
/>|<img width="480" height="1071" alt="image"
src="https://github.com/user-attachments/assets/e70c374a-50f3-4ebe-bd46-faa966268171"
/><img width="480" height="1071" alt="image"
src="https://github.com/user-attachments/assets/0b8efd44-5598-489c-adf7-3fb7b1949466"
/><img width="480" height="1071" alt="image"
src="https://github.com/user-attachments/assets/4581be73-74c9-42fe-9728-c3f8c0aaaff3"
/>|
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Onboarding UI and subscription URL query params only; flow is gated
behind a stub that returns false until referral wiring ships.
>
> **Overview**
> Introduces a **custom AI onboarding** branch (via
`OnboardingStore.isCustomAiOnboardingFlow()`, still stubbed to `false`
until referral integration lands) that swaps Dax **end** and **Privacy
Pro subscription** bubble copy and tweaks presentation for that path.
>
> When the flag is on, the end bubble uses new strings and can **inline
a chat icon** in the description through a new `decorateDescription`
hook on brand-design bubble CTAs. Tapping subscription from onboarding
still opens `duckduckgo.com/pro` with
`origin=funnel_onboarding_android`, and additionally appends
**`featurePage=duckai`** so the web subscription experience can land on
Duck.ai-focused content.
>
> Unit tests cover the subscription URI with and without the custom-AI
query parameter.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
75a6478. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 812b029 commit 2d81e97
8 files changed
Lines changed: 72 additions & 9 deletions
File tree
- app/src
- main
- java/com/duckduckgo/app
- browser
- cta/ui
- onboarding/store
- res/values
- test/java/com/duckduckgo/app/browser
Lines changed: 11 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
275 | 275 | | |
276 | 276 | | |
277 | 277 | | |
| 278 | + | |
278 | 279 | | |
279 | 280 | | |
280 | 281 | | |
| |||
557 | 558 | | |
558 | 559 | | |
559 | 560 | | |
| 561 | + | |
560 | 562 | | |
561 | 563 | | |
562 | 564 | | |
| |||
5071 | 5073 | | |
5072 | 5074 | | |
5073 | 5075 | | |
5074 | | - | |
5075 | | - | |
| 5076 | + | |
| 5077 | + | |
| 5078 | + | |
| 5079 | + | |
| 5080 | + | |
| 5081 | + | |
| 5082 | + | |
| 5083 | + | |
| 5084 | + | |
5076 | 5085 | | |
5077 | 5086 | | |
5078 | 5087 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1620 | 1620 | | |
1621 | 1621 | | |
1622 | 1622 | | |
| 1623 | + | |
| 1624 | + | |
1623 | 1625 | | |
1624 | 1626 | | |
1625 | 1627 | | |
| |||
1701 | 1703 | | |
1702 | 1704 | | |
1703 | 1705 | | |
| 1706 | + | |
1704 | 1707 | | |
1705 | 1708 | | |
1706 | 1709 | | |
| |||
1732 | 1735 | | |
1733 | 1736 | | |
1734 | 1737 | | |
1735 | | - | |
| 1738 | + | |
1736 | 1739 | | |
1737 | 1740 | | |
1738 | 1741 | | |
| |||
1793 | 1796 | | |
1794 | 1797 | | |
1795 | 1798 | | |
1796 | | - | |
| 1799 | + | |
1797 | 1800 | | |
1798 | 1801 | | |
1799 | 1802 | | |
| |||
1856 | 1859 | | |
1857 | 1860 | | |
1858 | 1861 | | |
1859 | | - | |
| 1862 | + | |
1860 | 1863 | | |
1861 | 1864 | | |
1862 | 1865 | | |
| |||
Lines changed: 15 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
| 19 | + | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
22 | | - | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
| 27 | + | |
27 | 28 | | |
28 | 29 | | |
| 30 | + | |
29 | 31 | | |
30 | 32 | | |
31 | 33 | | |
| |||
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
38 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
39 | 45 | | |
40 | 46 | | |
41 | 47 | | |
| |||
59 | 65 | | |
60 | 66 | | |
61 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
62 | 75 | | |
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
43 | | - | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
44 | 48 | | |
45 | 49 | | |
46 | 50 | | |
| |||
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
33 | 40 | | |
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
221 | 221 | | |
222 | 222 | | |
223 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
224 | 228 | | |
225 | 229 | | |
226 | 230 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
132 | 132 | | |
133 | 133 | | |
134 | 134 | | |
135 | | - | |
| 135 | + | |
| 136 | + | |
136 | 137 | | |
137 | 138 | | |
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | 142 | | |
142 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
143 | 148 | | |
Lines changed: 18 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
994 | 994 | | |
995 | 995 | | |
996 | 996 | | |
| 997 | + | |
997 | 998 | | |
998 | 999 | | |
999 | 1000 | | |
| |||
3534 | 3535 | | |
3535 | 3536 | | |
3536 | 3537 | | |
| 3538 | + | |
| 3539 | + | |
| 3540 | + | |
| 3541 | + | |
| 3542 | + | |
| 3543 | + | |
| 3544 | + | |
| 3545 | + | |
| 3546 | + | |
| 3547 | + | |
| 3548 | + | |
| 3549 | + | |
| 3550 | + | |
| 3551 | + | |
| 3552 | + | |
| 3553 | + | |
| 3554 | + | |
3537 | 3555 | | |
3538 | 3556 | | |
3539 | 3557 | | |
| |||
0 commit comments