Commit c571fbb
authored
Custom Duck.ai Onboarding - comparison chart (#8688)
Task/Issue URL:
https://app.asana.com/1/137249556945/project/1208671518894266/task/1214496769534853?focus=true
### Description
- Refactors `COMPARISON_CHART` into a data-driven layout: one row
template + a `ComparisonChartConfig` data
class consumed by the page. Behavior unchanged.
- Adds `AI_COMPARISON_CHART` enum value + `Ai` config (4 rows, "Popular
AIs" header label, "Give Duck.ai a try!" CTA, title "AI protections
activated!"). No navigation trigger yet — reachable only by hardcoding
`currentDialog` locally.
- Increases size of comparison table column icons to match the spec.
### Steps to test this PR
- [x] Clean install the app.
- [x] Click through to reach the browser comparison screen.
- [x] Verify the content matches what's available on the mainline.
- [x] Apply this patch:
```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 8fd6e77..de64c45aa3 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
@@ -275,7 +275,7 @@ class BrandDesignUpdatePageViewModel @Inject constructor(
}
INITIAL_REINSTALL_USER, INITIAL -> {
- setCurrentDialog(COMPARISON_CHART)
+ setCurrentDialog(AI_COMPARISON_CHART)
}
COMPARISON_CHART -> {
```
- [x] Install the app.
- [x] Click through to reach the AI comparison screen.
- [x] Verify that green checks animate in with a delay.
- [x] Rotate the screen and verify the content snaps into place.
- [x] Re-open the app.
- [x] Click through to reach the AI comparison screen. While the typing
animation plays, click the card.
- [x] Verify the content snaps into place..
- [x] Re-open the app.
- [x] Click through to reach the AI comparison screen. While the typing
animation plays, rotate the screen.
- [x] Verify the content snaps into place.
### UI changes
| Before (browser comp.) | After (browser comp.) | After (AI comp.)
| ------ | ----- | ----- |
<img width="960" height="2142" alt="old-browser-comp-light"
src="https://github.com/user-attachments/assets/72d0c05e-8a31-4f18-be0f-706fcb063e9a"
/><img width="960" height="2142" alt="old-browser-comp-dark"
src="https://github.com/user-attachments/assets/d5583bf1-befd-40d2-a924-740985301ddb"
/>|<img width="960" height="2142" alt="new-browser-comp-light"
src="https://github.com/user-attachments/assets/ae80a164-28a0-421a-9a36-da9de5ca64c5"
/><img width="960" height="2142" alt="new-browser-comp-dark"
src="https://github.com/user-attachments/assets/fe29e87b-f961-4a8a-8567-7ed33b05c651"
/>|<img width="960" height="2142" alt="new-ai-comp-light"
src="https://github.com/user-attachments/assets/16533d16-a02c-46a3-9c43-3ad36e8fd55d"
/><img width="960" height="2142" alt="new-ai-comp-dark"
src="https://github.com/user-attachments/assets/f1106d36-bc51-4c5f-9514-2fbe31b43161"
/>|
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Onboarding UI and assets only; default path unchanged until AI dialog
navigation is enabled.
>
> **Overview**
> Refactors brand-design onboarding’s comparison chart into a
**config-driven** screen: rows are inflated from
`include_brand_design_comparison_chart_row`, with
`ComparisonChartConfig.Default` preserving the existing browser-vs-DDG
copy and behavior.
>
> Adds **`AI_COMPARISON_CHART`** and `ComparisonChartConfig.Ai`
(AI-focused title, “Popular AIs” header label, four rows, “Give Duck.ai
a try!” CTA) plus new rebrand drawables (`ic_ai_general_16`,
`ic_ai_general_color_24_rebrand`, `ic_lock_color_24_rebrand`). The
welcome page picks config from `currentDialog` and drives title, CTA,
header icons, and check animations from dynamic row checks.
>
> **Not wired for production yet:** flow still advances to
`COMPARISON_CHART` after intro; AI screen is only reachable via local
`setCurrentDialog` hacks. Primary CTA and show pixels for the AI chart
are TODOs. Legacy `WelcomePage` treats `AI_COMPARISON_CHART` as no-op.
Duck.ai settings leading icon updated to `ic_ai_general_color_24`.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
43d97bb. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent e75c026 commit c571fbb
14 files changed
Lines changed: 385 additions & 311 deletions
File tree
- android-design-system/design-system/src/main/res/drawable
- app/src/main
- java/com/duckduckgo/app/onboarding/ui/page
- res
- layout
- values
Lines changed: 37 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
Lines changed: 30 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
Lines changed: 36 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
| 37 | + | |
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| |||
211 | 212 | | |
212 | 213 | | |
213 | 214 | | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
214 | 218 | | |
215 | 219 | | |
216 | 220 | | |
| |||
298 | 302 | | |
299 | 303 | | |
300 | 304 | | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
301 | 309 | | |
302 | 310 | | |
303 | 311 | | |
| |||
395 | 403 | | |
396 | 404 | | |
397 | 405 | | |
398 | | - | |
| 406 | + | |
399 | 407 | | |
400 | 408 | | |
401 | 409 | | |
| |||
0 commit comments