Closed
Bug 763171
Opened 12 years ago
Closed 12 years ago
Display received tabs
Categories
(Firefox :: Sync, defect)
Firefox
Sync
Tracking
()
RESOLVED
FIXED
mozilla16
People
(Reporter: gps, Assigned: gps)
References
(Blocks 1 open bug)
Details
(Whiteboard: [str in comment 7])
Attachments
(2 files, 2 obsolete files)
2.12 KB,
patch
|
rnewman
:
review+
|
Details | Diff | Splinter Review |
5.95 KB,
patch
|
Gavin
:
review+
|
Details | Diff | Splinter Review |
Android Sync landed support for a "send tab to device" feature. It is still missing features we had originally targeted, but is better than nothing. I think it is silly for Android to have this feature but not desktop, especially since a real use case is "I want to view this on a larger screen." I think we should implement support for displaying received tabs. Sending tabs we can leave out for now. Or, we can possibly get that in for Firefox 16 as well. Either way, the sending support is tracked in bug 677372 (or somewhere else in the bug 507471 umbrella). Receiving support is very simple. More importantly, it doesn't involve any UX (correct, rnewman?).
Comment 1•12 years ago
|
||
Can this not already be done? I've been sending tabs between devices using https://addons.mozilla.org/en-US/firefox/addon/send-tab-to-device/ for a while.
Assignee | ||
Comment 2•12 years ago
|
||
(In reply to Paul [sabret00the] from comment #1) > Can this not already be done? I've been sending tabs between devices using > https://addons.mozilla.org/en-US/firefox/addon/send-tab-to-device/ for a > while. Yes, the core Sync API supports the "open tab" command. But, it isn't hooked up to anything in the Firefox core. The add-on you mentioned simply provides that plumbing. IMO it is silly for this feature to just work on Android but require an add-on on desktop. So, the proposal is to "uplift" the receiving/display tab to Firefox core.
Comment 3•12 years ago
|
||
(In reply to Paul [sabret00the] from comment #1) > Can this not already be done? I've been sending tabs between devices using > https://addons.mozilla.org/en-US/firefox/addon/send-tab-to-device/ for a > while. Y'know Greg wrote that addon, right? (In reply to Gregory Szorc [:gps] from comment #2) > So, the proposal is to "uplift" the > receiving/display tab to Firefox core. Seems reasonable to me. We can tweak behavior later, but having *something* work is important. Marking this as blocking Bug 740193, just to capture the usage dependency.
Blocks: 740193
Comment 4•12 years ago
|
||
(In reply to Richard Newman [:rnewman] from comment #3) > Y'know Greg wrote that addon, right? I totally missed that. D'oh!
Assignee | ||
Comment 5•12 years ago
|
||
This gets the job done. Do we not have mochitests covering the UI aspects of Sync? If so, where are they? If we don't, I should probably at least get TPS coverage.
Comment 6•12 years ago
|
||
Comment on attachment 632867 [details] [diff] [review] Open tab for received URIs Review of attachment 632867 [details] [diff] [review]: ----------------------------------------------------------------- r+ with safety question addressed. ::: browser/base/content/browser-syncui.js @@ +404,5 @@ > + if (!gBrowser) { > + return; > + } > + > + gBrowser.addTab(data.wrappedJSObject.object.uri); Are you confident in the safety of this? This is going to bomb if `data` isn't a wrapped object… I'd be inclined to code defensively here, because you're just passing through the body of an observer notification.
Attachment #632867 -
Flags: review?(rnewman) → review+
Assignee | ||
Comment 7•12 years ago
|
||
https://hg.mozilla.org/services/services-central/rev/61aec3b7bae5 Added a try..catch with a Cu.reportError, just in case. I'll file a follow-up to figure out automated test coverage. For now, QA can verify by sending a tab with Fennec. Desktop should open it on the next sync. There is no way to send tabs from desktop yet. I'll also need to update my "Send Tab to Device" extension on AMO so it detects Firefox 16 and doesn't perform a redundant tab open.
Whiteboard: [fixed in services]
Target Milestone: --- → mozilla16
Updated•12 years ago
|
Whiteboard: [fixed in services] → [fixed in services][str in comment 7][qa+]
Comment 8•12 years ago
|
||
I can verify this works on Mac. But on Win XP, the sent tab is not displayed.
Comment 9•12 years ago
|
||
nix last comment about Windows. I had the wrong build. Got the correct s-c build and this works.
Whiteboard: [fixed in services][str in comment 7][qa+] → [verified in services][str in comment 7][qa+]
Assignee | ||
Comment 10•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/61aec3b7bae5
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Whiteboard: [verified in services][str in comment 7][qa+] → [str in comment 7][qa+]
Comment 11•12 years ago
|
||
Neil points out on IRC that this code seems to run in every window. So if you have multiple windows open, the sent tab will open in all of them. Was that tested?
Assignee | ||
Comment 12•12 years ago
|
||
(In reply to :Gavin Sharp (use gavin@gavinsharp.com for email) from comment #11) > Neil points out on IRC that this code seems to run in every window. So if > you have multiple windows open, the sent tab will open in all of them. Was > that tested? Probably not. Will submit follow-up patch for Firefox 16.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 13•12 years ago
|
||
This patch moves the logic for displaying received tabs to nsBrowserGlue.js. I've tested this with multiple windows open and confirmed that the tab is only opened in 1 window now.
Attachment #637702 -
Flags: review?(gavin.sharp)
Comment 14•12 years ago
|
||
Comment on attachment 637702 [details] [diff] [review] Part 2: Move display URI logic to nsBrowserGlue Review of attachment 637702 [details] [diff] [review]: ----------------------------------------------------------------- Looks sane to me.
Comment 15•12 years ago
|
||
Comment on attachment 637702 [details] [diff] [review] Part 2: Move display URI logic to nsBrowserGlue >+ _onDisplaySyncURI: function _onDisplaySyncURI(data) { >+ let browser = this.getMostRecentBrowserWindow().gBrowser; gBrowser is more accurately referred to as "tabbrowser" (using "browser" is an unfortunate mistake much of our existing code makes - it's confusing because a tabbrowser contains several browsers). >+ if (!browser) { You can safely assume this will never happen (getMostRecentBrowserWindow() won't return closed windows). >+ try { >+ browser.addTab(data.wrappedJSObject.object.uri); Should the tab be selected? I'm not really familiar with the desired UX for this feature. It might be simpler to just use this.getMostRecentBrowserWindow().browserDOMWindow.openURI(makeURI(url), null, Ci.nsIBrowserDOMWindow.OPEN_NEWTAB, 0);, which should obey the tab prefs that affect external link openings.
Assignee | ||
Comment 16•12 years ago
|
||
I addressed Gavin's feedback. I also answered Gavin's questions as code comments. Comments are good.
Attachment #637702 -
Attachment is obsolete: true
Attachment #637702 -
Flags: review?(gavin.sharp)
Attachment #637938 -
Flags: review?(gavin.sharp)
Assignee | ||
Comment 17•12 years ago
|
||
Forgot a qref. Sorry for the bugspam.
Attachment #637938 -
Attachment is obsolete: true
Attachment #637938 -
Flags: review?(gavin.sharp)
Attachment #637939 -
Flags: review?(gavin.sharp)
Comment 18•12 years ago
|
||
Comment on attachment 637939 [details] [diff] [review] Part 2: Move display URI logic to nsBrowserGlue, v3 Seems like we could test (part of) this with a browser-chrome test that just fires off the notification and checks the results. I assume you've tested the real-life functionality end-to-end, because I haven't!
Attachment #637939 -
Flags: review?(gavin.sharp) → review+
Assignee | ||
Comment 19•12 years ago
|
||
https://hg.mozilla.org/services/services-central/rev/9d0bf5dddfc4 Wiping qa+ whiteboard because this needs reverified. I've tested this real-life functionality end-to-end. Bug 767663 is on file to implement automated tests. I've never done a mochitest before (shocking, I know). I guess now I get to learn!
Status: REOPENED → ASSIGNED
Whiteboard: [str in comment 7][qa+] → [str in comment 7][fixed in services]
Comment 20•12 years ago
|
||
looks good on s-c build from this morning. Sharing tab via Fx Sync then shows the tab only in the current desktop window. Pushed tab also doesn't steal focus, as expected.
Whiteboard: [str in comment 7][fixed in services] → [str in comment 7][verified in services]
Assignee | ||
Comment 21•12 years ago
|
||
https://hg.mozilla.org/mozilla-central/rev/9d0bf5dddfc4
Status: ASSIGNED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Whiteboard: [str in comment 7][verified in services] → [str in comment 7]
Updated•6 years ago
|
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in
before you can comment on or make changes to this bug.
Description
•