Skip to content

Onboarding Brand Design Update: Update visit-site-options dialog#8291

Merged
mikescamell merged 3 commits intodevelopfrom
feature/mike/onboarding-brand-design-updates/visit-site-options
Apr 27, 2026
Merged

Onboarding Brand Design Update: Update visit-site-options dialog#8291
mikescamell merged 3 commits intodevelopfrom
feature/mike/onboarding-brand-design-updates/visit-site-options

Conversation

@mikescamell
Copy link
Copy Markdown
Contributor

@mikescamell mikescamell commented Apr 15, 2026

Task/Issue URL: https://app.asana.com/1/137249556945/project/1207908166761516/task/1214072694520134?focus=true

Description

Adds the brand design update variant of the DaxIntroVisitSiteOptionsCta dialog. This follows the same pattern as the DaxTryASearchBrandDesignUpdateBubbleCta — an options-style dialog using the existing optionsContent include layout.

When the brand design update feature toggle is enabled, the new DaxVisitSiteOptionsBrandDesignUpdateBubbleCta is shown instead of the legacy DaxIntroVisitSiteOptionsCta.

Background image is not yet included (TODO added).

Steps to test this PR

Designs

Apply patch

Index: app/src/main/java/com/duckduckgo/app/onboardingbranddesignupdate/OnboardingBrandDesignUpdateToggles.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/src/main/java/com/duckduckgo/app/onboardingbranddesignupdate/OnboardingBrandDesignUpdateToggles.kt b/app/src/main/java/com/duckduckgo/app/onboardingbranddesignupdate/OnboardingBrandDesignUpdateToggles.kt
--- a/app/src/main/java/com/duckduckgo/app/onboardingbranddesignupdate/OnboardingBrandDesignUpdateToggles.kt	(revision 510fa21c4b4c6b25dfccb6c48e9c0d1e0a2ad9c1)
+++ b/app/src/main/java/com/duckduckgo/app/onboardingbranddesignupdate/OnboardingBrandDesignUpdateToggles.kt	(date 1776188767358)
@@ -34,13 +34,13 @@
      * Main toggle for the onboarding brand design update feature.
      * Default value: false (disabled).
      */
-    @Toggle.DefaultValue(DefaultFeatureValue.FALSE)
+    @Toggle.DefaultValue(DefaultFeatureValue.TRUE)
     fun self(): Toggle
 
     /**
      * Toggle for the brand design update variant.
      * Default value: false (disabled).
      */
-    @Toggle.DefaultValue(DefaultFeatureValue.FALSE)
+    @Toggle.DefaultValue(DefaultFeatureValue.TRUE)
     fun brandDesignUpdate(): Toggle
 }
Index: app/src/main/java/com/duckduckgo/app/onboarding/ui/OnboardingViewModel.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/app/src/main/java/com/duckduckgo/app/onboarding/ui/OnboardingViewModel.kt b/app/src/main/java/com/duckduckgo/app/onboarding/ui/OnboardingViewModel.kt
--- a/app/src/main/java/com/duckduckgo/app/onboarding/ui/OnboardingViewModel.kt	(revision 510fa21c4b4c6b25dfccb6c48e9c0d1e0a2ad9c1)
+++ b/app/src/main/java/com/duckduckgo/app/onboarding/ui/OnboardingViewModel.kt	(date 1776188767352)
@@ -45,7 +45,7 @@
     val viewState = _viewState.asStateFlow()
 
     fun initializePages() {
-        pageLayoutManager.buildPageBlueprints()
+        pageLayoutManager.buildBrandDesignUpdatePageBlueprints()
     }
 
     fun pageCount(): Int {
@@ -70,7 +70,7 @@
     }
 
     fun initializeOnboardingSkipper() {
-        if (!appBuildConfig.canSkipOnboarding) return
+        return
 
         // delay showing skip button until privacy config downloaded
         viewModelScope.launch {

Note if you want to see the dialog consistently from app close and open then apply this patch to force the dialog

Index: app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
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
--- a/app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt	(revision 1607ffb57272432b496011cb79a3c6ee2d5a15da)
+++ b/app/src/main/java/com/duckduckgo/app/cta/ui/CtaViewModel.kt	(date 1776325964635)
@@ -250,6 +250,10 @@
     }
 
     private suspend fun getHomeCta(): Cta? {
+        // TODO: REMOVE — temp hack to always show brand design update search dialog for testing
+        return DaxVisitSiteOptionsBrandDesignUpdateBubbleCta(onboardingStore, appInstallStore, appTheme.isLightModeEnabled())
+        // TODO: REMOVE — end temp hack
+
         return when {
             // Onboarding disabled
             canShowDaxIntroCta() && extendedOnboardingFeatureToggles.noBrowserCtas().isEnabled() -> {

Brand design update visit site options dialog

  • Launch the app with a fresh install / clear data to trigger the onboarding flow
  • Go through onboarding and get to the try a search dialog
  • Close try a search dialog
  • Open tab switcher
  • Click new tab button
  • Verify the visit site options dialog appears with the new brand design update layout
  • Rotate and check in landscape
  • Verify all site option buttons are displayed and clickable
  • Verify the dismiss button appears and works
  • Verify the typing animation plays correctly
  • Verify tap-to-skip works during animation
  • Repeat on a tablet
  • Disable the brand design update toggle and verify the legacy dialog appears instead

UI changes

See here for screenshots


Note

Low Risk
Low risk: scoped to onboarding CTA selection and UI wiring, with behavior gated behind the brand design update toggle and covered by updated unit tests.

Overview
Adds a brand design update variant of the onboarding “visit site options” bubble (DaxVisitSiteOptionsBrandDesignUpdateBubbleCta) and switches CtaViewModel to serve it when the brand design update toggle is enabled (otherwise falling back to the legacy DaxIntroVisitSiteOptionsCta).

Introduces OptionsBubbleCta to centralize the shared option-button binding/click handling for brand-design option-style bubbles, and refactors DaxTryASearchBrandDesignUpdateBubbleCta to use this new base. Pixel firing for custom visit-site entries is updated in BrowserTabViewModel, and CtaViewModelTest adds coverage for the new toggle-driven visit-site CTA selection.

Reviewed by Cursor Bugbot for commit e416b21. Bugbot is set up for automated code reviews on this repo. Configure here.

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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 dbfbbe3. Configure here.

@mikescamell mikescamell force-pushed the feature/mike/onboarding-brand-design-updates/visit-site-options branch from dbfbbe3 to 3826740 Compare April 15, 2026 17:47
@mikescamell mikescamell changed the title feat(onboarding): add brand design update for visit site options dialog Onboarding Brand Design Update: Update visit-site-options dialog Apr 15, 2026
@mikescamell mikescamell force-pushed the feature/mike/onboarding-brand-design-updates/visit-site-options branch from 3826740 to 871fd0c Compare April 15, 2026 19:30
@mikescamell mikescamell force-pushed the try-a-search-dialog branch from d73c03b to a32fc81 Compare April 15, 2026 19:32
@mikescamell mikescamell force-pushed the feature/mike/onboarding-brand-design-updates/visit-site-options branch from 871fd0c to 6553911 Compare April 16, 2026 07:18
@mikescamell mikescamell marked this pull request as ready for review April 16, 2026 08:53
@mikescamell mikescamell force-pushed the feature/mike/onboarding-brand-design-updates/visit-site-options branch from 6553911 to ca3ecd2 Compare April 16, 2026 08:54
@mikescamell mikescamell force-pushed the try-a-search-dialog branch from a32fc81 to b2fe3e2 Compare April 16, 2026 08:54
@LukasPaczos
Copy link
Copy Markdown
Contributor

@mikescamell when I reach the "visit a site step", I just get an empty background:
image
Looking through the layout inspector, includeOnboardingDaxDialogBubble is gone.

@mikescamell mikescamell changed the base branch from try-a-search-dialog to graphite-base/8291 April 16, 2026 12:57
@mikescamell mikescamell force-pushed the feature/mike/onboarding-brand-design-updates/visit-site-options branch from ca3ecd2 to d98cc78 Compare April 16, 2026 15:30
@mikescamell mikescamell changed the base branch from graphite-base/8291 to try-a-search-dialog April 16, 2026 15:30
@mikescamell
Copy link
Copy Markdown
Contributor Author

@mikescamell when I reach the "visit a site step", I just get an empty background: image Looking through the layout inspector, includeOnboardingDaxDialogBubble is gone.

Thanks Lukasz, this was a bug in the try-a-search intial implementation and is now fixed 👍

@mikescamell mikescamell force-pushed the feature/mike/onboarding-brand-design-updates/visit-site-options branch from d98cc78 to b03578b Compare April 16, 2026 16:02
@mikescamell mikescamell changed the base branch from try-a-search-dialog to graphite-base/8291 April 16, 2026 17:59
@mikescamell mikescamell force-pushed the feature/mike/onboarding-brand-design-updates/visit-site-options branch from b03578b to bd91a52 Compare April 16, 2026 18:02
Copy link
Copy Markdown
Contributor

@LukasPaczos LukasPaczos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "try search" and "try site" classes have identical body. Might be worth considering squashing that down to:

  // Inside DaxBubbleCta.BrandDesignUpdateBubbleCta                                                                                                                              
  abstract class OptionsBubbleCta(                                     
      ctaId: CtaId,                                                                                                                                                              
      @StringRes title: Int,
      @StringRes description: Int,                                                                                                                                               
      options: List<DaxDialogIntroOption>?,                            
      @DrawableRes backgroundRes: Int,                                                                                                                                           
      ctaPixelParam: String,                                                                                                                                                     
      onboardingStore: OnboardingStore,                                                                                                                                          
      appInstallStore: AppInstallStore,                                                                                                                                          
      isLightTheme: Boolean,                                           
  ) : BrandDesignUpdateBubbleCta(...) {                                                                                                                                          
      override val activeIncludeId = R.id.optionsContent                                                                                                                         
      override fun configureContentViews(view: View) { /* the shared body */ }
      override fun setOnOptionClicked(...) { /* the shared body */ }                                                                                                             
  }                                                                    
                                                                                                                                                                                 
  data class DaxTryASearchBrandDesignUpdateBubbleCta(...) : OptionsBubbleCta(                                                                                                    
      ctaId = CtaId.DAX_INTRO,
      title = R.string.onboardingSearchDaxDialogTitle,                                                                                                                           
      // ...differing values only                                                                                                                                                
  )                                                                                                                                                                              
                                                                                                                                                                                 
  data class DaxVisitSiteOptionsBrandDesignUpdateBubbleCta(...) : OptionsBubbleCta(                                                                                              
      ctaId = CtaId.DAX_INTRO_VISIT_SITE,                              
      // ...differing values only                                                                                                                                                
  ) 

@mikescamell mikescamell force-pushed the feature/mike/onboarding-brand-design-updates/visit-site-options branch from bd91a52 to 919e5fd Compare April 23, 2026 15:33
@mikescamell mikescamell changed the base branch from graphite-base/8291 to try-a-search-dialog April 23, 2026 15:33
Base automatically changed from try-a-search-dialog to develop April 27, 2026 16:36
@mikescamell mikescamell requested a review from malmstein as a code owner April 27, 2026 16:36
mikescamell and others added 3 commits April 27, 2026 17:41
Create DaxVisitSiteOptionsBrandDesignUpdateBubbleCta extending
BrandDesignUpdateBubbleCta. Reuses the existing optionsContent include
layout with site visit options from OnboardingStore.getSitesOptions().

- New CTA class in its own file
- CtaViewModel toggle check (isBrandDesignUpdateEnabled)
- BrowserTabViewModel pixel check for ONBOARDING_VISIT_SITE_CUSTOM
- Toggle tests in CtaViewModelTest
- TODO for background image

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ogic

Pulls the identical configureContentViews and setOnOptionClicked
implementations out of DaxTryASearchBrandDesignUpdateBubbleCta and
DaxVisitSiteOptionsBrandDesignUpdateBubbleCta into a shared
OptionsBubbleCta base so both subclasses reduce to their differing
constructor values.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@mikescamell mikescamell force-pushed the feature/mike/onboarding-brand-design-updates/visit-site-options branch from 2a7beed to e416b21 Compare April 27, 2026 16:43
@mikescamell mikescamell merged commit 89c08bc into develop Apr 27, 2026
10 of 11 checks passed
@mikescamell mikescamell deleted the feature/mike/onboarding-brand-design-updates/visit-site-options branch April 27, 2026 17:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants