Skip to content

feat(settings): add mobile Approve sign in card - #20952

Open
dschom wants to merge 1 commit into
mainfrom
FXA-14234
Open

feat(settings): add mobile Approve sign in card#20952
dschom wants to merge 1 commit into
mainfrom
FXA-14234

Conversation

@dschom

@dschom dschom commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Because

  • We are updating pairing flows and want to land UI components / pages first.
  • Adds mobile confirmation for sign in, showing authority's browser, estimated location, and IP.

This pull request

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

Issue that this pull request solves

Closes: FXA-14234

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.

Screenshots (Optional)

See story books.

Other information (Optional)

This is the initial PR. Other PRs will be based on it, so any nits or gripes should be addressed here, so that other PRs can take them into consideration.

@dschom
dschom force-pushed the FXA-14234 branch 4 times, most recently from e9640ad to f0a176b Compare August 1, 2026 01:44
Comment thread packages/fxa-settings/src/components/DeviceInfoBlock/index.stories.tsx Outdated
Comment thread packages/fxa-settings/src/components/DeviceInfoBlock/index.stories.tsx Outdated
Comment thread packages/fxa-settings/src/components/DeviceInfoBlock/index.tsx Outdated
Comment thread packages/fxa-settings/src/pages/Pair2/Supplicant/ApproveSignIn/index.test.tsx Outdated
Comment thread packages/fxa-settings/src/pages/Pair2/Supplicant/ApproveSignIn/index.test.tsx Outdated
Because:
 - After scanning the pairing QR code on their computer, users on mobile need
   a screen that tells them the sign-in still has to be approved on the
   computer, and that shows the requesting device's details so they can
   confirm the request is really theirs before pairing completes.

This commit:
 - Adds `packages/fxa-settings/src/pages/Pair2/Supplicant/ApproveSignIn/index.tsx`,
   a presentational card rendering the Firefox brand logo, a desktop/mobile sync
   illustration, the heading and instruction copy, the device info block, and a
   Cancel action. It supplies its own card surface rather than using `AppLayout`,
   per the Pair2 mobile designs. `onCancel` is a required prop so that routing the
   card cannot leave its only action inert; the flow logic lands with the route.
 - Adds `device-info-lines.ts`, which selects the Fluent message for each line of
   the device info block as a pure function so the device-name/OS fallback and the
   five geo-resolution permutations are unit tested without rendering. The location
   and IP lines reuse the shipped `device-info-block-*` messages, so only the
   browser-on-device string is new.
 - Adds `en.ftl` with the new strings, `index.stories.tsx` with four stories
   covering the device-name, OS-fallback, unknown-location, and long-device-name
   cases, and tests for the component and the message selection. The component
   suite asserts wiring and runs `testAllL10n` against the bundle to catch drift
   between fallback text and the Fluent messages; the permutations live in the
   pure-function suite.
 - Exports `firefox-brand-logo.svg` and `sync-devices.svg` from Figma. The sync
   illustration is cropped to its visible bounds so it centres correctly, and the
   browser-tab favicon it embedded at 1046x1081 for a ~3px render is downscaled,
   taking the asset from 946KB to 58KB.

Closes #FXA-14234
@dschom
dschom marked this pull request as ready for review August 3, 2026 19:22
@dschom
dschom requested review from a team as code owners August 3, 2026 19:22
@dschom
dschom requested a review from LZoog August 3, 2026 21: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