Wire set-default and add-widget switches in quick setup in the brand design onboarding #8626
Open
catalinradoiu wants to merge 36 commits into
Open
Wire set-default and add-widget switches in quick setup in the brand design onboarding #8626catalinradoiu wants to merge 36 commits into
catalinradoiu wants to merge 36 commits into
Conversation
# Conflicts: # app/src/main/res/values/donottranslate.xml
Tapping the "Set DuckDuckGo as default" switch opens the system role-manager dialog the first time on the screen, then the system default-apps settings on subsequent taps and on toggle-off. Tapping "Add home screen widget" launches the system pin-widget prompt; toggling it off shows an instructions bottom sheet explaining how to remove the widget. Both switches sync back to the actual state on resume and on activity result so the UI never drifts from reality. The two switch rows are hidden when entering the screen if DDG is already the default browser / a DDG widget is already installed, so the screen only surfaces actions the user can still take. Tapping Start Browsing now persists the user's address bar position and input screen selections (settingsDataStore.omnibarType, duckChat, onboardingStore) so the choices made via the bottom sheets actually apply. Telemetry from the quick-setup path is suppressed for now — quick-setup-specific pixels will land in a follow-up branch. Task/Issue URL: https://app.asana.com/1/137249556945/project/1211724162604201/task/1214706069730418?focus=true Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds DefaultBrowserDetector and WidgetCapabilities to the test
constructor (the file no longer compiled against the updated VM)
and covers the new behavior:
- onQuickSetupSetAsDefaultClicked: first-time dialog, second-time
system settings, null intent fallback, retry after null intent
- onQuickSetupSetAsDefaultUnchecked always opens system settings
- onQuickSetupDefaultBrowser{Set,NotSet} record the result and do
not advance the dialog
- checkDefaultBrowserState and checkWidgetAddedState emit symmetric
Sync*Switch commands
- onQuickSetupAdd/RemoveHomescreenWidgetClicked emit the matching
commands
- QUICK_SETUP entry sets hideSetDefaultBrowserRow / hideAddWidgetRow
from the detector and widget-capabilities results
- QUICK_SETUP primary CTA persists omnibarType, duckChat, and
onboardingStore selections
Task/Issue URL: https://app.asana.com/1/137249556945/project/1211724162604201/task/1214706069730418?focus=true
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
9 tasks
…oval instructions
…n the user clicks "Done"
# Conflicts: # app/src/main/res/values/donottranslate.xml
…nto feature/cradoiu/quick-setup-handle-default-browser-and-widget # Conflicts: # app/src/main/res/values/donottranslate.xml
5 tasks
Base automatically changed from
feature/cradoiu/quick-setup-bottom-sheets
to
develop
May 25, 2026 11:51
…t-browser-and-widget # Conflicts: # app/src/main/java/com/duckduckgo/app/onboarding/ui/page/BrandDesignUpdatePageViewModel.kt # app/src/main/java/com/duckduckgo/app/onboarding/ui/page/BrandDesignUpdateWelcomePage.kt # app/src/main/res/drawable/rounded_top_corners_onboarding_bottom_sheet_drawable.xml # app/src/main/res/layout/bottom_sheet_quick_setup_address_bar_position.xml # app/src/main/res/layout/bottom_sheet_quick_setup_search_options.xml # app/src/main/res/values/dimens.xml # app/src/main/res/values/donottranslate.xml # app/src/test/java/com/duckduckgo/app/onboarding/ui/page/BrandDesignUpdatePageViewModelTest.kt
a52ef1a to
d3a3c65
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 3825e65. Configure here.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.


Task/Issue URL: https://app.asana.com/1/137249556945/project/1211724162604201/task/1214706069730418?focus=true
Description
Wires up the "Set DuckDuckGo as default" and "Add home screen widget" switches in the reinstaller quick-setup screen, and persists the user's quick-setup selections on "Start Browsing".
Default browser switch
onActivityResultuses a distinct request code for the quick-setup flow so the legacy comparison-chart handlers aren't reused.Add widget switch
widgetCapabilities.hasInstalledWidgets.Row visibility
ChangeBounds/measure so the dialog animates to the correct final size.Start Browsing persistence
settingsDataStore.omnibarType,duckChat.setCosmeticInputScreenUserSetting,onboardingStore.storeInputScreenSelection.Telemetry
fireTelemetry = false). Quick-setup-specific pixels will land in a follow-up branch.Steps to test this PR
Setup
[ { "op": "add", "path": "/features/onboardingQuickSetup", "value": { "state": "enabled", "features": { "onboardingQuickSetupExperimentMay26": { "state": "enabled", "cohorts": [ { "name": "control", "weight": 0 }, { "name": "treatment", "weight": 1 } ] } } } } ]Default browser switch
Add widget switch
Row visibility
Start Browsing persistence
settingsDataStore.omnibarTypereflects the selection and the input-screen setting is applied.UI changes
Check parent task
Note
Medium Risk
Touches reinstall onboarding UX, default-browser prompts, widget pinning, and settings persistence; survey gating is a small behavioral change with clear tests.
Overview
This PR completes the reinstaller quick-setup flow in brand-design onboarding: default-browser and home-screen widget switches are wired to system UI, switch state stays aligned with reality, and Start Browsing saves address-bar and search/AI choices.
Quick setup behavior: Toggling default browser shows the role-manager dialog once, then opens system default-app settings; a separate activity result code avoids mixing with the comparison-chart flow. The widget switch launches the pin prompt when on, and a new remove-widget instructions bottom sheet when off;
QuickSetupSwitchRow.setCheckedSilentlyprevents feedback loops when syncing. On resume, switches reflectDefaultBrowserDetectorandWidgetCapabilities; rows for default browser / widget are hidden at QUICK_SETUP entry if already satisfied so layout does not jump duringChangeBounds. Start Browsing applies omnibar type and input-screen settings via shared helpers (telemetry suppressed on this path for a follow-up).Other: Default-browser-changed survey modal evaluation skips until onboarding is complete. Onboarding theming adds
quickSetupStepNumberText; bottom sheets get padding/surface tweaks and new copy/assets for remove-widget steps. ViewModel tests cover the new commands and persistence.Reviewed by Cursor Bugbot for commit c153f48. Bugbot is set up for automated code reviews on this repo. Configure here.