Conversation
bcolsson
approved these changes
Jun 23, 2026
2442e81 to
b4917e5
Compare
Because: * Firefox Accounts settings should encourage users to install Firefox on mobile (when already signed into Firefox on desktop) or switch to Firefox (when on another browser), with the variant chosen by the user's browser, device, and Sync sign-in state. * Validating the feature needs a full per-variant funnel: view, CTA submit, and dismiss. This commit: * Adds the FirefoxPromoBanner component with connect-mobile and switch-to-Firefox variants, presentational banner state, Storybook story, FTL strings, and SVG artwork (kit-mirror, heart-foxes). * Gates the desktop Firefox "connect a device" variant on the browser's Sync sign-in state; threads isSignedIntoFirefox from App through SettingsRoutes, Settings, and PageSettings, reusing the existing WebChannel result. Non-Firefox users are unaffected. * Wires the banner into PageSettings with the shared promo dismissal pattern; recovery promos take over when the Firefox promo is hidden. * Adds six firefox_promo Glean events (view, submit, dismiss for each variant), each carrying a mobile_device_count extra, generated from fxa-ui-metrics.yaml. Dismiss fires from an explicit handler, replacing a non-functional data-glean-id. * Adds unit tests for banner state, component, PageSettings ordering, and Glean wiring, plus a functional test that simulates the browser Sync session over WebChannel.
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.
Because
This pull request
FirefoxPromoBannerwith two variants (connect-mobile, switch-to-Firefox), a purebannerState.tsselector, Storybook story, FTL strings, and SVG art (kit-mirror.svg,heart-foxes.svg).isSignedIntoFirefoxfromApp→SettingsRoutes→Settings→PageSettings→ banner, reusing the existing WebChannelfxa_statusresult.PageSettingswith the shared promo-dismissal pattern; recovery promos take over when the Firefox promo is suppressed.Behavior matrix
/pairfirefox.com/en-USGlean metrics
connectMobileViewfirefox_promo.connect_mobile_viewmobile_device_countconnectMobileSubmitfirefox_promo.connect_mobile_submitmobile_device_countconnectMobileDismissfirefox_promo.connect_mobile_dismissmobile_device_countswitchToFirefoxViewfirefox_promo.switch_to_firefox_viewmobile_device_countswitchToFirefoxSubmitfirefox_promo.switch_to_firefox_submitmobile_device_countswitchToFirefoxDismissfirefox_promo.switch_to_firefox_dismissmobile_device_countIssue that this pull request solves
Closes: https://mozilla-hub.atlassian.net/browse/FXA-13220
Checklist
Other information
How to test:
/pair.glean-lint,build-ts, full unit suites, and 5/5 functional Playwright tests pass.