Closed Bug 1785853 Opened 3 years ago Closed 3 years ago

Close the FxA tab opened by Fx-View when sign-in is complete

Categories

(Firefox :: Firefox View, enhancement, P2)

enhancement
Points:
5

Tracking

()

VERIFIED FIXED
107 Branch
Tracking Status
firefox107 --- verified
firefox108 --- verified

People

(Reporter: sfoster, Assigned: sclements)

References

(Blocks 1 open bug)

Details

(Whiteboard: [fidefe-2022-mr1-myfirefox] )

Attachments

(3 files)

Fx-View opens a tab to allow the user to sign-in/sign-up to FxA. When that process is complete and the user returns to Fx-View, we could close that tab for them if its still open.

Severity: -- → S3
Priority: -- → P2
Severity: S3 → --

Sam offered to check if we now automatically go back to fxview, and/or if we still need to do something to close the tab.

Flags: needinfo?(sfoster)

I do see the call to action button which correctly opens fx-view after both signing in and completing the pairing procedure with the mobile browser.

Provided the tab reference remains good, I think we should be able to keep that around when we open the tab to do the sync setup and close on re-entry into fx-view if the user has completed the setup.

We just need to be a little careful as I believe closing the last non-hidden tab in a window will also result in the window closing. And if that's the last window, the browser itself will quit! Maybe we should open an about:newtab tab if that's the case?

Flags: needinfo?(sfoster)

(In reply to Sam Foster [:sfoster] (he/him) from comment #2)

Created attachment 9292708 [details]
Screenshot 2022-09-01 at 11-32-35 Device connected.png

I do see the call to action button which correctly opens fx-view after both signing in and completing the pairing procedure with the mobile browser.

I'm gonna ping Josh here as he said he still saw an issue so I'd like to just confirm that he's seeing the same thing (or if not, get to the bottom of why not). Josh: you should get a screen similar to the screenshot from Sam and clicking the button should switch tabs to Firefox View (though the tab where you signed in will stay open). Can you let us know if that matches what you're seeing?

Provided the tab reference remains good, I think we should be able to keep that around when we open the tab to do the sync setup and close on re-entry into fx-view if the user has completed the setup.

Yep, that sounds good.

We just need to be a little careful as I believe closing the last non-hidden tab in a window will also result in the window closing. And if that's the last window, the browser itself will quit! Maybe we should open an about:newtab tab if that's the case?

I think opening a new tab instead in that case sounds right, yes.

Flags: needinfo?(jberman)

This is what's happening for me when I go through sign in.

Flags: needinfo?(jberman)

I did this again following Ray's instructions. It does work when you pair your mobile device. It redirects to Fx View

Assignee: nobody → sclements
Status: NEW → ASSIGNED
  • Add _closeDeviceConnectedTab to FirefoxViewHandler that's called by the TabSelect event handler
  • Add test coverage
Pushed by sclements@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/d91a621a39be Close device connected tab after user returns to Firefox View r=sfoster
Flags: needinfo?(sclements)
Points: --- → 5
Pushed by sclements@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/9b1e2e6ceb70 Close device connected tab after user returns to Firefox View r=sfoster

Backed out for causing mochitest failures on browser_setup_state.js

Backout link

Push with failures

Failure log

Flags: needinfo?(sclements)
Flags: needinfo?(sclements)
Pushed by sclements@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/805306a553fb Close device connected tab after user returns to Firefox View r=sfoster
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 107 Branch
QA Whiteboard: [qa-107b-p2]

This issue is Verified as fixed in our latest Nightly build as well as our latest Beta 107.0b5.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: