Detect Thunderbird navigation on amo website and allow installation of add-ons directly from web page.

RESOLVED INCOMPLETE

Status

addons.mozilla.org Graveyard
Public Pages
P3
normal
RESOLVED INCOMPLETE
8 years ago
2 years ago

People

(Reporter: standard8, Unassigned)

Tracking

(Blocks: 1 bug)

unspecified
4.x (triaged)

Details

(Whiteboard: [tbtrunkneeds][remora+z], URL)

(Reporter)

Description

8 years ago
Now that Thunderbird 3 has content tabs, the Thunderbird team is looking at closer integration of the add-on manager and AMO within Thunderbird.

Currently, for Thunderbird add-ons, AMO always forces download, saving of add-ons with a description of how to install.

For the new integration, we'd like AMO to detect the user-agent and if it is a Thunderbird related one, then allow the installation in the same way as Firefox.

Current user agent examples for Thunderbird:

Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.2pre) Gecko/20100120 Lightning/1.1a1pre Lanikai/3.1a1
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-GB; rv:1.9.1.7) Gecko/20100111 Thunderbird/3.0.1
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.3a1pre) Gecko/20100127 Lightning/1.1a1pre Shredder/3.2a1pre
(Reporter)

Updated

8 years ago
Blocks: 517498
Could an AMO dev comment on how much work this is likely to be and what possible release vehicles it might fit into?  If we could get this sooner rather than later (ie for Thunderbird 3), it would make the Tb platform story significantly more compelling...
Alternatively, if someone can point us to the right part of the source tree, I can try and hire someone to get this done.
where "this" would be a patch for review, obviously.
Adding the Thunderbird user agents and a new string for "Add to Thunderbird" should be easy to do. When I talked with Mark in person about this I was under the impression it was a ways off, but if it's already ready on your site, we can throw this in with our next release (launch targeted for March 16)
Priority: -- → P3
Target Milestone: --- → 5.8
We hope to have bug 526733 landed for 3.1b1, which will ship March 9, if all goes well.  Having this in the March 16th AMO release would be tremendously helpful; thanks!

Updated

8 years ago
Whiteboard: [tb31needs]
Whiteboard: [tb31needs] → [tb31needs][remora+z]
Assignee: nobody → clouserw
(Reporter)

Comment 6

8 years ago
To help with testing this, there's a WIP extension that changes the add-on manager so that links get opened in new tabs, it can be got from:

http://hg.mozilla.org/users/bugzilla_standard8.plus.com/extensions/file/default

It should work in 3.0 to 3.1b1pre which covers the Shredder, Thunderbird and Lanikai brandings.

It may work with the amo staging urls straight off, but if you need help testing, just ping me.
This is not a simple addition to a regex.  Our entire site is based off everything at /thunderbird/ in the URL is not a "Browser App" so it gets download buttons, download instructions, .xpi's served as attachments, etc.  I could make it a "Browser App" but then the old versions of thunderbird will see Install buttons instead of Download.

So, any changes here (flipping to "browser app" or trying to support two versions of TB) is a substantial change and not one I want to keep messing with.  Using our history of bugs as a guide, the install buttons are some of the most complicated code on the site, filled with corner cases.

My question is:  do you need old versions of TB to continue to have the "Download now" button?  The more I look at it the more I don't think we can just "throw this in with our next release."
Can we figure out how many people are browsing the site with tb3?  Or how many tb3 vs. tb2 add-ons are getting downloaded?
(Reporter)

Comment 9

8 years ago
(In reply to comment #7)
> My question is:  do you need old versions of TB to continue to have the
> "Download now" button?  The more I look at it the more I don't think we can
> just "throw this in with our next release."

I'm not sure what old versions of TB would do, off-hand. They'd certainly have to have Thunderbrowse installed, but I'm not sure that's a case we really need to support.

What I think we do want to be careful of is the Thunderbird versus Browser viewing. Although Thunderbird will have the capability to view in-app, many people and links will still lead users to amo via their web browser and end up in /thunderbird/ urls.
What Mark said.

Also:

One of the primary purposes of Tb 3.1 is to provide a landing pad for a prompted major update for users of Tb2 and Tb3.0.x.  So our two high priority needs are, in order

* keeping "download now" working for 3.0 until after we offer the major update to 3.1 (presumably some number of weeks after 3.1 ships)
* getting direct add-on install experience for 3.1 after it ships
* everything else

Does that help?
I think the fastest way to get this implemented would be to load some JS on /thunderbird/ pages that does the detection and, if install buttons are present, changes them.  I'm not sure if code modification would need to happen for the xpi headers (install vs. attachment).

That said, our code freeze is on the 16th and I don't think I can get this done before then so I'll give it to nobody, I'm happy to accept patches.
Assignee: clouserw → nobody
(Reporter)

Comment 12

8 years ago
(In reply to comment #11)
> I think the fastest way to get this implemented would be to load some JS on
> /thunderbird/ pages that does the detection and, if install buttons are
> present, changes them.  I'm not sure if code modification would need to happen
> for the xpi headers (install vs. attachment).

One thing we did notice today was that we could affect that difference by using a different url, i.e.

https://addons.mozilla.org/en-US/thunderbird/downloads/latest/13564/addon-13564-latest.xpi

versus

https://addons.mozilla.org/downloads/latest/13564/addon-13564-latest.xpi

> That said, our code freeze is on the 16th and I don't think I can get this done
> before then so I'll give it to nobody, I'm happy to accept patches.

As I have no idea about amo development, and others who are likely to try and pick this up are not necessarily going to know, where are the source files and are there any useful docs about it?

Also when is the next release after the 16th?
There aren't docs specifically for this.  The code is at svn.mozilla.org/addons/trunk/site/app.  To include the JS will be something like "if (APP_ID == APP_THUNDERBIRD)" in views/layouts/amo2009.thtml.  JS is in webroot/js/ and jquery is available on the pages.

Our next code freeze after the 16th will probably be early to mid April.
(In reply to comment #12)
>
> One thing we did notice today was that we could affect that difference by using
> a different url, i.e.
> 
> https://addons.mozilla.org/en-US/thunderbird/downloads/latest/13564/addon-13564-latest.xpi
> 
> versus
> 
> https://addons.mozilla.org/downloads/latest/13564/addon-13564-latest.xpi

Mark, am I understanding correctly that we could just use it as is without needing any AMO change at all?  If so, is there any reason we shouldn't just go that route (one reason I could imagine would be if Wil knows that that second URL form is likely to become unsupported over time)?
The only reason it works is that Firefox is our default and it is set to install instead of download.  I wouldn't depend on that URL forever in case we get some real detection set up instead of just falling back to the default.

In the case of this patch though, it would work, since this code will be replaced within a couple months anyway (by zamboni).
Target Milestone: 5.8 → 5.9
Does Thunderbird have InstallTrigger?  When I call it from my test page inside Thunderbird, I get a new tab opening in Firefox.
(Reporter)

Comment 17

8 years ago
(In reply to comment #16)
> Does Thunderbird have InstallTrigger?  When I call it from my test page inside
> Thunderbird, I get a new tab opening in Firefox.

Depending on how you're loading the page will affect what you're doing.

If you're loading the page in a content tab, then you need to include a siteClickHandler which will allow the page to "navigate" to the add-on installation location.

More details here: https://developer.mozilla.org/en/Thunderbird/Content_Tabs

or you could try using the extension I referenced above, though you may need to change some of its urls.
I was trying to use ThunderBrowse to navigate, but the add-on was hijacking all link clicks without obeying event bubbling.  Now I'm loading my test page as the Start Page.

Can I assume that when we fix AMO, you guys will be handling the Content Tab stuff and everything will just work?
(Reporter)

Comment 19

8 years ago
(In reply to comment #18)
> I was trying to use ThunderBrowse to navigate, but the add-on was hijacking all
> link clicks without obeying event bubbling.  Now I'm loading my test page as
> the Start Page.

As, that might work, the alternative for getting a content tab would be to evaluate something like:

Components.classes['@mozilla.org/appshell/window-mediator;1'].getService(Components.interfaces.nsIWindowMediator).getMostRecentWindow("mail:3pane").document.getElementById("tabmail").openTab("contentTab", {contentPage: "http://www.google.co.uk/", clickHandler: "specialTabs.siteClickHandler(event, new RegExp('http'));"});

in the error console

> Can I assume that when we fix AMO, you guys will be handling the Content Tab
> stuff and everything will just work?

Yes. Obviously giving us a bit of time to test it on the preview site would be useful though.
When is the final release of TB 3.1?  We're trying to come up with a schedule and are considering if this can only be done in zamboni instead of zamboni + remora.
Wil, RC1 is currently scheduled to ship in early May.  However, we've slipped our beta2 schedule in a somewhat fuzzy way, so it could be later than that.
I can relate.  We're trying to get all public pages converted to our new system ASAP, so I'm going to try to avoid spending time to do this on the old one.  It sounds like jbalogh already has thought about it in the new one.  I'd like to have add-on detail pages out next release, and category pages and search results will follow.
Target Milestone: 5.9 → 4.x (triaged)
Add to Thunderbird -> http://grab.by/3kC9

The test page is https://preview.addons.mozilla.org/z/en-US/thunderbird/addons/smorgasbord

Setting that as my Start Page still shows the bubbling issue from comment 18.
(Reporter)

Comment 24

8 years ago
(In reply to comment #23)
> Add to Thunderbird -> http://grab.by/3kC9
> 
> The test page is
> https://preview.addons.mozilla.org/z/en-US/thunderbird/addons/smorgasbord

That's looking good. I used the amo extension that I'd mentioned in comment 6:

http://hg.mozilla.org/users/bugzilla_standard8.plus.com/extensions/file/default

it gives you an option in the tools menu: "Open TB" where you can enter the url (obviously I entered the preview url) and get a content tab open.

Using this the page seems to work reasonably well. I would note that about half way down, the "Add to Thunderbird" options switch to "Download", so something doesn't quite work right there.

> Setting that as my Start Page still shows the bubbling issue from comment 18.

Yes, I'm not sure yet if we'll "fix" the start page at all, as that brings in some complications. The extension above does show it working though (note it also overlays the options in the add-on manager to open in content tabs, but they will open the current amo site rather than the preview one).
(In reply to comment #21)
> Wil, RC1 is currently scheduled to ship in early May.  However, we've slipped
> our beta2 schedule in a somewhat fuzzy way, so it could be later than that.

To support thunderbird buttons, we need add-on detail, category landing/listing, and search results pages.  And the homepage.  Anything else?

These are all close to being done.  We might not be comfortable pushing it out to all of AMO, but I bet we can support /thunderbird on zamboni when it's time.
(In reply to comment #25)
> (In reply to comment #21)
> > Wil, RC1 is currently scheduled to ship in early May.  However, we've slipped
> > our beta2 schedule in a somewhat fuzzy way, so it could be later than that.
> 
> To support thunderbird buttons, we need add-on detail, category
> landing/listing, and search results pages.  And the homepage.  Anything else?

buttons are also on the old versions pages, EULA pages, contributions roadblocks, add-on developer pages, add-on "about" pages, collections?, and the user's info page.
(Reporter)

Comment 27

8 years ago
(In reply to comment #26)
> (In reply to comment #25)
> > (In reply to comment #21)
> > > Wil, RC1 is currently scheduled to ship in early May.  However, we've slipped
> > > our beta2 schedule in a somewhat fuzzy way, so it could be later than that.
> > 
> > To support thunderbird buttons, we need add-on detail, category
> > landing/listing, and search results pages.  And the homepage.  Anything else?
> 
> buttons are also on the old versions pages, EULA pages, contributions
> roadblocks, add-on developer pages, add-on "about" pages, collections?, and the
> user's info page.

Basically any button on the amo website that would allow installing, with the changes, users will be able to browse AMO from with Thunderbird, hence any page they can get to they may want to be able to log in to.
If we have a reasonable list of pages to hit, it should be fairly easy to add a MozMill test for this, I believe.
Jeff/Wil, any chance you'd be able to have it deployed for Thunderbird this month so that we have time to test and react to any issues once it hits production?
We won't have it for all pages with buttons on them.  I'd like to see it on the home page and add-on detail pages next release though.
We've reached the "painful cuts" part of the development cycle, and we've come to the conclusion that as much as we really want to have better add-on install experience in 3.1 (bug 517948, which is what this bug is blocking), if it were the last bug standing, we wouldn't hold the release for it.  Adjusting the whiteboard appropriately.  :-(
Whiteboard: [tb31needs][remora+z] → [tb32needs][remora+z]
(Reporter)

Comment 32

8 years ago
(In reply to comment #31)
> if it were the last bug standing, we wouldn't hold the release for it.  

Note, that even if we don't get it included in this release, we're still hoping to release an extension that will do the same thing for 3.1, and then we can integrate it fully in the next version after 3.1.
(Reporter)

Updated

7 years ago
Whiteboard: [tb32needs][remora+z] → [tbtrunkneeds][remora+z]
Is Thunderbird ready for this to land?  That is, do we need to install extensions and stuff to test this or are there clear steps to produce the result you want?  Also, can someone from the Thunderbird team summarize, very specifically, what they want from this bug?  I'm thinking something like:

If someone visits AMO with a User Agent of _______________ the appropriate buttons should say "Add to Thunderbird" and fire an InstallTrigger() event when clicked.
Calling this incomplete from comment 33.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → INCOMPLETE

Comment 35

7 years ago
For the reference, here are some example User Agent strings of Thunderbird:

RELEASE:
Mozilla/5.0 (Windows; U; Windows NT 6.1; lt; rv:1.9.2.4) Gecko/20100608 Thunderbird/3.1

BRANCH NIGHTLY:
Mozilla/5.0 (Windows; U; Windows NT 6.1; lt; rv:1.9.2.11pre) Gecko/20100921 Lanikai/3.1.5pre

TRUNK NIGHTLY:
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b7pre) Gecko/20100915 Thunderbird/3.3a1pre
(Assignee)

Updated

2 years ago
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.