Consolidate desktop browser promo screens into one shared module - #9565
Draft
catalinradoiu wants to merge 1 commit into
Draft
Consolidate desktop browser promo screens into one shared module#9565catalinradoiu wants to merge 1 commit into
catalinradoiu wants to merge 1 commit into
Conversation
Three separate activities promoted the desktop browser — one each in app, sync-impl and autofill-impl — so every change to the screen had to be made three times, and one of them was missed entirely last time it changed. Replace them with a single configuration-driven screen in a new desktop-app-promotion module. Callers supply their own copy, URL and pixel names; content fields left null fall back to the module's own translated defaults, which is also what the existing getDesktopBrowser deeplink now resolves to. Side effects stay with whoever owns them: the Settings "Complete your setup" dismissal is persisted by a handler contributed from app through the DesktopAppPromotionInteractionHandler plugin point, keyed so Sync and Autofill launches can never trigger it. Pixel names, parameters and attribution origins are unchanged, and Sync's own multi-platform screen stays for the newDesktopBrowserSettingEnabled off path. https://app.asana.com/1/137249556945/task/1213509274333252 Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Contributor
|
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/task/1213509274333252
Tech Design URL (if applicable): https://app.asana.com/1/137249556945/project/481882893211075/task/1217673178631250
API Proposals URL(s) (if applicable): TBD
Description
Three separate activities promoted the DuckDuckGo desktop browser —
GetDesktopBrowserActivity(app),SyncGetOnOtherPlatformsActivity(sync-impl) andImportPasswordsGetDesktopAppActivity(autofill-impl) — each with its own ViewModel, layout, strings and pixel set.This replaces them with one configuration-driven screen in a new
desktop-app-promotionmodule.How callers configure it. Everything the screen shows, and every pixel it may fire, comes from
DesktopAppPromotionParams. Content fields are nullable and fall back to the module's own translated defaults, so Settings passes only its URL, dismiss-button flag, pixels and handler id; Sync and Autofill override the copy they don't share. The shared screen contains no per-caller branching and no caller-identity enum.Side effects stay with their owner. The Settings "Complete your setup" card is hidden once the user engages with the promo screen, which means writing
SettingsDataStore— not something a shared module can reach. The screen instead reports what the user did through a newDesktopAppPromotionInteractionHandlerplugin point, andappcontributes the handler that persists the dismissal. Handlers are resolved by an exacthandlerIdmatch, so Sync and Autofill launches (which pass no handler) can never touch a Settings preference. Share completion — as opposed to merely opening the chooser — still arrives via a broadcast receiver, now owned by the shared module and routed by the same key.Steps to test this PR
Settings — "Complete your setup" card
duckduckgo.com/browserURL match the screen before this changeSettings — bottom "Get Desktop Browser" item
Sync & Backup
ic_app_download_128illustration and no dismiss buttonPasswords & Autofill
Pixels
sourceparameterLocalisation and deeplink
getDesktopBrowserscreen name and confirm it opens with the default configurationUI changes