Closed Bug 487072 Opened 12 years ago Closed 12 years ago

View Gallery doesn't work on Thunderbird

Categories

(Mozilla Labs Graveyard :: Personas Plus, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: myk, Assigned: standard8)

References

Details

Attachments

(1 file, 2 obsolete files)

Attached image screenshot showing problem (obsolete) —
The View Gallery menuitem doesn't do anything on Thunderbird.  It should open up the gallery in a new Thunderbird tab.
Comment on attachment 371276 [details]
screenshot showing problem

This screenshot was for a different bug.
Attachment #371276 - Attachment is obsolete: true
Depends on: 374578
Now that we've fixed the content policy in TB, yaoquan was talking to me about this on irc yesterday about possible solutions. 

I think the way both Firefox (controlling opening in new tab/window) and Thunderbrowse (extension within TB), is to override the onclick handler of the browser (or iframe) element. Thunderbrowse does this by overriding the contentAreaClick function.

It would seem that we could do something very similar here. specialTabs.js would be a good starting point:

http://mxr.mozilla.org/comm-central/source/mail/base/content/specialTabs.js?rev=eefe315765e2#60

This is a content tab (as I think yaoquan has already found), and we'd just need to extent it to handle "onclick". For a proof of concept version, the onclick function could just redirect any clicks to loadURI on the browser/iframe element.

If you don't want to try hacking core, then just create a new version of contentTabType within personas for now - just register and open the tab as seen in specialTabs.js.

I'm quite happy for something to be integrated into core Thunderbird if it makes sense. Trying out the idea first would be useful though.
I just checked in a partial fix in changeset http://hg.mozilla.org/labs/personas/rev/e3439080b349.  It causes the gallery to open in a new tab.  However, clicking on links in the gallery doesn't load the links in the tab.  We'd need to do something like what Mark suggests in comment 2 to fix that.  Leaving this bug open pending that part of the fix.
This bug probably now really depends on bug 516776.
Depends on: 516776
Attached patch Possible fix (obsolete) — Splinter Review
If the currently proposed patches on bug 516776 go through, then this is the patch for getting the personas extension to work in Thunderbird 3.

It basically adds an onclick handler which allows anything within the personas site to be loaded within the content tab in Thunderbird, but anything outside the personas base site will be redirected to the browser. Search functionality works, and I believe the login functionality will work.

There will be links to try builds posted on bug 516776 once they are complete and there is a test extension with this patch included on the attachments on that bug.
Attached patch The fixSplinter Review
This should fix the content tabs and work with the patch that's just gone in for Thunderbird.

Most of the changes in that diff are whitespace - my emacs automatically trims trailing whitespace in files.

I've also updated the min version for Thunderbird (though you may want to update the max as well). The content tab api should work with b4 (although you won't be able to browse), and once the next nightly is picked up browsing should be enabled.
Assignee: cbeard → bugzilla
Attachment #410246 - Attachment is obsolete: true
Status: NEW → ASSIGNED
> This should fix the content tabs and work with the patch that's just gone in
> for Thunderbird.

This looks good. I've applied the changes by hand in changeset http://hg.mozilla.org/labs/personas/rev/46683215bda7.

Normally I'd take the whole change, including the whitespace fixes, which are very welcome, but in this case one of the whitespace fixes is in a portion of code that is being changed in another patch for a 1.4 blocker, and I want to minimize conflicts.

I imported the change to the 1.4 branch in changeset http://hg.mozilla.org/labs/personas/rev/2c226b9a603f so it makes it into the upcoming 1.4 release.


> I've also updated the min version for Thunderbird (though you may want to
> update the max as well).

Yup, I updated the max version to 3.0.* a couple days ago.


Thanks for the fix!
Status: ASSIGNED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Product: Mozilla Labs → Mozilla Labs Graveyard
You need to log in before you can comment on or make changes to this bug.