Australis, the new Firefox theme, landed in Nightly 6 weeks ago. Because of the ongoing work being done to it, it won’t be uplifted to Aurora just yet, so it will continue to be available exclusively in the Nightly channel for at least one more cycle. That means that Australis won’t be in Firefox before version 29, which is currently scheduled to make its final release in late April 2014.
We encourage you to download the latest Nightly and test your add-ons in it. If you’re an add-on developer and run into problems, please let us know, or file a bug and add it as a dependency to this tracking bug for add-on issues on Australis. Make sure to give the other dependent bugs a look first to prevent duplicates. If you’re not a developer and want to report a problem in one of the add-ons you have installed, you can install the Add-on Compatibility Reporter extension and use it to let us know.
Now let’s start looking into what has changed in Australis that you should know about. If you haven’t installed Nightly yet, you can use the information in this blog post as reference.
Toolbars
The toolbars have changed significantly. The objective is to maximize the content area available to users by cutting down chrome areas that were generally empty. There were also deeper changes that enable more complex widgets to be added to the toolbar and other areas without compromising on space.
The Add-on Bar at the bottom has been removed. Instead, there’s a new menu panel that extends the toolbar with buttons and widgets. It is activated by clicking on the button at the right end of the main toolbar. All the items in this new menu are customizable and it’s possible to add add-on buttons and widgets to it as well.
The customization UI got a much-needed refresh and now it’s much easier to use and find. The full window view allows users to better understand what they’re doing and have better control over toolbar customization. The possible targets for toolbar buttons are the main toolbar, custom toolbars, the tab bar and the new menu panel. Make sure that your add-on buttons / widgets work well for all cases. There’s currently no way to create new blank toolbars, but the Bookmarks Toolbar can be used by users to add buttons. There is no more big icon / small icon option.
The DOM in the main toolbar is also different. Now there’s a intermediate container between the toolbar
element and its children. It’s an hbox
with id nav-bar-customization-target
.
Toolbar Buttons
The icons in the main toolbar are 18×18 pixels. However, a 1px padding is expected, so the 16×16 pixel icons you should be using for the main toolbar in modern versions of Firefox will work without any changes.
Buttons can be also moved by users or added by default to the new menu panel, so you need to consider this case as well. Icons are 32×32 pixels in the menu panel and also during customization, if they are removed from the toolbar. Smaller icons will be upscaled, so they won’t look very good if you use the 16×16 pixel icons.
So, if you have an add-on that adds a toolbar button to the main toolbar using the usual guidelines of overlaying the button to the palette and then adding it to the toolbar using JS on first run, everything should work the same and you should only change your CSS to something like this:
/* Original CSS */ #my-button { list-style-image: url("chrome://my-extension/skin/icon16.png"); } /* Added for Australis support */ #my-button[cui-areatype="menu-panel"], toolbarpaletteitem[place="palette"] > #my-button { list-style-image: url("chrome://my-extension/skin/icon32.png"); }
Note that buttons in the Australis theme have the cui-areatype
attribute set when placed in in the UI. The possible values are menu-panel
and toolbar
. You can use the toolbar
value to have different style for the button in Australis and non-Australis themes.
Buttons with type="menu"
or type="menu-button"
show inconsistent appearance and behavior. There are a couple of add-on bugs filed for them, but it’s unclear if they will be fixed, since the subview pattern will be favored for Australis. See how the History button works on the toolbar and the panel for an example of this. The process of implementing this isn’t documented yet, but you can look at the source code to get an idea.
Add-on Bar Buttons
As mentioned before, the Add-on Bar was retired to maximize the available content area. However, a shim is in place in the main toolbar to facilitate migration (it even contains the old statusbar shim). However, it doesn’t seem to work at present. I filed this bug to keep track of the problem. While this does appear to be a bug, we encourage you to insert your button in the main toolbar instead.
By the way, an easy way to detect if your add-on is installed on a Firefox version with Australis is to check for the existence of this node ID: PanelUI-menu-button
.
SDK Add-ons
As you may know already, the SDK was integrated into Firefox, so SDK add-ons no longer need to bundle the entire set of libraries, making them more or less independent from the SDK version being used. Version 1.15 of the SDK was just released, which generates library-less XPIs by default.
Since the SDK will be built into Firefox, you can expect your add-ons and widgets to work with Australis. You should keep in mind that it’s possible that widgets will be deprecated in the future for something that works better with Australis, but that’s still being talked about, so keep an eye on this blog for updates.
More Documentation
- CustomizableUI.jsm. This module is the tool that add-ons can use to manipulate the toolbar and its widgets directly. The document is still taking shape, so you might need to look at the source code directly for up-to-date information. Bonus points if you contribute to the doc :).
- Australis and Add-on Compatibility (draft). At the moment it’s just a collection of compatibility notes. It’s also being worked on, so it will change in time. And, again, bonus points ;).
As the title says, this is only part 1. As we learn more about the compatibility issues add-on developers run into, we will release new installments. Part 2 covers the CustomizableUI object. Let us know what you have discovered about Australis compatibility in the comments.
Alfred wrote on
Jorge Villalobos wrote on
Peter J. Sloetjes wrote on
Ken Saunders wrote on
Jorge Villalobos wrote on
Luke wrote on
Jorge Villalobos wrote on
Kohei Yoshino wrote on
Jorge Villalobos wrote on
Gomita wrote on
Jos Tor wrote on
Jorge Villalobos wrote on
Peter J. Sloetjes wrote on
patrickjdempsey wrote on
Jorge Villalobos wrote on
SaphirJD wrote on
Passerby wrote on
SaphirJD wrote on
SaphirJD wrote on
Daniel wrote on
clas wrote on
Peter J. Sloetjes wrote on
Jorge Villalobos wrote on
Peter J. Sloetjes wrote on
tux. wrote on
Vengeance wrote on
Axel Grude wrote on
greg wrote on
Mingyi Liu wrote on
Mingyi Liu wrote on
Mingyi Liu wrote on
Axel Grude wrote on
Jorge Villalobos wrote on
Mingyi Liu wrote on
Mingyi Liu wrote on
Jorge Villalobos wrote on
SaphirJD wrote on
Carpatula wrote on
Quicksaver wrote on
ThumperZ1 wrote on
Minh Nguyễn wrote on
Jorge Villalobos wrote on
Axel Grude wrote on
Jorge Villalobos wrote on
Boris wrote on
Jorge Villalobos wrote on
Boris wrote on
Boris wrote on
Jorge Villalobos wrote on
Barry wrote on
Jorge Villalobos wrote on
d.s.e wrote on