Add-ons Blog

Add-ons Update – Week of 2013/03/13

I post these updates every 3 weeks to inform add-on developers about the status of the review queues, add-on compatibility, and other happenings in the add-ons world.

The Review Queues

  • Most nominations for full review are taking less than 3 weeks to review.
  • Most updates are being reviewed within 3 weeks.
  • Most preliminary reviews are being reviewed within 2 weeks.

These stats are taken from the last queue report:

  • 63 nominations in the queue awaiting review.
  • 61 updates in the queue awaiting review.
  • 60 preliminary review submissions in the queue awaiting review.

Our new reviewer incentives program has become a great motivator for our review team. If you’re an add-on developer, please consider joining us. Add-on reviewers get invited to Mozilla events and earn cool gear with their work. Visit our wiki page for more information.

Firefox 20 Compatibility

The compatibility blog post for Firefox 20 should be posted next week. The compatibility bump will be run shortly before release.

Jetpack Project: weekly update for March 05, 2013

Project News

  • The entire developer tools team ( including the Jetpack team! ) will be meeting up in California next week to work together and hack on new ideas. As such, there will be no weekly meeting next week.
  • Jetpack Bugmaster Wes Kocher released a module called ‘bmo.js’ that allows SDK developers simple access to the bugzilla api.

Quick Stats

Note: the stats above are based on the queries I linked to for each item. If you have suggestions on how these queries might be made more accurate,please comment below. Stats generated at 2013-03-05 09:03:12 PST

Meeting Brief

  • High Priority: PWPB has lots of pull requests in review, need to focus on Panel work. Need to hash out Panel Positioning design next week in person, Gabor hopes to land cross-domain content script capabilities in Firefox 22.
  • SDK: tests getting flakier, help!
  • Roundtable: GSOC ideas, bmo.js, windowless docshells, debugging support!

Full minutes are available here:
https://wiki.mozilla.org/Jetpack/Weekly_Meeting/2013-03-05#Minutes

March Featured Add-ons

The votes are in for March featured add-ons! Featured add-ons are selected by a community board, which nominates and votes on outstanding add-ons that appeal to a wide audience.

Anyone can nominate add-ons for the board’s consideration, so don’t be shy! Simply send an email to amo-featured@mozilla.org with your suggestion (you’re welcome to submit your own for consideration).

Featured add-ons are promoted in rotation on the homepage of addons.mozilla.org, as well as in the monthly Firefox & You newsletter, among other places.

Pick of the Month: Clear Console

One click to clear your cache, cookies, history, html5/local storage, http logins, or restart your browser with/without notifications.

Wow, this is just awesome. It clears even the html5 storage which very few add-ons do! Thanks a ton. You just made my life a lot easier!”

Get Clear Console »

Runners up:

Quick Translator
The most lightweight and easiest translator. Translate between more than 50 languages with one click or a hot key. Translate from one word to a whole page. Get Quick Translator»

Bloody Vikings!
Simplifies the use of temporary E-mail addresses. Get Bloody Vikings»

Getpersonas.com Migration Update

** 3/26/13 UPDATE ** The final stage of migration will begin Thursday, Mar 28 at 2pm PDT. At this time, getpersonas.com will go into read-only mode, which means it will not accept any new registrations, logins, or theme submissions. We expect this process to last up to two weeks. After migration is complete, you will be able to submit new themes on addons.mozilla.org.


We are making progress on the migration of getpersonas.com to addons.mozilla.org (AMO), and we wanted to give you an update! As many of you know, getpersonas.com was the original home for background themes, and was created as part of a Mozilla Labs experiment. The site became strained as a result of its success, and a move to the add-ons (and Marketplace) ecosystem is necessary to ensure it continues to thrive.

Background themes on AMO already enjoy features such as ratings and reviews, and support for over 30 languages. When the migration is complete, we’ll also have a brand-new submission page, artist profile page, and a vastly improved reviewer tool. (See below for screen shots).

We are aiming to complete the migration within the next three months. If you are a getpersonas.com user, you will receive an email containing more details in the coming weeks.

What it means for you as a getpersonas.com user

  1. If you have an AMO account using the same email address

    After the migration, log in to addons.mozilla.org using your AMO credentials. Your favorites from getpersonas.com will appear in your My Favorites collection, and any themes you have created will appear on your profile page.

  2. If you don’t have an AMO account

    After the migration, log in to addons.mozilla.org using your getpersonas.com credentials. Your favorites from getpersonas.com will appear in your My Favorites collection, and themes you have created will appear on your profile page.

  3. If you have accounts on both sites, and log in using different email addresses

    We won’t be able to automatically match accounts that have different email addresses. This means you will continue logging in to addons.mozilla.org using your AMO credentials to access your AMO content (e.g. add-ons you’ve created and your add-on collections), and log in using your getpersonas.com credentials to access your getpersonas.com content (e.g. themes you’ve created and your favorite themes).

    • If you’d like your content consolidated automatically (scenario #1), please change your email address on one of these sites ASAP, so they match.
    • If you don’t change your email address to match by the time the migration is complete, no worries—you can still transfer ownership of themes between accounts afterwards.

Last but not least, previews!

Theme submission page:

parisbridge

Profile Page:

Screen Shot 2013-02-27 at 4.47.17 PM

Review Tool:Screen Shot 2013-02-21 at 2.10.11 PM

Per-window private browsing and the Add-on SDK

Update to the update!

We’ve now figured out that we only need to repack add-ons that actually use the private-browsing module.

  • If you don’t use private-browsing, you don’t need to do anything.
  • If you use the private-browsing module in an add-on that’s hosted on AMO, then it will be marked incompatible with Firefox 20, and will need to be repacked with SDK 1.14 when SDK 1.14 is released. We will repack it with SDK 1.14 if we can, and you will need to repack it yourself if you can’t. We will email you to let you know whether you need to do anything within a couple of days of releasing 1.14.
  • if you use the private-browsing module in an add-on that’s not hosted on AMO: then you will need to repack it with SDK 1.14, or it will start leaking your users’ private data from Firefox 20 onwards.

Update: since the original version of this post, we’ve decided to make repacking with SDK 1.14 mandatory. Add-ons which are not repacked with SDK 1.14 will be marked as incompatible with Firefox 20.

We’re running a project to automatically repack as many AMO-hosted SDK add-ons as we can. AMO-hosted SDK add-ons that we can’t repack, and SDK add-ons not hosted on AMO, will need to be repacked by their authors once SDK 1.14 is release on March 26.

We’ll have another blog post outlining the repacking plan soon.


 

Firefox 20 introduces major changes to the “private browsing” feature, which will affect add-ons developed using the SDK. This blog post explains what the change is, how the SDK is handling it, and what add-on developers will need to do as a result. In summary:

  • if your add-on uses the private-browsing API, you must repack it when SDK 1.14 is released on March 26th if you want your add-on to work properly on Firefox 20.
  • whether or not your add-on uses the private-browsing API, you must update it if you want your add-on to be able to see private windows on Firefox 20.

What’s per-window private browsing?

Up to and including Firefox 19, private browsing has been a global property for the entire browser. When the user enters private browsing, the existing browsing session is suspended and a new blank window opens. This window is private, as are any other windows opened until the user chooses to exit private browsing, at which point all private windows are closed and the user is returned to the original non-private session.

Firefox 20 introduces per-window private browsing. This means that private browsing status is a property of an individual window. The user enters private browsing by opening a new private window. When they do this, any existing non-private windows are kept open, so the user will typically have both private and non-private windows open at the same time.

How does the SDK handle this change?

Under the old, global, private browsing model, add-ons can handle private browsing as a simple binary condition: while private browsing is active, don’t store any user data. The SDK’s private-browsing API supports this by offering an isActive property to check whether the browser is in private browsing mode, alongside start and stop events to be notified when private browsing starts and stops.

Here’s an add-on that stores the titles of tabs the user loads, unless the browser is in private browsing mode:

var simpleStorage = require("simple-storage");
 
if (!simpleStorage.storage.titles)
  simpleStorage.storage.titles = [];
 
require("tabs").on("ready", function(tab) {
  if (!require("private-browsing").isActive) {
    console.log("storing...");
    simpleStorage.storage.titles.push(tab.title);
  }
  else {
    console.log("not storing, private data");
  }
});

The first SDK release to target Firefox 20 is SDK 1.14. This release updates the API to support per-window private browsing, and makes another important change: by default, SDK 1.14-based add-ons won’t see any private windows.

Repacking your add-on

Hiding private windows by default means that add-ons developers don’t need to update their code in order to respect per-window private browsing: all they need to do is repack their add-ons using SDK 1.14. The old API will log deprecation warnings, but will behave as if the user never enters private browsing:

  • isActive will always be false, and start and stop will never be triggered.
  • the add-on will never see private windows, or objects such as tabs that are associated with private windows
  • page-mods will not be matched for private windows

You must repack your add-on though! If you don’t, it may not function correctly, and will leak user private data, because private windows will not be hidden. We’re working on a plan to help add-on developers repack add-ons with 1.14.

Updating your code

If you want to see private windows, you’ll need to set the following key in your “package.json”
file:

"permissions": {"private-browsing": true}

Once you do that, you’ll see private windows, so if you store user data, you’ll need to use the new API to respect private browsing.

SDK 1.14 replaces the existing API with a new function isPrivate() that takes an object – a window, tab, or worker – as a parameter, and returns true if the object is a private window or is associated with a private window. So to update the add-on above, we could do something like this:

var simpleStorage = require("simple-storage");
 
if (!simpleStorage.storage.titles)
  simpleStorage.storage.titles = [];
 
require("tabs").on("ready", function(tab) {
  if (!require("private-browsing").isPrivate(tab)) {
    console.log("storing...");
    simpleStorage.storage.titles.push(tab.title);
  }
  else {
    console.log("not storing, private data");
    // do something else...
  }
});

Working with Firefox 19

SDK 1.14 bridges the gap between the old global private browsing, in Firefox 19, and the new per-window private browsing, in Firefox 20.

Since SDK 1.14 needs to support both versions, the new private-browsing API is designed to work with global private browsing. When running on Firefox 19, isPrivate() will return true if and only if the user has global private browsing enabled.

Summary

If you have an add-on built with an earlier version of the SDK, this section summarises your options when SDK 1.14 comes out.

If you do nothing

  • on Firefox 19 your add-on will continue to work fine: it will get results for isActive, start, and stop that track global private browsing, and you will be able to use them to avoid storing user private data.
  • on Firefox 20 your add-on might not work at all. If it does, it will see private windows, but the old private-browsing API will not ever tell you that they are private, so you may leak user private data.

If you repack with SDK 1.14

If you just repack your add-on but leave the code unchanged:

  • on Firefox 19 your add-on will continue to work as before: it will get results for isActive, start, and stop that track global private browsing, and you will be able to use them to avoid storing user private data.
  • on Firefox 20 any of the old private-browsing functions (isActive, start, and stop) will log deprecation warnings. Your add-on won’t see any private windows or objects, such as tabs, that are associated with them (it will behave as if these windows just don’t exist). isActive will always be false, and start and stop will never fire.

If you update your add-on

If you update your add-on, by setting the “private-browsing” flag, and updating your code to use the new isPrivate() API:

  • on Firefox 19 your add-on will work fine: isPrivate() will map on to global private browsing by returning true if and only if the user is in global private browsing mode.
  • on Firefox 20 you’ll see private windows, and isPrivate() will tell you whether it’s OK to store user data associated with windows, tabs, and workers.

Jetpack Project: weekly update for February 26, 2013

Project News

  • Over the last couple of days I’ve published a couple of posts about the near future of the project as we land the SDK’s apis in Firefox: [part 1] & [part 2]. If you have any feedback on these posts, please comment there, below, or ideally post to the Google group.
  • We took a hard look at the work we need to ship in SDK 1.14 and decided that, given there is also a team work week coming up the best thing to do is to delay release by 2 weeks. This means that Add-on SDK 1.14 will be released on Tuesday, March 26th.
  • Mozillian / Hacker Blake Winton created Whimsy ( code here ), a crazy little Jetpack that adds fun, zany stuff to Firefox, in particular the newtab page.

Quick Stats

Note: the stats above are based on the queries I linked to for each item. If you have suggestions on how these queries might be made more accurate, please comment below. Stats generated at 2013-02-26 10:08:05 PST

Meeting Brief

  • High priority work: Jetpack has landed! PWPB needs your help, ask Erik!
  • SDK: 1.14 has been pushed back a couple weeks to catch all the changes needed, and allow for team meetup travel.
  • Roundtable: discussion around squashing commits in to understandable chunks, Eddy’s blog posts, and what to expect for the work week.

Full minutes are available here:
https://wiki.mozilla.org/Jetpack/Weekly_Meeting/2013-02-26#Minutes

Add-on Compatibility Updates, Firefox 20 and above

This post is just a mixed bag of add-on compatibility issues that developers should be aware of, most of which will be included in future compatibility updates in this blog, but are worth giving a heads up in advance.

Asynchronous Places [21]

A large number of Places APIs will be removed in Firefox 21, as Places continues to become fully asynchronous. The list of API changes and discussion is happening on this dev.extensions thread.

Per-window Private Browsing Mode [20]

Much has changed in the past couple of releases in preparation for per-window private browsing mode. In Firefox 20, most of what was left has been taken out, including nsIPrivateBrowsingService and some observer notifications.

Lazy Tab Restoration [20]

Firefox already implements this feature where old tabs are only loaded on demand after a Firefox restart. To further optimize this feature and save more memory,  the browser elements in these tabs will be set to display: none. This means that many assumptions about accessing such tabs are now broken, like the existence of a docShell, browser.contentWindow, etc. If your add-on looks into content of existing tabs, you should make sure it works with tabs that haven’t been loaded yet. This will ship in Firefox 20, currently on beta.

Java Click-to-Play

The continuous click-to-play blocks that we have been doing for Java may be breaking some add-ons that rely on Java code. We strongly recommend that you move away from Java and implement your add-on code either using JavaScript or external libraries and JS-ctypes. If you still rely on Java for your add-ons and have run into problems with click-to-play, this bug might help.

Jetpack: The Road Ahead ( Part 2 )

In my last post I talked about the process currently underway to shift SDK development to match the Firefox release schedule. This work has taken up a ton of time over the last year or so, but most of the benefits to add-on developers are around unexciting things like compatibility and maintenance. Developers want new exciting capabilities, and thankfully we have a few plans up our sleeve.

The next phase ( Firefox 23 & Up )

Shipping in Firefox does not mean that the SDK is ‘done’; quite the opposite! The team still needs to maintain the SDK’s APIs with future versions of Firefox. As I mentioned in my previous post we do expect this work will be simplified because we will no longer need to support a range of Firefox versions with the same code-base.

What are we going to do with all this spare time? I’m glad you asked! There are three key initiatives that I mentioned in our Roadmap that are top priorities for Jetpack in 2013:

Simple, Powerful Firefox UI integration

Based on Stephen Shorlander’s excellent mockups, we will be implementing a set of high-level, useful APIs that allow developers to integrate custom UI into Firefox navigation bar in a reliable an efficient way. There will be no markup, no need to manually handle unload. These APIs will be available to all add-on developers, not just those using the SDK.

Rapid Prototyping of Firefox features

One of the goals of the SDK has always been to help make Firefox feature development easier. We’ve come a long way towards helping this by embedding our powerful, module APIs and CommonJS loader into Firefox, but we think we can go even farther by easing the pain for not only creating feature prototypes but also shipping the tried and tested code-base the prototype becomes in Firefox all using a modern, modular approach.

Awesome tools for Add-on Developers

A key goal for the team is to help improve the developer experience for add-on developers. We believe the best way to approach this problem is to create great native tools that leverage the work of the already fantastic Firefox Developer tools and provide add-on developers with the features they’ve been asking for, such as debugging, rapid prototyping and in-browser packaging.

A related goal for the team is to continue to support Add-on Builder as we move through this transition. Next week I will publish a road-map for Add-on Builder that provides more detail about Builder’s future.

Jetpack: The Road Ahead

Until now the SDK has been released every 6 weeks, 3 weeks offset from Firefox releases. We are breaking this established release schedule and switching to release the SDK’s APIs in Firefox itself, starting with Firefox 21. The process will be somewhat disruptive, in fact I’ve taken to calling it our awkward phase. I’d like to first describe how this awkwardness might affect you, and then why we think this transition is worth all this trouble.

The Awkward Phase

By the time we reach the end of this ‘awkward phase’ we should have a much better story for packaging and Firefox compatibility: the SDK’s apis will be maintained in our github repo, shipped with Firefox every 6 weeks, and add-ons that use these apis will no longer need to include a version of the SDK’s apis in the add-on package.

In order to achieve these goals we have decided to make Add-on SDK 1.14 the last release of the SDK that will include the APIs. Firefox 21 will be the first version that includes the SDK APIs and they will match those shipped in SDK 1.14. After we ship SDK 1.14 on March 12 we will only release new SDK API features via Firefox, meaning the next time we introduce new SDK functionality will be with the release of Firefox 22.

SDK 1.14 also introduces some changes to how add-ons load SDK APIs. If you package your add-on using SDK 1.14, the resulting xpi will by default include all of the API dependencies needed to run the add-on as usual. If your add-on is run in Firefox 21 or greater, the SDK’s loader will not load these packaged APIs, and will instead use the ones shipped with Firefox.

The Benefits

The shift to shipping in Firefox has clear benefits:

  1. developers will not need to re-pack their add-ons after SDK 1.14 in order to benefit from changes in the SDK, as the add-on will always use the APIs provided by newer versions of Firefox.

  2. the Jetpack team will decouple our releases of the cfx packaging tool from the 6 week train model. This tool should not need to change significantly so we should only need to update it on an as-needed basis.

  3. the Jetpack team will no longer need to maintain compatibility with a range of Firefox versions in a single code-base. This aspect alone will greatly reduce the complexity of our code in some areas, and allow us to more easily react to major platform changes.

  4. new features can be added to the SDK more quickly when they depend on changes to Firefox as the new features can ship in the same release as those changes rather than waiting for later.

  5. Firefox developers will be able to rely on the SDK APIs when creating new Firefox features.

What’s next?

Once Firefox 22 as been released, we will release a new cfx packaging tool; this version will not include the SDK’s APIs, and therefore will not include these APIs in the add-ons it packages. Add-ons will be much smaller, and developers will no longer need to re-pack to the latest version in order to benefit from the latest bug fixes.

What I’m most excited are the cool projects the team will start working on for Firefox 22 and up – I’ll publish a follow-up post on these plans tomorrow.

Add-ons Update – Week of 2013/02/21

I post these updates every 3 weeks to inform add-on developers about the status of the review queues, add-on compatibility, and other happenings in the add-ons world.

In case you missed it, give 2012 in Add-on Reviews a look. It’s a good overview of what the review team did last year and how it compares to previous years.

The Review Queues

  • Most nominations for full review are taking less than 4 weeks to review.
  • Most updates are being reviewed within 4 weeks.
  • Most preliminary reviews are being reviewed within 3 weeks.

These stats are taken from the last queue report:

  • 72 nominations in the queue awaiting review.
  • 101 updates in the queue awaiting review.
  • 86 preliminary review submissions in the queue awaiting review.

Our new reviewer incentives program has become a great motivator for our review team. If you’re an add-on developer, please consider joining us. Add-on reviewers get invited to Mozilla events and earn cool gear with their work. Visit our wiki page for more information.

Firefox 19 Compatibility

The compatibility blog post for Firefox 19 is available here. The compatibility bump was run shortly before release.

The Firefox 20 blog post and bump should come in a couple of weeks.