You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Task/Issue URL:
https://app.asana.com/1/137249556945/project/488551667048375/task/1210812799220024?focus=true
### Description
This PR adds a new "Set as Default Browser" message to the new tab page.
The message is shown as a low-priority message when the user reaches
Stage 3 of the default browser prompts flow. The implementation
includes:
- Added a new `showSetAsDefaultMessage` state flow to track whether to
show the message
- Created a new `STAGE_3` in the flow stages progression
- Implemented a `LowPriorityMessagingModel` to handle low-priority
messages on the new tab page
- Added UI components to display the default browser message with
appropriate actions
- Added pixel tracking for message impressions and interactions
### Steps to test this PR
_Default Browser Message_
- [x] Make sure the device has time set automatically.
- [x] Use this privacy config for easy testing ->
https://www.jsonblob.com/api/1395437188749123584. The easiest way would
be to set this in
`privacy-config/privacy-config-api/src/main/java/com/duckduckgo/privacy/config/api/PrivacyFeatureName.kt`:
`const val PRIVACY_REMOTE_CONFIG_URL =
"https://www.jsonblob.com/api/1395437188749123584"`
- [x] Build and install from this branch.
- [x] Skip onboarding.
- [x] Change time on device. Advance it by one day.
- [x] Open the app and notice the prompt. Tap on `Not Now`.
- [x] Close the app.
- [x] Change time on device. Advance it by one day.
- [x] Open the app and notice the prompt. Tap on `Not Now`.
- [x] Close the app.
- [x] Change time on device. Advance it by one day.
- [x] Open the app and notice the message displayed. It looks like a
RMF. Check the below:
Icon at the top (middle): Yellow phone with the green check.
Title: DuckDuckGo isn't your default browser. Get more protection.
Left button (ghost): Don’t Ask Again
Right button (primary): Set As Default
Top right button: X
- [x] Filter logcat by `m_set-as-default_message` and notice this log:
`Pixel sent: m_set-as-default_message_impression with params: {} {}`
- [x] The message is still there even of you put the app in background
or close and reopen the app.
- [x] Tap on `Set As Default` and the system screen to choose the
browser is shown. The message disappears and is never shown again.
- [x] Notice this in logcat: `Pixel sent: m_set-as-default_message_click
with params: {} {}`
Before running any other tests:
- ensure DDG in not the default browser
- clear the storage of the app
- set the device to have time automatically set
Other tests:
1/ Dismiss the message with `X`:
- [x] Repeat all steps from the beginning and notice you are at the
point you see the message on screen.
- [x] Tap on `X` and notice the message disappears and is never shown
again.
- [x] Filter logcat by `m_set-as-default_message` and notice this log:
`Pixel sent: m_set-as-default_message_dismissed with params: {} {}`
2/ Dismiss the message with `Don’t Ask Again`:
- [x] Repeat all steps from the beginning and notice you are at the
point you see the message on screen.
- [x] Tap on `Don’t Ask Again` and notice the message disappears and is
never shown again.
- [x] Filter logcat by `m_set-as-default_message` and notice this log:
`Pixel sent: m_set-as-default_message_dismissed with params: {} {}`
3/ If a RMF should be shown, this message does not appear at all. Once
the RMF is dismissed, the message is shown.
- [ ] Use this RMF config for easy testing ->
https://www.jsonblob.com/api/1400852242860531712. The easiest way would
be to set this in
`remote-messaging/remote-messaging-impl/src/main/java/com/duckduckgo/remote/messaging/impl/network/RemoteMessagingService.kt`:
`@GET("https://www.jsonblob.com/api/1400852242860531712")`
- [x] Repeat all steps from the beginning and DO NOT DISMISS the RMF.
- [x] When you are at the point to see the message on screen, you'll
still see the RMF.
- [x] Dismiss the RMF and notice you see the message.
### UI changes
| No message | Message only |
| ------ | ----- |
|<img width="1080" height="2400" alt="no_message"
src="https://github.com/user-attachments/assets/64525bf0-1ca6-4655-b1b8-3912de8c9ae6"
/>|<img width="1080" height="2400" alt="message"
src="https://github.com/user-attachments/assets/52b75fd6-57c1-48ba-83ba-ab03922c223a"
/>|
| Message and AppTP | Message and favorites and AppTP |
| ------ | ----- |
|<img width="1080" height="2400" alt="apptp_message"
src="https://github.com/user-attachments/assets/2f058092-5593-49af-9936-90466e74dbf9"
/>|<img width="1080" height="2400" alt="apptp_favorites_message"
src="https://github.com/user-attachments/assets/68a1bd63-7583-4265-bd00-2f8971711084"
/>|
Copy file name to clipboardExpand all lines: app/src/androidTest/java/com/duckduckgo/app/browser/defaultbrowsing/prompts/store/DefaultBrowserPromptsPrefsDataStoreImplTest.kt
Copy file name to clipboardExpand all lines: app/src/main/java/com/duckduckgo/app/browser/defaultbrowsing/prompts/AdditionalDefaultBrowserPromptsImpl.kt
Copy file name to clipboardExpand all lines: app/src/main/java/com/duckduckgo/app/browser/defaultbrowsing/prompts/DefaultBrowserPromptsExperimentVariants.kt
Copy file name to clipboardExpand all lines: app/src/main/java/com/duckduckgo/app/browser/defaultbrowsing/prompts/store/DefaultBrowserPromptsDataStore.kt
0 commit comments