Граф коммитов

2438 Коммитов

Автор SHA1 Сообщение Дата
Vijay Budhram a15e9d7cd0
fix(bug): Only show account recovery promo if the user has Sync-able devices 2024-09-17 12:47:45 -04:00
Vijay Budhram 937828bf5a
feat(recovery): Add functionality of `do it later` in inline recovery key 2024-09-17 11:45:25 -04:00
Barry Chen 5a80a63555
feat(metrics): set available ping metrics during Glean init
Because:
 - we want to send known metric values in the automatic page load events

This commit:
 - set the available metrics when initializing Glean, before any page
   load events
2024-09-17 07:50:08 -05:00
dschom 6c73f6cf8b
bug(settings): Code should exit after navigation 2024-09-16 14:46:47 -07:00
dependabot[bot] b1fe4d5e52
chore(deps): bump pm2 from 5.3.0 to 5.4.2
Bumps [pm2](https://github.com/Unitech/pm2) from 5.3.0 to 5.4.2.
- [Release notes](https://github.com/Unitech/pm2/releases)
- [Changelog](https://github.com/Unitech/pm2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Unitech/pm2/compare/5.3.0...v5.4.2)

---
updated-dependencies:
- dependency-name: pm2
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-16 07:12:07 +00:00
Valerie Pomerleau dea2cd7c08
Merge pull request #17604 from mozilla/rename-reset-password-redesign-folder
rename ResetPasswordRedesign folder to ResetPassword
2024-09-13 12:16:00 -07:00
Dan Schomburg f8eaff4f4c
Merge pull request #17602 from mozilla/dependabot/npm_and_yarn/npm_and_yarn-9e830f68d7
chore(deps): bump the npm_and_yarn group with 2 updates
2024-09-13 11:35:00 -07:00
Valerie Pomerleau b7d3616fb1
rename ResetPasswordRedesign folder to ResetPassword 2024-09-13 11:22:47 -07:00
dschom ad35189ba2
task(settings,content,auth): Add account uid to gling pings 2024-09-13 09:45:22 -07:00
Valerie Pomerleau 4f43f902f3
adjust illustration size in recovery key PDF 2024-09-13 09:33:18 -07:00
dependabot[bot] 4dcfcae055
chore(deps): bump the npm_and_yarn group with 2 updates
Bumps the npm_and_yarn group with 2 updates: [postcss](https://github.com/postcss/postcss) and [dset](https://github.com/lukeed/dset).


Updates `postcss` from 8.4.44 to 8.4.45
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.44...8.4.45)

Updates `dset` from 3.1.2 to 3.1.4
- [Release notes](https://github.com/lukeed/dset/releases)
- [Commits](https://github.com/lukeed/dset/compare/v3.1.2...v3.1.4)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: dset
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-13 14:41:05 +00:00
Valerie Pomerleau 67db76983c
Merge pull request #17594 from mozilla/FXA-10419
fix(settings): Fix recovery key animations and styling
2024-09-12 16:08:23 -07:00
Valerie Pomerleau a35c91da3b
Merge pull request #17583 from mozilla/FXA-10391
cleanup(settings): Remove unused reset password with link
2024-09-12 15:55:47 -07:00
Valerie Pomerleau b77411ad74
fix(settings): Fix recovery key animations and styling
Because:

* Animations were working in storybook but not on stage due to CSP that blocked the global style tags in the svgs
* UX recommended edits to the recovery key PDF illustrations

This commit:

* Add animations and keyframes to tailwind config
* Use these animations in the SVGs
* Update recovery key pdf SVG

Closes #FXA-10419
2024-09-12 15:02:03 -07:00
dependabot[bot] ce82d09462
chore(deps): bump the npm_and_yarn group with 3 updates
Bumps the npm_and_yarn group with 3 updates: [postcss](https://github.com/postcss/postcss), [express](https://github.com/expressjs/express) and [serve-static](https://github.com/expressjs/serve-static).


Updates `postcss` from 8.4.43 to 8.4.44
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.43...8.4.44)

Updates `express` from 4.20.0 to 4.21.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/4.21.0/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.20.0...4.21.0)

Updates `serve-static` from 1.14.2 to 1.16.0
- [Release notes](https://github.com/expressjs/serve-static/releases)
- [Changelog](https://github.com/expressjs/serve-static/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/serve-static/compare/v1.14.2...1.16.0)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: serve-static
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-12 16:11:41 +00:00
Valerie Pomerleau f0bb1b8001
cleanup(settings): Remove unused reset password with link
Because:

*

This commit:

*

Closes #
2024-09-11 18:07:47 -07:00
Dan Schomburg 6ce4dba247
Merge pull request #17578 from mozilla/dependabot/npm_and_yarn/npm_and_yarn-2732b03f44
chore(deps): bump the npm_and_yarn group with 3 updates
2024-09-11 14:43:05 -07:00
Valerie Pomerleau 3b6bf708a8
feat(settings): Adjust settings promo banner for mobile
Because:

* We want to match designs for mobile view

This commit:

* Adjust styling of the NotificationPromoBanner component to support mobile view
* Adjust styling of PageSettings to use a gap between components (removes needs for setting external margins in section components
* Remove stacked banner story, the spacing between the banners is now set at the PageSettings level
* Adds story to PageSettings to show NotificationPromoBanner in context
* Small drive-by tweaks for ltr/rtl

Closes #FXA-10405
2024-09-11 13:48:07 -07:00
dependabot[bot] 6d19636775
chore(deps): bump the npm_and_yarn group with 3 updates
Bumps the npm_and_yarn group with 3 updates: [postcss](https://github.com/postcss/postcss), [express](https://github.com/expressjs/express) and [body-parser](https://github.com/expressjs/body-parser).


Updates `postcss` from 8.4.42 to 8.4.43
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.42...8.4.43)

Updates `express` from 4.19.2 to 4.20.0
- [Release notes](https://github.com/expressjs/express/releases)
- [Changelog](https://github.com/expressjs/express/blob/master/History.md)
- [Commits](https://github.com/expressjs/express/compare/4.19.2...4.20.0)

Updates `body-parser` from 1.20.1 to 1.20.3
- [Release notes](https://github.com/expressjs/body-parser/releases)
- [Changelog](https://github.com/expressjs/body-parser/blob/master/HISTORY.md)
- [Commits](https://github.com/expressjs/body-parser/compare/1.20.1...1.20.3)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: express
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: body-parser
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-11 18:00:14 +00:00
Vijay Budhram a4e178197e
Merge pull request #17576 from mozilla/fxa-10394
feat(banner): Add Notification Promotion metrics
2024-09-11 12:38:36 -04:00
Vijay Budhram 0629520257
feat(banner): Add Notification Promotion metrics 2024-09-11 11:35:17 -04:00
Lauren Zugai eac5184264
fix(glean): Conditionally fire promo view event when Settings view event fires
Because:
* We are seeing this event fire too many times, reproducible when navigating around Settings

This commit:
* Creates a shared function for PageSettings and ProductPromo to use to conditionally send the Glean ping and render the component as expected

fixes FXA-10403
2024-09-11 10:08:22 -05:00
Vijay Budhram 318cfca9ac
feat(banner): Add Notification Promotion banner component 2024-09-11 09:44:47 -04:00
Valerie Pomerleau 4a3a4f9867
Merge pull request #17568 from mozilla/FXA-10397-react-pdf-svg
feat(settings): Update recovery key pdf illustration
2024-09-10 21:44:52 -07:00
Valerie Pomerleau c4533f8665
feat(settings): Add CSS animations for recovery key graphics
Because:

* Add a touch of whimsy, standardize image style
* Respect user preference for reduced motion

This commit:

* Add animations for the recovery key flow graphics (password, recovery key, recovery key hint)
* Update images used in recovery key creation flow
* Remove unused images
* Add tailwind utility to stop all svg animations if user prefers reduced motion

Closes #FXA-10205
2024-09-10 21:31:28 -07:00
Lauren Zugai 1bbf07d1d0
Merge pull request #17541 from mozilla/FXA-10078
feat(recovery-key): Create initial components for inline recovery key setup flow
2024-09-10 19:27:50 -05:00
Lauren Zugai 2f0ad888f8
feat(recovery-key): Create initial components for inline recovery key setup flow
Because:
* We want to take Sync users to an 'inline' (after login) recovery key setup flow if they don't already have a key

This commit:
* Creates initial components for this flow and adds basic tests and l10n
* Contains some refactoring to share with the download component with Settings

closes FXA-10078
2024-09-10 18:53:57 -05:00
Valerie Pomerleau be64f02ab3
feat(settings): Update recovery key pdf illustration
Because:

* We are aligning all graphics to use the same graphic style

This commit:

* Create a react-pdf version of the recovery key graphic

Closes #FXa-10397
2024-09-10 16:25:18 -07:00
Valerie Pomerleau 31001f565e
Merge pull request #17524 from mozilla/FXA-10386
fix(settings): Improve value of extra data included with automated Glean page load pings
2024-09-10 14:33:59 -07:00
Vijay Budhram c32e74c82f
feat(recoveryKey): Add `estimatedSyncDeviceCount` to graphql account resolver 2024-09-09 21:19:14 -04:00
Valerie Pomerleau 3dac422c5d
fix(settings): Update url passed to Glean page load metrics and include customized document titles
Because:

* We want to enable grouping of the automated page load Glean pings, and the default data included all query params in url and generic page title ("Mozilla accounts") for most pings

This commit:

* Sets a custom document title in the Head component
* Override the url provide on page load to glean to only include the pathname (excluding the params allows for easier grouping by route)
* Moves the page load event closer to page rendering for Settings pages, ensuring custom document titles are more reliably included with the pings
* Ensures additional metrics data (including flow id) is included for Settings pages
* Attempted to move the page load event into the AppLayout component for non-settings pages, but this caused a lot if issues for test and storybook mocks. Most non-settings pages do not currently have custom page titles, so there was limited benefit to moving the page load event at the moment.

Closes #FXA-10386
2024-09-09 16:37:57 -07:00
Bryan Olsson 5b956291a4
chore(l10n): Replace hardcoded Firefox with brand term
Because:

* A string landed with a hard coded brand term for Firefox

This commit:

* Replaces the hardcoded string with the correct brand term
2024-09-05 14:31:16 -07:00
Vijay Budhram 788bf5b514
Merge pull request #17535 from mozilla/fxa-10077
feat(sync): Add initial feature flag for setting up recovery code after Sync sign-in
2024-09-05 14:00:02 -04:00
Vijay Budhram 698ccb92bc
feat(sync): Add initial feature flag for setting up recovery code after Sync sign-in 2024-09-05 11:26:58 -04:00
dependabot[bot] 72a4cd7bb6
chore(deps): bump @emotion/react from 11.11.1 to 11.13.3
Bumps [@emotion/react](https://github.com/emotion-js/emotion) from 11.11.1 to 11.13.3.
- [Release notes](https://github.com/emotion-js/emotion/releases)
- [Changelog](https://github.com/emotion-js/emotion/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emotion-js/emotion/compare/@emotion/react@11.11.1...@emotion/react@11.13.3)

---
updated-dependencies:
- dependency-name: "@emotion/react"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-05 06:55:18 +00:00
dependabot[bot] 2e230d2365
chore(deps): bump the npm_and_yarn group with 3 updates
Bumps the npm_and_yarn group with 3 updates: [jose](https://github.com/panva/jose), [postcss](https://github.com/postcss/postcss) and [webpack](https://github.com/webpack/webpack).


Updates `jose` from 5.7.0 to 5.8.0
- [Release notes](https://github.com/panva/jose/releases)
- [Changelog](https://github.com/panva/jose/blob/main/CHANGELOG.md)
- [Commits](https://github.com/panva/jose/compare/v5.7.0...v5.8.0)

Updates `postcss` from 8.4.41 to 8.4.42
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.41...8.4.42)

Updates `webpack` from 5.89.0 to 5.94.0
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](https://github.com/webpack/webpack/compare/v5.89.0...v5.94.0)

---
updated-dependencies:
- dependency-name: jose
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: postcss
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: webpack
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-04 20:27:44 +00:00
Barry Chen d9d286a7a9
fix(build): correct the cdn url in settings build for prod 2024-09-04 12:15:56 -05:00
Barry Chen 85d94551dd
fix(Glean): use the configured app channel for Glean in Settings
Because:
 - Glean in Settings was initialized with the default "development"
   value

This commit:
 - uses the actual configuration value for the app channel
2024-09-03 17:22:31 -05:00
Vijay Budhram 6f4aa7a45c
Merge pull request #17493 from mozilla/update-push-ux
Add verify and confirm 2FA via push screens
2024-09-03 14:17:44 -04:00
Vijay Budhram 35b0311355
feat(auth): Update 2FA screens 2024-09-03 13:37:49 -04:00
dschom 90b2fbd8ae
task(content,settings): Reference l10n files on CDN 2024-08-28 15:19:03 -07:00
Lauren Zugai 3719aa8c7c
Merge pull request #17403 from mozilla/FXA-8635
feat(react): Build out Index / email-first component
2024-08-28 14:53:06 -05:00
Lauren Zugai a34dc09ecb
feat(react): Build out Index / email-first component
Because:
* We are converting our flows from Backbone to React

This commit:
* Creates the initial component buildout and displays states in Storybook
2024-08-28 14:05:28 -05:00
dschom 4072f690d6
bug(settings): CDN path was incorrect 2024-08-28 11:29:10 -07:00
Dan Schomburg 3d188aefab
Merge pull request #17495 from mozilla/fix-typo-in-cdn-url
bug(settings): Fix typo in cdn url
2024-08-28 11:02:22 -07:00
dschom 6af4b0550a
bug(settings): Fix typo in cdn url 2024-08-28 11:00:15 -07:00
Lauren Zugai 3486c83c04
fix(glean): Fix ProductPromo firing extra view event, add glean click event
Because:
* We use this component in multiple places (sidebar and setitngs), and it fired a view event for each instance
* We want a glean click event for comparison on a custom event

fixes FXA-10317
2024-08-28 10:30:59 -05:00
Valerie Pomerleau 64cb4b6be2
Merge pull request #17484 from mozilla/DENG-4405-followup-for-fxa-settings
fix(glean): Glean metrics were erroring for settings
2024-08-27 19:08:57 -07:00
Dan Schomburg cd95de8155
Merge pull request #17422 from mozilla/settings-cdn
task(settings): Support CDN in fxa-settings
2024-08-27 17:25:00 -07:00
Valerie Pomerleau 865c2b0036
fix(glean): Glean metrics were erroring for settings
Because:

* Glean metrics were not emitted for settings with a console error

This commit:

* Remove glean from fxa-settings dependencies as follow-up to PR-17470
2024-08-27 16:15:49 -07:00
Lauren Zugai 40f050cd64
Merge pull request #17483 from mozilla/FXA-10316
fix(sync): Only send canLinkAccount web channel message on desktop sync
2024-08-27 17:31:01 -05:00
Lauren Zugai 1c48e10f7a
fix(sync): Only send canLinkAccount web channel message on desktop sync
Because:
* iOS does not respond to this web channel message, unlike desktop which prompts the user with an alert, and unlike Android, which responds with 'ok: true' automatically

This commit:
* Only sends the web channel message if desktop v3 context is used. We will update this for OAuth desktop before that feature rolls out.

closes FXA-10316
2024-08-27 16:47:10 -05:00
dschom 6d79b616ff
task(settings): Support CDN in fxa-settings
Because:
- Settings is not being served from a CDN

This Commit:
- Configures webpack so that it can build assets that will work with a CDN
- Updates docker build to produce static bundle for stage cdn
- Updates docker build to produce static bundle for prod cdn
- Makes a couple changes to target these new build assets in content server
- Uses the full hash in bundle names to reduce the chance of conflict

Note, that we currently do a string replacement on index.html to inject some config and a flow id. If we didn't do this, we could serve this as a SPA directly off the CDN which would be faster. This should be a future consideration.

To test what this would look like once deployed on stage / production, override the following in local.json config.

  "static_directory": "dist"
  "page_template_subdirectory": "dist"
  "proxy_settings": false
2024-08-27 14:00:17 -07:00
Valerie Pomerleau 680ac5a489
fix(settings): Styling tweak to add spacing between links on mobile
Because:

* There was no spacing between Use a different account and Forgot password? links on mobile sign in page

This commit:

* Tweak styling to show links on separate lines for mobile

Closes #FXA-10305
2024-08-27 10:40:19 -07:00
Lauren Zugai b248f24c15
feat(glean): Add 2FA 'these authentication apps' link click event, adjust DataBlock data attrs
Because:
* We want metrics for when a user clicks on this link
* Simplifies glean data attrs because the type is string or undefined, and if this is undefined the attribute does not render

This commit:
* Adds the glean attrs on LinkExternal
* Shares 2fa glean data type with enum for consistency

closes FXA-9578
2024-08-27 10:34:46 -05:00
Barry Chen 7612914eaa
feat(metrics): add view events for 2fa recovery codes 2024-08-27 09:43:34 -05:00
Barry Chen 06e1bd7e25
Merge pull request #17468 from mozilla/FXA-9576-2fa-setup-code-success
feat(metrics): add 2fa setup successful code submission event
2024-08-27 06:31:21 -07:00
Barry Chen 404b945570
feat(metrics): add 2fa setup successful code submission event 2024-08-27 08:01:14 -05:00
Lauren Zugai 6106d5b5d2
Merge pull request #17460 from mozilla/FXA-9583
feat(glean): Add click events for 2FA 'cancel' and 'continue' on inline/setup/replace
2024-08-26 17:58:53 -05:00
Lauren Zugai 56ee0ae82e
Merge pull request #17457 from mozilla/FXA-10297
feat(settings): Refactor 'Data Collection' for new content + UnitRow adjustments
2024-08-26 10:48:21 -05:00
Lauren Zugai 180e394190
Merge pull request #17461 from mozilla/FXA-10127
feat(glean): Add click event for 2fa backup code submit
2024-08-26 09:52:03 -05:00
dependabot[bot] ca8b4e5c9b
chore(deps-dev): bump type-fest from 4.18.1 to 4.25.0
Bumps [type-fest](https://github.com/sindresorhus/type-fest) from 4.18.1 to 4.25.0.
- [Release notes](https://github.com/sindresorhus/type-fest/releases)
- [Commits](https://github.com/sindresorhus/type-fest/compare/v4.18.1...v4.25.0)

---
updated-dependencies:
- dependency-name: type-fest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 06:50:09 +00:00
Lauren Zugai 8e4007be7f
feat(glean): Add click event for 2fa backup code submit
Because:
* We are adding glean click events

This commit:
* Adds the click event for inline setup, normal setup, and replace recovery codes, after users submit the recovery code to confirm and finish the flow

closes FXA-10127
2024-08-23 16:57:38 -05:00
Barry Chen d8b1d4f760
Merge pull request #17459 from mozilla/FXA-9575-2fa-submit-glean
feat(metrics): add click event for 2fa setup totp code submit
2024-08-23 13:37:47 -07:00
Barry Chen 0c46f39dea
feat(metrics): add click event for 2fa setup totp code submit 2024-08-23 15:13:36 -05:00
Lauren Zugai 8e35712d97
feat(glean): Add click events for 2FA 'cancel' and 'continue' on inline/setup/replace
Because:
* We want click events for "Cancel" and "Continue" buttons after the backup codes are shown

This commit:
* Adds the events for normal setup, inline setup, and replace

closes FXA-9583, closes FXA-9584
2024-08-23 14:25:45 -05:00
Lauren Zugai 7abf912201
feat(settings): Refactor 'Data Collection' for new content + UnitRow adjustments
Because:
* We want to add a new 'Firefox browser' row to our Data Collection and Use section

This commit:
* Refactors DataCollection to use our standard UnitRow component per the new content design
* Adjusts UnitRow for new hideHeaderValue prop, doesn't render action div if action wasn't provided, renames noHeaderValueText to defaultHeaderValueText for clarity
* Tweaks related stories and tests

closes FXA-10297
2024-08-23 11:46:48 -05:00
Lauren Zugai c93e2d0676
chore(config): Set default Glean uploadEnabled option to true
Because:
* This must be enabled for automatic Glean click events and is already set to true for stage and prod

This commit:
* Updates the default config option from false to true for dev env
2024-08-23 09:38:29 -05:00
Lauren Zugai c2e3a067f2
feat(glean): Enable automatic click events, add 3x GetDataTrio events
Because:
* We want to add automatic Glean click events so we don't have to edit the YAML and generate files for every click interaction
* We want events for copy, download, and print actions for 2FA recovery codes

This commit:
* Adds the click event from the Glean API to be callable from our custom GleanMetrics object, sets up the global event listener once application state has settled
* Adds click events with data-glean-id and data-glean-type for all states (setup, change, inline setup) of 2FA GetDataTrio

closes FXA-10264, closes FXA-9580, closes FXA-9581, closes FXA-9582
2024-08-22 17:15:12 -05:00
Vijay Budhram ea92c29bcb
feat(glean): Add entrypoint variation and experiment to glean metrics 2024-08-19 15:04:30 -04:00
dschom ae396b7200
bug(settings): Fix storybook typo for SignoutSync 2024-08-15 02:32:58 -07:00
Wil Clouser 7b42b7b5af
Merge pull request #17394 from mozilla/dependabot/npm_and_yarn/npm_and_yarn-5105dbd604
chore(deps): bump postcss from 8.4.40 to 8.4.41 in the npm_and_yarn group
2024-08-15 01:00:11 -07:00
dependabot[bot] a112b77391
chore(deps-dev): bump @testing-library/dom from 9.3.4 to 10.4.0
Bumps [@testing-library/dom](https://github.com/testing-library/dom-testing-library) from 9.3.4 to 10.4.0.
- [Release notes](https://github.com/testing-library/dom-testing-library/releases)
- [Changelog](https://github.com/testing-library/dom-testing-library/blob/main/CHANGELOG.md)
- [Commits](https://github.com/testing-library/dom-testing-library/compare/v9.3.4...v10.4.0)

---
updated-dependencies:
- dependency-name: "@testing-library/dom"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-15 07:03:48 +00:00
dependabot[bot] 4f30ecb9d0
chore(deps): bump postcss in the npm_and_yarn group
Bumps the npm_and_yarn group with 1 update: [postcss](https://github.com/postcss/postcss).


Updates `postcss` from 8.4.40 to 8.4.41
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.40...8.4.41)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-14 08:26:37 +00:00
Lauren Zugai f010d5ee18
Merge pull request #17376 from mozilla/FXA-10289
fix(promo): Disable MonitorPlus piece of ProductPromo
2024-08-14 09:10:35 +01:00
Lauren Zugai 44dbbdc5f9
fix(promo): Disable MonitorPlus piece of ProductPromo
Because:
* Monitor Plus is not available for non-US customers and there are UX questions

This commit:
* Hides the MonitorPlus promo temporarily

closes FXA-10289
2024-08-13 13:51:35 +01:00
Valerie Pomerleau 6e072890b2
feat(glean): Add Glean events for BentoMenu
Because:

* We want to track views of the bento menu and clicks on suggested product links

This commit:

* Add new Glean events and implement in fxa-settings, add unit tests

Closes #FXA-10219
2024-08-12 13:02:18 +01:00
Wil Clouser 0adacf5f81
Merge pull request #17362 from mozilla/20240808
refactor(pkgs): Remove unused dependencies
2024-08-09 09:39:31 -07:00
Vijay Budhram b9d62dbdfe
feat(promo): Add conditional for ProductPromo for Mozilla Monitor Plus 2024-08-09 11:01:53 -04:00
Wil Clouser ff8af839fa
refactor(pkgs): Remove unused dependencies 2024-08-08 15:32:19 -07:00
Valerie Pomerleau 19fc7a27cb
Merge pull request #17351 from mozilla/FXA-10213
feat(settings): Update UTM params for monitor plus promo
2024-08-08 08:35:32 -07:00
Lauren Zugai f3e9e0b899
Merge pull request #17350 from mozilla/FXA-10220
feat(settings): Update account preferences help link, add Glean click event
2024-08-08 10:04:19 -05:00
dependabot[bot] 359750db25
chore(deps): bump uuid and @types/uuid
Bumps [uuid](https://github.com/uuidjs/uuid) and [@types/uuid](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/uuid). These dependencies needed to be updated together.

Updates `uuid` from 9.0.1 to 10.0.0
- [Changelog](https://github.com/uuidjs/uuid/blob/main/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v9.0.1...v10.0.0)

Updates `@types/uuid` from 7.0.3 to 10.0.0
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/uuid)

---
updated-dependencies:
- dependency-name: uuid
  dependency-type: direct:production
  update-type: version-update:semver-major
- dependency-name: "@types/uuid"
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-08 06:37:48 +00:00
Valerie Pomerleau 95e5e896ff
feat(settings): Update UTM params for monitor plus promo
Because:

* We want to distinguish between monitor free and monitor plus
* We want to use the Monitor stage link if coming from stage accounts

This commit:

* Switch the UTM content param in the promo link
* Check for host to select which monitor link to use

Closes #FXA-10213
2024-08-07 16:15:54 -07:00
Lauren Zugai 3a2099a66d
fix(pocket): Do not inline Pocket SVG due to text logo rendering issue
Because:
* In production the SVG is not rendering properly

This commit:
* Sends a network request for the image instead of inlining the SVG
2024-08-07 17:54:47 -05:00
Jonathan Almeida ad5532bf9b
feat(metrics): Add '2FA QR Code Setup View' frontend Glean event 2024-08-07 14:14:32 -04:00
Jonathan Almeida c7847f94f5
Merge pull request #17298 from mozilla/FXA-9577
feat(metrics): Add '2FA Can't Scan Code Link' frontend event
2024-08-07 14:13:20 -04:00
Dan Schomburg 479e10a6b1
Merge pull request #17307 from mozilla/FXA-9874
task(settings,functional-tests): Review use of webchannel messages
2024-08-07 10:50:19 -07:00
Jonathan Almeida 252857c31c
feat(metrics): Add '2FA Can't Scan Code Link' frontend event 2024-08-07 13:45:14 -04:00
Lauren Zugai cfcc96394b
feat(settings): Update account preferences help link, add Glean click event
Because:
* Accounts has its own dedicated help link we should use instead
* We want a metrics event for when users click on this link

This commit:
* Updates the link and adds the Glean event

closes FXA-10220, closes FXA-10221
2024-08-07 12:14:12 -05:00
dschom 8e9b5ca681
task(settings,functional-tests): Review use of webchannel messages
Because:
- We noticed that some of the usage for webchannels was inconsistent.
- Of the web channel messages we send only FxAStatus and LinkAccount actually return responses.

This Commit:
- Removes implied response from the fxaLogin command that wasn't actually sent by firefox.
- Updates the functional tests to better reflect the actual commands and responses sent by firefox by creating some types. This should avoid mistakes
2024-08-07 10:05:24 -07:00
Vijay Budhram 7bdf024bbd
feat(promo): Add conditional for ProductPromo for Mozilla Monitor Plus 2024-08-07 11:51:37 -04:00
Valerie Pomerleau db3d150222
Merge pull request #17335 from mozilla/FXA-10053
feat(settings): Standardize UTM params for Bento Menu links
2024-08-07 07:46:27 -07:00
dependabot[bot] d311275e67
chore(deps): bump react-refresh from 0.11.0 to 0.14.2
Bumps [react-refresh](https://github.com/facebook/react/tree/HEAD/packages/react) from 0.11.0 to 0.14.2.
- [Release notes](https://github.com/facebook/react/releases)
- [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/react/commits/v0.14.2/packages/react)

---
updated-dependencies:
- dependency-name: react-refresh
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-08-07 07:03:41 +00:00
Valerie Pomerleau c9f356e204
add tests 2024-08-06 23:31:04 -07:00
Valerie Pomerleau bded1df1da
feat(settings): Standardize UTM params for Bento Menu links
Because:

* We want to standardize UTM params for relying party links in the Bento Menu

This commit:

* Update UTM params included in relying party links (except Pocket)
* Update names of constants to uppercase
* Rename HomePath to SETTINGS_PATH for more clarity now that fxa-settings includes more than Settings

Closes #FXA-10053
2024-08-06 15:51:50 -07:00
Lauren Zugai cd7731e9fa
feat(settings): Create ProductPromo, display for users without Monitor
Because:
* We want to promote Moz products and services

This commit:
* Adds a new configurable ProductPromo component, sets it up for Monitor case
* Adds new Sidebar component to hold the nav and ProductPromo

closes FXA-10145
2024-08-05 09:47:49 -05:00
Valerie Pomerleau 63d26f6aa1
Merge pull request #17237 from mozilla/FXA-9984
fix(settings): Handle multiple signins to settings
2024-07-31 12:55:24 -07:00
Lauren Zugai 1ba414fdbc
feat(newsletters): Update first checkbox slug and copy
Because:
* We want updated copy and a new slug

This commit:
* Adjusts the copy and updates the 'security-privacy-news' slug to 'mozilla-and-you'
* Moves the MoFo checkbox to be the second checkbox
* Adjusts Glean marketing event

closes FXA-10027
2024-07-31 11:17:46 -05:00
Lauren Zugai 8cf50fd607
Merge pull request #17287 from mozilla/FXA-10119
feat(glean): Add 'third_party_links' as an option on event, add to login/cached login view events
2024-07-30 16:29:58 -05:00
Lauren Zugai 6195de97a1
Merge pull request #17289 from mozilla/FXA-10204
fix(signin): Display Pocket text logo (instead of Pocket logo) for signin
2024-07-30 16:28:12 -05:00
Lauren Zugai c620899a7b
fix(signin): Display Pocket text logo (instead of Pocket logo) for signin
Because:
* We want to display the SVG that has the "pocket" text logo and not just the Pocket logo

This commit:
* Updates the SVG and updates minor styling

fixes FXA-10204
2024-07-30 10:21:57 -05:00
dependabot[bot] 1424c1b900
chore(deps): bump @emotion/styled from 11.11.0 to 11.13.0
Bumps [@emotion/styled](https://github.com/emotion-js/emotion) from 11.11.0 to 11.13.0.
- [Release notes](https://github.com/emotion-js/emotion/releases)
- [Changelog](https://github.com/emotion-js/emotion/blob/main/CHANGELOG.md)
- [Commits](https://github.com/emotion-js/emotion/compare/@emotion/styled@11.11.0...@emotion/styled@11.13.0)

---
updated-dependencies:
- dependency-name: "@emotion/styled"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-30 06:34:30 +00:00
Lauren Zugai f54d82268e
feat(glean): Add 'third_party_links' as an option on event, add to login/cached login view
Because:
* We want to know if the third party auth buttons were displayed or not when the login view event happens

This commit:
* Adds 'third_party_links' as an available boolean on extra_keys for event type
* Adds this for cachedLogin.view and login.view Glean events

fixes FXA-10119
2024-07-29 17:34:10 -05:00
Lauren Zugai eed5e363bd
Merge pull request #17284 from mozilla/fxa-10187
feat(delete): Add notice marketing email notice on delete account page
2024-07-29 14:44:49 -05:00
Ben Bangert 1835bcfe0f
Merge pull request #17281 from mozilla/dependabot/npm_and_yarn/ts-jest-29.2.3
chore(deps-dev): bump ts-jest from 29.1.2 to 29.2.3
2024-07-29 10:26:08 -07:00
Vijay Budhram 4680f6184b
feat(delete): Add notice marketing email notice on delete account page 2024-07-29 12:42:51 -04:00
Vijay Budhram 6e474cbc08
Merge pull request #17257 from mozilla/fxa-9723
feat(metrics): Add Glean page load events when navigating
2024-07-29 12:16:42 -04:00
dependabot[bot] 00161972ea
chore(deps-dev): bump ts-jest from 29.1.2 to 29.2.3
Bumps [ts-jest](https://github.com/kulshekhar/ts-jest) from 29.1.2 to 29.2.3.
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.1.2...v29.2.3)

---
updated-dependencies:
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-29 06:38:44 +00:00
Lauren Zugai 1a498e1bc3
Merge pull request #17214 from mozilla/canlinkaccount-fix
fix(sync): Adjust conditions for sending can_link_account on signin
2024-07-26 14:43:55 -05:00
dschom fd5cd891e9
bug(settings): Emit login enage metric only once
Because:
- The login engage metric was being emitted too many times

This Commit:
- Ensures the metric can only be emitted once
2024-07-26 11:13:23 -07:00
Lauren Zugai d2300052cc
fix(sync): Adjust conditions for sending can_link_account on signin
Because:
* In the 'account disconnected' Sync state, users are now taken to /signin instead of /force_auth, so our logic needed to be updated

This commit:
* Adjusts the logic for when we send the message. Only send if the user didn't first hit content-server (we will know based on a temporary query param until email-first is converted to React). The browser decides when to automatically respond with ok: true or prompt the user
* Displays an error message when the user cancels

fixes FXA-10176
2024-07-26 12:46:03 -05:00
dependabot[bot] 0c36225cb4
chore(deps): bump postcss in the npm_and_yarn group
Bumps the npm_and_yarn group with 1 update: [postcss](https://github.com/postcss/postcss).


Updates `postcss` from 8.4.39 to 8.4.40
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.39...8.4.40)

---
updated-dependencies:
- dependency-name: postcss
  dependency-type: direct:production
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-25 23:56:56 +00:00
dependabot[bot] 87f1d7e24e
chore(deps): bump the npm_and_yarn group with 8 updates
Bumps the npm_and_yarn group with 8 updates:

| Package | From | To |
| --- | --- | --- |
| [graphql](https://github.com/graphql/graphql-js) | `16.8.0` | `16.9.0` |
| [jose](https://github.com/panva/jose) | `5.3.0` | `5.4.0` |
| [mysql2](https://github.com/sidorares/node-mysql2) | `3.9.7` | `3.9.8` |
| [semver](https://github.com/npm/node-semver) | `7.6.2` | `7.6.3` |
| [postcss](https://github.com/postcss/postcss) | `8.4.38` | `8.4.39` |
| [ws](https://github.com/websockets/ws) | `8.17.0` | `8.17.1` |
| [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) | `7.2.1` | `7.3.0` |
| [@grpc/grpc-js](https://github.com/grpc/grpc-node) | `1.9.12` | `1.9.15` |


Updates `graphql` from 16.8.0 to 16.9.0
- [Release notes](https://github.com/graphql/graphql-js/releases)
- [Commits](https://github.com/graphql/graphql-js/compare/v16.8.0...v16.9.0)

Updates `jose` from 5.3.0 to 5.4.0
- [Release notes](https://github.com/panva/jose/releases)
- [Changelog](https://github.com/panva/jose/blob/main/CHANGELOG.md)
- [Commits](https://github.com/panva/jose/compare/v5.3.0...v5.4.0)

Updates `mysql2` from 3.9.7 to 3.9.8
- [Release notes](https://github.com/sidorares/node-mysql2/releases)
- [Changelog](https://github.com/sidorares/node-mysql2/blob/master/Changelog.md)
- [Commits](https://github.com/sidorares/node-mysql2/compare/v3.9.7...v3.9.8)

Updates `semver` from 7.6.2 to 7.6.3
- [Release notes](https://github.com/npm/node-semver/releases)
- [Changelog](https://github.com/npm/node-semver/blob/main/CHANGELOG.md)
- [Commits](https://github.com/npm/node-semver/compare/v7.6.2...v7.6.3)

Updates `postcss` from 8.4.38 to 8.4.39
- [Release notes](https://github.com/postcss/postcss/releases)
- [Changelog](https://github.com/postcss/postcss/blob/main/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss/compare/8.4.38...8.4.39)

Updates `ws` from 8.17.0 to 8.17.1
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](https://github.com/websockets/ws/compare/8.17.0...8.17.1)

Updates `webpack-dev-middleware` from 7.2.1 to 7.3.0
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v7.2.1...v7.3.0)

Updates `@grpc/grpc-js` from 1.9.12 to 1.9.15
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/@grpc/grpc-js@1.9.12...@grpc/grpc-js@1.9.15)

---
updated-dependencies:
- dependency-name: graphql
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: jose
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: mysql2
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: semver
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: postcss
  dependency-type: direct:production
  dependency-group: npm_and_yarn
- dependency-name: ws
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: webpack-dev-middleware
  dependency-type: direct:development
  dependency-group: npm_and_yarn
- dependency-name: "@grpc/grpc-js"
  dependency-type: indirect
  dependency-group: npm_and_yarn
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-07-25 22:51:33 +00:00
Ben Bangert 588120b212
Merge pull request #17262 from mozilla/chore/dependency/apollos-to-3.11.1-and-4.10.5
chore: update apollo/client and server to 3.11.1 and 4.10.5
2024-07-25 15:10:23 -07:00
Ben Bangert 97b45f6ae3
chore: update apollo/client and server to 3.11.1 and 4.10.5 2024-07-25 21:20:25 +00:00
Vijay Budhram f9b1c29dfb
fix(image): Fix issue with Pocket logo in cache signin page 2024-07-25 15:04:52 -04:00
Vijay Budhram b643d20723
feat(metrics): Add Glean page load events when navigating 2024-07-25 13:04:31 -04:00
Lauren Zugai 7c643ce1ff
fix(sync): Check and set sessionToken from browser only when provided
Because:
* There's a case where the session token given back from requestSignedInUser is undefined

This commit:
* Makes sure the sessionToken is defined before checking its validity and using it

fixes FXA-10156
2024-07-24 10:24:17 -05:00
Ben Bangert 01987a515a
Merge pull request #17245 from mozilla/chore/update-nx-19.5.1
chore: update nx to 19.5.1 and typescript to 5.5.3
2024-07-23 16:06:15 -07:00
Ben Bangert d39fca36e5
chore: update nx to 19.5.1 and typescript to 5.5.3
Because:

* nx 19.5.1 has been released
* typescript 5.5.3 has been released

This commit:

* updates nx to 19.5.1
* updates typescript to 5.5.3
2024-07-23 22:37:41 +00:00
Valerie Pomerleau 38399858b5
fix(settings): Handle multiple signins to settings
Because:

* If multiple accounts were signed in on different tabs, operations could be applied to the wrong account
* Current account uid was not correctly updating to reflect the account in use in the focused tab

This commit:

* On tab focus, check if the account uid matches the current account uid. If not, update current account uid.
* Only check for destroyed session after updating the current account uid to ensure the correct session is signed out on tab focus.

Closes #FXA-9984
2024-07-23 10:16:56 -07:00
Valerie Pomerleau 09cf015125
fix signin storybook 2024-07-22 15:06:25 -07:00
Valerie Pomerleau 84bd7bb65d
remove unused and broken ThirdPartyAuthCallback storybook 2024-07-22 14:27:15 -07:00
Valerie Pomerleau a67469f15e
fix signup storybook 2024-07-22 14:27:15 -07:00
Valerie Pomerleau 5820078cf0
fix signinRecoveryCode storybook 2024-07-22 14:27:14 -07:00
Valerie Pomerleau 27c4cf3a08
fix connected services storybook 2024-07-22 14:27:14 -07:00
Valerie Pomerleau f78ab6822d
fix brand messaging storybook 2024-07-22 14:27:14 -07:00
Valerie Pomerleau dacbe443c8
fix(storybook): Fix broken settings storybooks
Because:

* Some stories are broken and not loading

This commit:

* Update image imports for image components
* Add React import where missing
* Move use of useSensitiveDataClient hook to container level

Closes #FXA-10085
2024-07-22 14:27:14 -07:00
dschom c05d73f150
bug(settings): Fix android manage account settings glitch
Because:
- If you signout and the browser isn't notified, users can end up in a wierd state when accessing settings

This Commit:
- Asks firefox for the current user
- Checks the current session token
- If the current session is token, uses it thereby letting the user access settings
- If the current session is not valid, a message is displayed saying to signout from sync.
2024-07-22 13:37:59 -07:00
Vijay Budhram 37a3d583d4
fix(sync): Don't await the `firefox.fxaLogin` 2024-07-18 13:32:26 -04:00
Dan Schomburg d86419a683
Merge pull request #17230 from mozilla/fxa-10074
task(settings): Stop using window.addEventListener for web channel messages
2024-07-17 08:52:50 -07:00
Barry Chen 42d425cc2e
Merge pull request #17218 from mozilla/deng-3273
fix(metrics): DENG-3273 Update event names for consistency between `accounts-events` and `events` pings
2024-07-17 10:38:24 -05:00
Arkadiusz Komarzewski 6957826869
fix(metrics): DENG-3273 Update event names for consistency between `accounts-events` and `events` pings 2024-07-17 09:24:40 -05:00
dschom c9b91ea4ac
task(settings): Stop using window.addEventListener for web channel messages
Because:
- We saw positive results from doing the same thing for the CanLinkAcocunt web channel message

This Commit:
- Updates the Login webchannel message
2024-07-16 17:19:23 -07:00
Valerie Pomerleau 675b75fddd
feat(glean): Add frontend glean events for settings profile CTAs
Because:

* We want to track metrics for clicks to add/change display name and add a secondary email

This commit:

* Adds and implements glean events account_pref_display_name_submit and account_pref_secondary_email_submit

Closes #FXA-10041, FXA-10042
2024-07-16 14:47:52 -07:00
Lauren Zugai ce156275fa
feat(glean): Add unlink account submit and confirm submit events
Because:
* We want to track metrics events on Unlink click from settings, and Unlink confirm, with 'create_password' reason if the user needed to first set a password

This commit:
* Adds events account_pref_google_unlink_submit, account_pref_google_unlink_submit_confirm, account_pref_apple_unlink_submit, account_pref_apple_unlink_submit_confirm
* Includes 'reason' in events if user does not have a password set
* Updates some tests and one warning

closes FXA-10050, closes FXA-10051
2024-07-16 15:57:27 -05:00
Vijay Budhram dc26cb27c0
feat(metrics): add "Add 2FA" button clean metrics 2024-07-16 13:34:38 -04:00
Lauren Zugai 86a980765e
Merge pull request #17228 from mozilla/revert-17208-FXA-10029
Revert "bug(settings): Skip checkOauthData for sync"
2024-07-16 11:11:54 -05:00
Lauren Zugai 6acacc2d3f
Revert "bug(settings): Skip checkOauthData for sync" 2024-07-15 11:27:50 -05:00
Lauren Zugai 05c165ac05
fix(settings): Remove obsolete 'send download link' link
Because:
* This link no longer allows users to get a text via SMS, so we're removing it

This commit:
* Removes the link and updates copy

fixes FXA-9983
2024-07-15 11:20:28 -05:00
Vijay Budhram 705c8e3ac1
feat(metrics): add "Add 2FA" button clean metrics 2024-07-15 10:35:29 -04:00
Valerie Pomerleau 71971493c5
feat(glean): Add frontend account deletion metrics
Because:

* We want metrics about account deletions

This commit:

* Add metrics for settings page view (account_pref_view) and account deletion (frontend) funnel (delete_account_settings_submit, delete_account_view, delete_account_engage, delete_account_submit, delete_account_password_view, delete_account_password_submit)
* Implement metrics in fxa-settings and include metrics tests

Closes #FXA-10031, FXA-10032, FXA-10033, FXA-10034, FXA-10035, FXA-10036
2024-07-12 14:28:02 -07:00
dschom d8067acd52
Bug(settings): Fix for 'stuck' sign in button p2
Because:
- When signing into sync on Android, the signin button can become 'stuck'
- Yesterday we uncovered a race condition that seemed to help, but didn't totally fix the problem.
- The event handler in fxaCanLinkAccount was too general and could pick up events that were not intended for it.

This Commit:
- Uses `this.addEventListener(FirefoxCommand.CanLinkAccount` instead of `window.addEventListener('WebChannelMessageToContent'...`
- Doing so ensures that only responses for the CanLinkAccount command are handled.

Note, we should avoid using `window.addEventListener('WebChannelMessageToContent'`
2024-07-11 13:35:18 -07:00
Valerie Pomerleau 3dcf99ed7d
Merge pull request #17206 from mozilla/FXA-10044
fix(settings): Only show custom avatar for cached sign in
2024-07-11 09:20:57 -07:00
Lauren Zugai 8a46dfffe6
fix(sync): Use requestAnimationFrame to ensure event handler is attached before event
Because:
* Android responds immediately to the can_link_account message and we don't appear to always have the event listener attached

This fix:
* Adds requestAnimationFrame, as we have needed to use this a couple of times before for testing when the response back was immediate

fixes FXA-10057
2024-07-11 10:18:15 -05:00
Valerie Pomerleau 4c0e2f3057
fix(settings): Only show custom avatar for cached sign in
Because:

* Avatar for a different cached account was shown after clicking on "Use a different account"
* We want to match parity with backbone where avatar is only shown for cached sign in

This commit:

* Show the default avatar if there is no session token
* Update unit tests to test for custom avatar shown for cached sign in with session token, and default avatar without session token, including tests for both scenarios with passwordless accounts

Closes #FXA-10044
2024-07-10 17:15:54 -07:00
Dan Schomburg 7914defaeb
Merge pull request #17215 from mozilla/fix-potential-webchannel-race
bug(settings): Make sure event handler is attached before message is sent
2024-07-10 15:41:19 -07:00
dschom bb1c4ad743
bug(settings): Make sure event handler is attached before message is sent
Because:
- On android mobile this response for 'CanLinkAccount' comes back immediately and no pop up is displayed.
- As result, we potentially have a result, and the eventHandler might not be bound.

This commit:
- Attach the event handler before sending the message.
2024-07-10 14:39:53 -07:00
Valerie Pomerleau e4d4157615
feat(glean): Add account_pref_recovery_key_submit event
Because:

* We want to track clicks to start an account recovery key setup flow

This commit:

* Add glean event and emit in the appropriate settings page

Closes #FXA-10039
2024-07-10 11:42:01 -07:00