* Keep track of the tab-pickup-container views in TabsSetupFlowManager and their visibility
* Fix visibilitychange handling in tab-pickup-container and add some tests
* Capture a timestamp when a device has been added and there are 0 tabs to show, with at least one visible tab-pickup-container view
* Record telemetry when there are > 0 tabs in these conditions
* Small change to rename the `_waitingForTabs` internal tracking property to `_waitingForNextTabSync` to better clarify its use and meaning
* Use a consistent pattern in some of the existing tests with how we mock SyncedTabs.getRecentTabs
Differential Revision: https://phabricator.services.mozilla.com/D170526
* Keep track of the tab-pickup-container views in TabsSetupFlowManager and their visibility
* Fix visibilitychange handling in tab-pickup-container and add some tests
* Capture a timestamp when a device has been added and there are 0 tabs to show, with at least one visible tab-pickup-container view
* Record telemetry when there are > 0 tabs in these conditions
Differential Revision: https://phabricator.services.mozilla.com/D170526
* Keep track of the tab-pickup-container views in TabsSetupFlowManager and their visibility
* Fix visibilitychange handling in tab-pickup-container and add some tests
* Capture a timestamp when a device has been added and there are 0 tabs to show, with at least one visible tab-pickup-container view
* Record telemetry when there are > 0 tabs in these conditions
Differential Revision: https://phabricator.services.mozilla.com/D170526
There are two things I've added here:
- The observers for when FxA devices are connected/disconnected were not added/removed as part of this update: https://phabricator.services.mozilla.com/D153069.
- When a mobile device is the only synced device beyond the current one (desktop) and you remove the current device (desktop), then sign back in from Fx View Tab Pickup banner, `fxAccounts.device.recentDeviceList` only returns the mobile device for some reason (possibly due to device cache). This causes our checks for a secondary device to fail (as we now only have access to the mobile device from `recentDeviceList`, and we're assuming the one device we DO have access to is our current device - which is not the case). This is why Tab Pickup was incorrectly displaying the "Connect a mobile device" message. I've added a check at the start of `refreshDevices()` to manually refresh the device list (ignoring device cache) if the `recentDeviceList` doesn't contain a device with `isCurrentDevice` set to `true`. This is really a workaround for the caching stuff going on behind the scenes, but this does seem to fix things from our end.
Differential Revision: https://phabricator.services.mozilla.com/D165960
This patch adds logic to show an error when a user becomes disconnected due to changing their password on another device. We will now show the `sync-disconnected` error, which should direct the user to their sync settings where they can enter their new password/sign in again.
This patch also includes a test for this new error case, as well as some small changes to an existing test that started failing due to a slight mismatch between the UIState representation used in the test and the UIState we expect when a user logs out.
Differential Revision: https://phabricator.services.mozilla.com/D158043
* Rename fxaSignedIn to fxaSignedInAndSyncEnabled to better reflect what its doing
* Re-enable the test_sync_disconnected_error test case and add another
Differential Revision: https://phabricator.services.mozilla.com/D158201
* Show the error state when the Primary Password is locked and the user is signed-in
* Trigger a tab sync when the user clicks the "try again" button from the setup error step.
This will also result in an unlock prompt if the primary password is locked.
Differential Revision: https://phabricator.services.mozilla.com/D156360
* Show the error state when the Primary Password is locked and the user is signed-in
* Trigger a tab sync when the user clicks the "try again" button from the setup error step.
This will also result in an unlock prompt if the primary password is locked.
Differential Revision: https://phabricator.services.mozilla.com/D156360
* Remove the synced-tabs-not-ready state and instead make a waitingForTabs boolean the container can check when updating
* Refactor around the maybeUpdateUI so we either pass in a force-update param, or conditionally send
the notification if the state changes
* Observe 'services.sync.tabs.changed' instead of the pref which gets updated as a side-effect of a
tab sync
* Check recent tabs via SyncedTabs.jsm in TabsSetupFlowManager and queue up SyncedTabs.syncTabs() and refreshDevices() calls when the user signs in.
Differential Revision: https://phabricator.services.mozilla.com/D156997