mozilla / fxa

Monorepo for Mozilla Accounts (formerly Firefox Accounts)
https://mozilla.github.io/ecosystem-platform/
Mozilla Public License 2.0
606 stars 212 forks source link

[Settings Redesign] WebChannel and inter-tab notifications #5270

Closed data-sync-user closed 3 years ago

data-sync-user commented 4 years ago

I didn't see this mentioned in the Settings Resign breakdown spreadsheet, but maybe it's addresses elsewhere.

When certain account events occur, the browser and other tabs may need to be notified.

Refs:

https://github.com/mozilla/fxa/blob/master/packages/fxa-content-server/app/scripts/lib/channels/web.js#L22:L45 https://github.com/mozilla/fxa/blob/master/packages/fxa-content-server/app/scripts/lib/channels/inter-tab.js#L18 https://dxr.mozilla.org/mozilla-central/rev/8a7d0b15595f9916123848ca906f29c62d4914c9/services/fxaccounts/FxAccountsWebChannel.jsm#30 https://developer.mozilla.org/en-US/docs/Mozilla/JavaScript_code_modules/WebChannel.jsm https://developer.mozilla.org/en-US/docs/Web/API/Broadcast_Channel_API

┆Issue is synchronized with this Jira Task ┆Issue Number: FXA-1862

data-sync-user commented 4 years ago

➤ Dave Justice commented:

Broadcasting appears to be a straight forward task, do we know if we are listening for these events anywhere?

data-sync-user commented 4 years ago

➤ Wil Clouser commented:

I'm moving this to Settings V2 as suggested in https://jira.mozilla.com/browse/FXA-840?focusedCommentId=170339&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-170339

data-sync-user commented 3 years ago

➤ Barry Chen commented:

We need to port over the auth broker domain models in order to do this.  It is a significant amount of work.

data-sync-user commented 3 years ago

➤ Wil Clouser commented:

Marking this as 21 points because it needs to be broken down further.

data-sync-user commented 3 years ago

➤ Danny Coates commented:

I've started a POC of a lite version of the channel stuff from content-server. https://github.com/mozilla/fxa/pull/7329 ( https://github.com/mozilla/fxa/pull/7329 )

The critical features for this phase are notifying the browser of password change, account delete, and profile changes. Without these we'll have significant UX regressions for folks signed into the browser, ala sync.

AFAICT it isn't important to support all the message types and channels for settings in this phase.