Skip to content

feat(settings): add mobile Download Firefox card - #20987

Draft
dschom wants to merge 1 commit into
mainfrom
FXA-14236
Draft

feat(settings): add mobile Download Firefox card#20987
dschom wants to merge 1 commit into
mainfrom
FXA-14236

Conversation

@dschom

@dschom dschom commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Because

  • We are updating pairing flows and want to land UI components / pages first.
  • Adds the mobile screen prompting the user to install Firefox to sync.

This pull request

  • Adds packages/fxa-settings/src/pages/Pair2/Supplicant/DownloadFirefox/index.tsx.
  • Adds storybook stories for the page.
  • Adds l10n files.

Issue that this pull request solves

Closes: FXA-14236

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).
  • I have manually reviewed all AI generated code.

How to review (Optional)

Check out the storybook output here. Compare against figma designs (linked in ticket). Check out code for AI slop and over all adherence to patterns set forth in FxA.

Note, that this is just UI work, wiring up functionality comes later.

Worth a look on review: both actions here are static external URLs, so both are wired rather than left as callback props. The primary CTA uses Constants.FIREFOX_MOBILE_DOWNLOAD_URL rather than a per-platform App Store / Play Store link, since picking between the two needs UA sniffing plus runtime config (see PocPairInit) and mozilla.org already routes mobile visitors to the right store. The inline "Learn more" uses LINK.FX_SYNC and is embedded in the sentence with a Fluent DOM overlay so translators can move it.

Screenshots (Optional)

See story books.

Other information (Optional)

Follows the pattern set in #20952 (FXA-14234).

Because:
 - We are updating pairing flows and want to land UI components / pages first.
 - Adds the mobile screen prompting the user to install Firefox.

This commit:
 - Adds `packages/fxa-settings/src/pages/Pair2/Supplicant/DownloadFirefox/index.tsx`,
   a presentational card rendering the Firefox brand lockup, the desktop/mobile sync
   illustration, the heading and subcopy, and a single primary action. It reuses the
   `SyncDevicesImage` and `FirefoxWordmarkImage` that landed with FXA-14234, so no new
   assets are added.
 - Wires both actions rather than taking callback props, because both are static
   external URLs. The primary CTA points at `Constants.FIREFOX_MOBILE_DOWNLOAD_URL`
   and the inline "Learn more" at `LINK.FX_SYNC`; neither URL is hardcoded. Choosing
   between the App Store and the Play Store per-platform, as `PocPairInit` does, needs
   user-agent sniffing plus runtime config and would make this card
   non-presentational — mozilla.org already routes mobile visitors to the right store,
   so that branch can land with the flow if Product wants direct store links.
 - Embeds "Learn more" inside the subcopy with a Fluent DOM overlay
   (`elems={{ linkExternal }}` against a `<linkExternal>` placeable in the message)
   rather than splitting the sentence into fragments, so translators can move the link
   within the sentence. The `LinkExternal` element is declared once and passed to both
   `elems` and the fallback children so the two renders cannot drift.
 - Adds `en.ftl` with the three new strings, `index.stories.tsx` with the single state
   the card has, and tests covering the wiring. The suite runs `testL10n` against the
   bundle to catch drift between fallback text and the Fluent messages; the overlay
   message is checked separately, since `testL10n` compares rendered text against the
   raw message and can never match one containing overlay tags.

Closes #FXA-14236
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.

1 participant