{"id":6843,"date":"2013-12-12T12:20:42","date_gmt":"2013-12-12T20:20:42","guid":{"rendered":"http:\/\/blog.mozilla.org\/addons\/?p=6843"},"modified":"2014-03-06T14:31:22","modified_gmt":"2014-03-06T22:31:22","slug":"australis-for-add-on-developers-1","status":"publish","type":"post","link":"https:\/\/blog.mozilla.org\/addons\/2013\/12\/12\/australis-for-add-on-developers-1\/","title":{"rendered":"Australis for Add-on Developers &#8211; Part 1: Toolbars"},"content":{"rendered":"<p>Australis, the new Firefox theme, landed in Nightly 6 weeks ago. Because of the ongoing work being done to it, it won&#8217;t be uplifted to Aurora just yet, so it will continue to be available exclusively in the <a href=\"http:\/\/nightly.mozilla.org\/\">Nightly channel<\/a> for at least one more cycle. That means that Australis won&#8217;t be in Firefox before version 29, which is <a href=\"https:\/\/wiki.mozilla.org\/RapidRelease\/Calendar\">currently scheduled<\/a> to make its final release in late April 2014.<\/p>\n<p><strong>We encourage you to <a href=\"http:\/\/nightly.mozilla.org\/\">download the latest Nightly<\/a> and test your add-ons in it.<\/strong> If you&#8217;re an add-on developer and run into problems, please let us know, or <a href=\"https:\/\/bugzilla.mozilla.org\/enter_bug.cgi?product=Firefox&amp;component=Extension%20Compatibility\">file a bug<\/a> and add it as a dependency to <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=australis-addons\">this tracking bug for add-on issues<\/a> on Australis. Make sure to give the other dependent bugs a look first to prevent duplicates. If you&#8217;re not a developer and want to report a problem in one of the add-ons you have installed, you can install the <a href=\"https:\/\/addons.mozilla.org\/addon\/add-on-compatibility-reporter\/\">Add-on Compatibility Reporter<\/a> extension and use it to let us know.<\/p>\n<p>Now let&#8217;s start looking into what has changed in Australis that you should know about. If you haven&#8217;t installed Nightly yet, you can use the information in <a href=\"https:\/\/blog.mozilla.org\/ux\/2013\/11\/australis-is-landing-in-firefox-nightly\/\">this blog post<\/a> as reference.<\/p>\n<h3>Toolbars<\/h3>\n<p>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.<\/p>\n<p>The Add-on Bar at the bottom has been removed. Instead, there&#8217;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\u2019s possible to add add-on buttons and widgets to it as well.<\/p>\n<p>The customization UI got a much-needed refresh and now it&#8217;s much easier to use and find. The full window view allows users to better understand what they\u2019re 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&#8217;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.<\/p>\n<p>The DOM in the main toolbar is also different. Now there&#8217;s a intermediate container between the <code>toolbar<\/code> element and its children. It&#8217;s an <code>hbox<\/code> with id <code>nav-bar-customization-target<\/code>.<\/p>\n<h3>Toolbar Buttons<\/h3>\n<p>The icons in the main toolbar are 18&#215;18 pixels. However, a 1px padding is expected, so the 16&#215;16 pixel icons you should be using for the main toolbar in modern versions of Firefox will work without any changes.<\/p>\n<p>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&#215;32 pixels\u00a0in the menu panel and also during customization, if they are removed from the toolbar. Smaller icons will be upscaled, so they won&#8217;t look very good if you use the 16&#215;16 pixel icons.<\/p>\n<p>So, if you have an add-on that adds a toolbar button to the main toolbar using the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/XUL\/School_tutorial\/Adding_Toolbars_and_Toolbar_Buttons\">usual guidelines<\/a> 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:<\/p>\n<pre>\/* Original CSS *\/\r\n#my-button {\r\n  list-style-image: url(\"chrome:\/\/my-extension\/skin\/icon16.png\");\r\n}\r\n\/* Added for Australis support *\/\r\n#my-button[cui-areatype=\"menu-panel\"],\r\ntoolbarpaletteitem[place=\"palette\"] &gt; #my-button {\r\n  list-style-image: url(\"chrome:\/\/my-extension\/skin\/icon32.png\");\r\n}<\/pre>\n<p>Note that buttons in the Australis theme have the <code>cui-areatype<\/code> attribute set when placed in in the UI. The possible values are <code>menu-panel<\/code> and <code>toolbar<\/code>. You can use the <code>toolbar<\/code> value to have different style for the button in Australis and non-Australis themes.<\/p>\n<p>Buttons with <code>type=\"menu\"<\/code> or <code>type=\"menu-button\"<\/code> show inconsistent appearance and behavior. There are a couple of add-on bugs filed for them, but it&#8217;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&#8217;t documented yet, but you can <a href=\"http:\/\/mxr.mozilla.org\/mozilla-central\/source\/browser\/components\/customizableui\/src\/CustomizableWidgets.jsm?rev=03a55dd19083#64\">look at the source code<\/a> to get an idea.<\/p>\n<h3>Add-on Bar Buttons<\/h3>\n<p>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&#8217;t seem to work at present. I filed <a href=\"https:\/\/bugzilla.mozilla.org\/show_bug.cgi?id=947410\">this bug<\/a> to keep track of the problem. \u00a0While this does appear to be a bug, we encourage you to insert your button in the main toolbar instead.<\/p>\n<p>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: <code>PanelUI-menu-button<\/code>.<\/p>\n<h3>SDK Add-ons<\/h3>\n<p>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. <a href=\"https:\/\/blog.mozilla.org\/addons\/2013\/12\/12\/announcing-add-on-sdk-1-15\/\">Version 1.15 of the SDK was just released<\/a>, which generates library-less XPIs by default.<\/p>\n<p>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&#8217;s possible that widgets will be deprecated in the future for something that works better with Australis, but that&#8217;s still being talked about, so keep an eye on this blog for updates.<\/p>\n<h3>More Documentation<\/h3>\n<ul>\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Mozilla\/JavaScript_code_modules\/CustomizableUI.jsm\">CustomizableUI.jsm<\/a>. 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 <a href=\"http:\/\/mxr.mozilla.org\/projects-central\/source\/ux\/browser\/components\/customizableui\/src\/CustomizableUI.jsm\">the source code<\/a> directly for up-to-date information. Bonus points if you contribute to the doc :).<\/li>\n<li><a href=\"https:\/\/developer.mozilla.org\/en-US\/Firefox\/australis-add-on-compat-draft\">Australis and Add-on Compatibility (draft)<\/a>. At the moment it&#8217;s just a collection of compatibility notes. It&#8217;s also being worked on, so it will change in time. And, again, bonus points ;).<\/li>\n<\/ul>\n<p>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. <a href=\"https:\/\/blog.mozilla.org\/addons\/2014\/03\/06\/australis-for-add-on-developers-2\/\">Part 2<\/a> covers the CustomizableUI object. Let us know what you have discovered about Australis compatibility in the comments.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Australis, the new Firefox theme, landed in Nightly 6 weeks ago. Because of the ongoing work being done to it, it won&#8217;t be uplifted to Aurora just yet, so it &hellip; <a class=\"go\" href=\"https:\/\/blog.mozilla.org\/addons\/2013\/12\/12\/australis-for-add-on-developers-1\/\">Read more<\/a><\/p>\n","protected":false},"author":173,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[388,44,295],"tags":[28092,278877,278873,278876,42919,278880],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Australis for Add-on Developers - Part 1: Toolbars - Mozilla Add-ons Community Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blog.mozilla.org\/addons\/2013\/12\/12\/australis-for-add-on-developers-1\/\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jorge Villalobos\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2013\/12\/12\/australis-for-add-on-developers-1\/\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/2013\/12\/12\/australis-for-add-on-developers-1\/\",\"name\":\"Australis for Add-on Developers - Part 1: Toolbars - Mozilla Add-ons Community Blog\",\"isPartOf\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\"},\"datePublished\":\"2013-12-12T20:20:42+00:00\",\"dateModified\":\"2014-03-06T22:31:22+00:00\",\"author\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/a098261b4b5510d408ff31f492606925\"},\"breadcrumb\":{\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2013\/12\/12\/australis-for-add-on-developers-1\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/blog.mozilla.org\/addons\/2013\/12\/12\/australis-for-add-on-developers-1\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/2013\/12\/12\/australis-for-add-on-developers-1\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/blog.mozilla.org\/addons\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Australis for Add-on Developers &#8211; Part 1: Toolbars\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#website\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/\",\"name\":\"Mozilla Add-ons Community Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/a098261b4b5510d408ff31f492606925\",\"name\":\"Jorge Villalobos\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/6d1966118f16e4b99a6e3ad07883be33?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/6d1966118f16e4b99a6e3ad07883be33?s=96&d=mm&r=g\",\"caption\":\"Jorge Villalobos\"},\"description\":\"Jorge is the Product Manager for addons.mozilla.org\",\"url\":\"https:\/\/blog.mozilla.org\/addons\/author\/jvillalobosmozilla-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Australis for Add-on Developers - Part 1: Toolbars - Mozilla Add-ons Community Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/blog.mozilla.org\/addons\/2013\/12\/12\/australis-for-add-on-developers-1\/","twitter_misc":{"Written by":"Jorge Villalobos","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/blog.mozilla.org\/addons\/2013\/12\/12\/australis-for-add-on-developers-1\/","url":"https:\/\/blog.mozilla.org\/addons\/2013\/12\/12\/australis-for-add-on-developers-1\/","name":"Australis for Add-on Developers - Part 1: Toolbars - Mozilla Add-ons Community Blog","isPartOf":{"@id":"https:\/\/blog.mozilla.org\/addons\/#website"},"datePublished":"2013-12-12T20:20:42+00:00","dateModified":"2014-03-06T22:31:22+00:00","author":{"@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/a098261b4b5510d408ff31f492606925"},"breadcrumb":{"@id":"https:\/\/blog.mozilla.org\/addons\/2013\/12\/12\/australis-for-add-on-developers-1\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blog.mozilla.org\/addons\/2013\/12\/12\/australis-for-add-on-developers-1\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/blog.mozilla.org\/addons\/2013\/12\/12\/australis-for-add-on-developers-1\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blog.mozilla.org\/addons\/"},{"@type":"ListItem","position":2,"name":"Australis for Add-on Developers &#8211; Part 1: Toolbars"}]},{"@type":"WebSite","@id":"https:\/\/blog.mozilla.org\/addons\/#website","url":"https:\/\/blog.mozilla.org\/addons\/","name":"Mozilla Add-ons Community Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blog.mozilla.org\/addons\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/a098261b4b5510d408ff31f492606925","name":"Jorge Villalobos","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blog.mozilla.org\/addons\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/6d1966118f16e4b99a6e3ad07883be33?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/6d1966118f16e4b99a6e3ad07883be33?s=96&d=mm&r=g","caption":"Jorge Villalobos"},"description":"Jorge is the Product Manager for addons.mozilla.org","url":"https:\/\/blog.mozilla.org\/addons\/author\/jvillalobosmozilla-com\/"}]}},"_links":{"self":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/6843"}],"collection":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/users\/173"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/comments?post=6843"}],"version-history":[{"count":0,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/posts\/6843\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/media?parent=6843"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/categories?post=6843"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.mozilla.org\/addons\/wp-json\/wp\/v2\/tags?post=6843"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}