Add Lightning to the "Whats New" page

RESOLVED FIXED

Status

www.mozilla.org Graveyard
Thunderbird
RESOLVED FIXED
8 years ago
2 months ago

People

(Reporter: Fallen, Assigned: Fallen)

Tracking

Details

Attachments

(2 attachments, 3 obsolete attachments)

Back in April David told me it would be possible to show Lightning part of Thunderbird's "Whats New" page.

I'll post a nice text soon, I just wanted to get this bug open so any needed preparations can be made.
So here's my draft of the Text, let me know what you think:


Personal Calendar

With help of the Lightning Add-on, you can now organize your appointments and tasks from within Thunderbird. Aside from storing your calendar on this computer, you can also subscribe to network calendars so you don't miss a minute, even on the go.

Click <here> to install Lightning now and get organized today.



Regarding the <here> link, we probably need to do some platform detection to cause the right file to be downloaded. Not sure on what level this should happen (reading the user agent via js or php directly on the whats new page, or maybe some redirection service?)
Also, should we be linking to releases.mozilla.org, or to AMO?
Created attachment 452554 [details] [diff] [review]
Fix - v1

While this patch doesn't fully do what it is supposed to (and I couldn't test on win32/mac yet), I'd like some feedback since there's not much time left.

The problem seems to be, that links in Thunderbird's "Whats new" tab are always opened in the browser, which means this patch won't work. Is there some way to have the link target opened in the tab instead, without patching Thunderbird?

If not, I can attach a patch that just links to AMO's entry page instead, or we postpone this until the next release.
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #452554 - Flags: review?(bugzilla)

Updated

8 years ago
OS: Linux → All
Hardware: x86 → All
I'm not sure web pages can open tabs in Thunderbird. A MDC document only talks about extensions:
https://developer.mozilla.org/en/Thunderbird/Content_Tabs

(In reply to comment #3)
> If not, I can attach a patch that just links to AMO's entry page instead, or we
> postpone this until the next release.

Or just say "How to install: Choose Add-ons from Tools menu, then search and add Lightning" ?
(In reply to comment #4)
> I'm not sure web pages can open tabs in Thunderbird. A MDC document only talks
> about extensions:
> https://developer.mozilla.org/en/Thunderbird/Content_Tabs
I rather meant that the extension install dialog shows up instantly, not a new tab opening.


> Or just say "How to install: Choose Add-ons from Tools menu, then search and
> add Lightning" ?
That would be fine with me too, but I obviously prefer the former solution, especially since we can only place Lightning in the "whats new" section once.
According to <https://developer.mozilla.org/en/Thunderbird/Content_Tabs#Installation_of_add-ons>, it should be possible to install extensions directly from content tabs. This seems not to be the case for the whats new page?
Oh, JavaScript is enabled in tabs. I just tested and confirmed this worked:

<p><button onclick="InstallTrigger.install({ 'Lightning': { URL: '<?=$lightningUrl?>', IconURL: 'https://addons.mozilla.org/media//img/amo2009/icons/default-addon.png' }});">Install the Lightning add-on</button></p>

instead of 

<p>Click <a href="<?=$lightningUrl?>" <?=$target?>>here</a> to install Lightning now and get organized today.</p>
Created attachment 452574 [details] [diff] [review]
Fix - v2
Attachment #452554 - Attachment is obsolete: true
Attachment #452574 - Flags: review?(bugzilla)
Attachment #452554 - Flags: review?(bugzilla)
Created attachment 452605 [details] [diff] [review]
Fix - v2b

Nice, thanks for the patch! If from a UI perspective a link fits better into the whats new page, this patch takes care. Leaving review on the original patch though.
Thunderbird 3.1's Migration Assistant uses buttons for add-on installation: "Install Compact Header…" and "Install Extra Columns…". So a button "Install Lightning…" may be good, I think.
Attachment #452574 - Flags: review?(bugzilla) → review-
Comment on attachment 452574 [details] [diff] [review]
Fix - v2

The decision on the text and button is up to Rafael.

>+$osmap = array('Linux i686' => 'linux-i686',
>+               'Linux x86_64' => 'contrib/linux-x86_64',
>+               'Windows;' => 'win32',
>+               '(Mac_PowerPC)|(Macintosh)' => 'mac');

I think we need to think slightly differently here - if it is a platform we don't support Lightning on, then I think we shouldn't be displaying the text at all. There's no point in saying "Hey look you can get a calendar" for them only to visit the page and sigh, "oh but not for my platform".

Sancus may have better ways of implementing this as well.

I'd also query if 64-bit Linux really falls under that category (i.e. is that official/supported or not).

>+if ($subPath) {
>+    /* If we detected the user agent correctly, then use it */
>+    $lightningUrl = "http://releases.mozilla.org/pub/mozilla.org/calendar/lightning/releases/1.0b2rc2/$subPath/lightning.xpi";

Sorry, but I don't like this either. This should be pointing to a final location (alright I know 1.0b2 isn't out yet, but neither are these pages) - but I'd far prefer it to point to addons.mozilla.org.

So doing something such as:

https://addons.mozilla.org/downloads/latest/9716/addon-9716-latest.xpi?src=external-tbcom

probably means that if you have to update 1.0b2 after release, you don't need to change the web page as well, but it'll also give you stats on amo as to where the extra downloads have been coming from.

>+<p><strong>Personal Calendar</strong></p>
>+<p>With help of the Lightning Add-on, you can now organize your appointments and tasks from within Thunderbird. Aside from storing your calendar on this computer, you can also subscribe to network calendars so you don't miss a minute, even on the go.</p>
>+<p><button onclick="<?=$lightningScript?>">Install the Lightning add-on</button></p>

Like I said earlier, Rafael's got the final call on this, however, my suggestions would be:

- Have a separate frame/block to the right of the current What's new text
- include a small screenshot
- include a button that is similar to the install extension button that you see on AMO
(Assignee)

Updated

8 years ago
Attachment #452605 - Attachment is obsolete: true
(In reply to comment #11)

> - Have a separate frame/block to the right of the current What's new text
> - include a small screenshot
> - include a button that is similar to the install extension button that you see
> on AMO

I like your suggestion, but I'd appreciate some help with styling the button. I'll upload a new patch/screenshot to be extended soon.

> I think we need to think slightly differently here - if it is a platform we
> don't support Lightning on, then I think we shouldn't be displaying the text at
> all. There's no point in saying "Hey look you can get a calendar" for them only
> to visit the page and sigh, "oh but not for my platform".

What about showing the text, but instead of the install button show a text like:

"A supported version of Lightning is currently not available for your platform, but there may be a <a href="#1">contributed version</a>"

Where #1 is something like the following, but for 1.0b2:
http://www.mozilla.org/projects/calendar/releases/lightning1.0b1.html#contributedbuilds
Created attachment 453317 [details]
Screenshot - v1
Created attachment 453319 [details] [diff] [review]
Fix - v3

Here's a patch that takes care of some of the review comments, and implements my suggestion from the previous comment.

The screenshot image obviously needs to be replaced by something more up to date and not directly from the AMO page. Also, as mentioned, the button needs to be styled a bit.
Attachment #452574 - Attachment is obsolete: true
(In reply to comment #11)
> - Have a separate frame/block to the right of the current What's new text
> - include a small screenshot
btw, I tried placing the image to the right, but I had the feeling it looked quite lost, especially on a large screen.
Comment on attachment 453319 [details] [diff] [review]
Fix - v3

Mark, mind taking a first look at this? I assume this needs to be in today?
Attachment #453319 - Flags: review?(bugzilla)
Comment on attachment 453319 [details] [diff] [review]
Fix - v3

I'm not sure I like the inline style of this, if we're going to promo Lightning we should put it in its own area.

However, I think to do that we're going to need to rework the rest of the page. So this is probably the best possible in a short time.

Therefore passing review to sancus as he was wanting to look at the php side.
Attachment #453319 - Flags: review?(bugzilla) → review?(sancus)
Comment on attachment 453319 [details] [diff] [review]
Fix - v3

This is in r69450, I moved the php logic out into an include.. which is probably not the ideal place for it, but it's better than just sitting inline in the file.
Attachment #453319 - Flags: review?(sancus) → review+
This happened, so I believe this is fixed.
Status: ASSIGNED → RESOLVED
Last Resolved: 8 years ago
Resolution: --- → FIXED
Product: Websites → www.mozilla.org

Updated

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