Closed Bug 1901728 Opened 1 year ago Closed 1 year ago

Add a "Tabs from other devices" item to tab manager

Categories

(Firefox :: Tabbed Browser, enhancement)

enhancement

Tracking

()

VERIFIED FIXED
133 Branch
Tracking Status
relnote-firefox --- 133+
firefox133 --- fixed
firefox134 --- verified
firefox135 --- verified

People

(Reporter: evilpies, Assigned: evilpies)

References

(Blocks 1 open bug)

Details

Attachments

(2 files)

I think the tab manager would be a natural place to also access synced tabs (besides History > Synced Tabs and the hamburger menu). The tooltip already says "List all tabs".

I still like this idea, so I gave implementing it a try. It especially feels like a more logical places than the History menu to me.

Assignee: nobody → evilpies
Attached image screenshot.png

A screenshot that shows the menu. The menu item is only shown when sync is enabled.

Test builds with this change are available at:
https://treeherder.mozilla.org/jobs?repo=try&revision=ba6426ba392775e1a4ec3852ab27f5b231e2c17f

I agree that it makes some sense to have an entry point close to other tabs stuff. However, the sidebar team has intentions to replace the tab manager long-term, and Ania from Product has asked not to add new features to this, so that we don't train users into patterns that may become obsolete. With that in mind, how about opening the Synced tabs sidebar from this item rather than the synced tabs popup? I think that'd be a fine compromise.

Btw, the new sidebar appears to call this "Tabs from other devices" rather than "Synced tabs". Probably would make sense to be consistent with that new label.

Thank you, Dão. It's great to hear to you find this idea reasonable.

how about opening the Synced tabs sidebar from this item rather than the synced tabs popup?

That sounds fine to me. The sidebar might actually be a bit nicer to use!

Attachment #9420637 - Attachment description: WIP: Bug 1901728 - Add a "Synced tabs" item to the tab manager → WIP: Bug 1901728 - Add a "Tabs from other devices" item to the tab manager
Attachment #9420637 - Attachment description: WIP: Bug 1901728 - Add a "Tabs from other devices" item to the tab manager → Bug 1901728 - Add a "Tabs from other devices" item to the tab manager. r?dao
Summary: Add a "Synced Tabs" item to tab manager → Add a "Tabs from other devices" item to tab manager

I am not sure why, but the test fails on try. I think faking sync being enabled doesn't work correctly. Actually, maybe it wouldn't be too bad to show the "Tabs from other devices" item even with sync not yet enabled? We do the same with View > Sidebar at least.

Flags: needinfo?(dao+bmo)

Based on browser_urlbar_telemetry_remotetab.js I was going to suggest setting services.sync.syncedTabs.showRemoteTabs = true, but looks like that pref is mostly obsolete. So I'm not sure. Might be best to reach out to the Sync team.

I wouldn't necessarily be opposed to always showing this item, but have a slight preference for showing it only when logged in, if possible.

Flags: needinfo?(dao+bmo)

Hi, sync team! I am trying to test code that uses PlacesUIUtils.shouldShowTabsFromOtherComputersMenuitem. Using Services.prefs.setCharPref("services.sync.username", "someone@somewhere.com"); to simulate that sync is active seems to work locally, but not on try. Any ideas? (See also comment 7)

Flags: needinfo?(markh)
Flags: needinfo?(lina)

Hi Tom! I'd actually suggest mocking PlacesUIUtils.shouldShowTabsFromOtherComputersMenuitem, if you can—I think that might be easier than fiddling with the Sync service's state to trick it into thinking it's configured.

If you'd rather not mock, though, I wonder if manually setting Service.status—in addition to overriding services.sync.username—will do the trick. Something like:

const { STATUS_OK, CLIENT_NOT_CONFIGURED } = ChromeUtils.importESModule("resource://services-sync/constants.sys.mjs");
const { Status } = ChromeUtils.importESModule("resource://services-sync/status.sys.mjs");

Services.prefs.setStringPref("services.sync.username", "someone@somewhere.com"); // Don't forget to `clearUserPref` at the end of the test.
Status.service = STATUS_OK; // Don't forget to reset to `CLIENT_NOT_CONFIGURED` at the end of the test.

I'm worried that might have other side effects, though—if another part of the browser, or the Sync service itself, starts up, thinks it's configured, and tries to do a sync, for example. Sync service startup involves a combination of prefs and in-memory state that's all meant to be set together, and I'm not sure if setting just Status.service will confuse that process.

Thanks for reaching out!

Flags: needinfo?(markh)
Flags: needinfo?(lina)
Pushed by evilpies@gmail.com: https://hg.mozilla.org/integration/autoland/rev/72340909f0bd Add a "Tabs from other devices" item to the tab manager. r=dao,fluent-reviewers,tabbrowser-reviewers

Thank you Lina.

Status: NEW → RESOLVED
Closed: 1 year ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch

:evilpie could you consider nominating this for a release note? (Process info)

Flags: needinfo?(evilpies)

Release Note Request (optional, but appreciated)
[Why is this notable]: New menu item in the UI
[Affects Firefox for Android]: no
[Suggested wording]: It's now also possible to show tabs from other devices in the sidebar from the "List all tabs" menu (not sure if we call it that?)
[Links (documentation, blog post, etc)]:

relnote-firefox: --- → ?
Flags: needinfo?(evilpies)

Thanks, added to the Fx133 nightly release notes, please allow 30 minutes for the site to update.
Keeping the relnote-firefox flag as ? to keep it on the radar for inclusion in the final Fx133 release notes.

QA Whiteboard: [qa-133b-p2]
Blocks: 1931890

Added to the Fx133 release notes.
Available to preview on staging, please allow 30 minutes for the site to update.

Verified as fixed on Firefox Nightly 135.0a1 and Firefox 134.0b1 on Windows 10, Ubuntu 22, macOS 14.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-133b-p2]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: