Australis Add-on Comeptition & SDK Resources

53 views
Skip to first unread message

Jeff Griffiths

unread,
Mar 13, 2014, 8:11:40 PM3/13/14
to mozilla-la...@googlegroups.com
Rocketeers!

This is a quick note to announce to this group the Australis add-on
compeition currently running. Grand prize is a FirefoxOS Phone! For
more info see this blog post:

https://blog.mozilla.org/addons/australis-overview/

Notably absent is much info about the SDK, this was a bit of a
communications problem. If you're using the SDK Australis is actually
a major release, we're introducing several new apis:

* 'Toggle' and 'Action' buttons that use the new customization apis
and automateically appear in the toolbar by default

* the ability to anchor panels to these buttons

* a new Toolbar api that, er, provides toolbars

* a new utility api called 'Frame' the provides convenient access to
an html document. In particular you can embed any combination of
buttons and frames into a toolbar, and communication between a frame's
document and the main add-on code is handled using postMessage.

Some resources to get you started:

- https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/ui_button_action

- https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/ui_button_toggle

- https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/ui_toolbar

- https://developer.mozilla.org/en-US/Add-ons/SDK/Low-Level_APIs/ui_frame

( these urls might get re-directed )

This is a github repo for a very basic example add-on using these apis:

https://github.com/canuckistani/australis-ui


If you have any questions, as always either post to the list or drop
by #jetpack on irc.mozilla.org.

cheers, Jeff

Paul Morris

unread,
Mar 16, 2014, 11:13:31 AM3/16/14
to mozilla-la...@googlegroups.com
Thanks for the info Jeff!

Good to know about these new APIs for Australis. I notice they are listed as "low-level" APIs on MDN. I'm just curious why they wouldn't be high-level instead?

Also I'm wondering what the story is on widget deprecation, which I saw in the release notes that Will posted. Is the idea that frame will replace widget? I see on MDN that "At the moment you can only add frames to a toolbar." Is the plan to eventually make it possible to add frames directly to the main Firefox toolbar (like buttons), possibly with some restrictions on size (as I read somewhere before)?

I'd like to update my add-on Mind the Time[1] for Australis, but it uses a dynamically updated counter in the main Firefox toolbar (a widget), and it seems there's currently no way to do that with the new SDK APIs.

BTW, I successfully migrated from builder to the command line tools, so thanks to everyone for the help with that.

Cheers,
-Paul

[1] https://addons.mozilla.org/en-US/firefox/addon/mind-the-time/?src=ss
> --
> You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mozilla-labs-jet...@googlegroups.com.
> To post to this group, send email to mozilla-la...@googlegroups.com.
> Visit this group at http://groups.google.com/group/mozilla-labs-jetpack.
> For more options, visit https://groups.google.com/d/optout.

David Bruant

unread,
Mar 16, 2014, 11:16:50 AM3/16/14
to mozilla-la...@googlegroups.com
Le 16/03/2014 16:13, Paul Morris a écrit :
> Thanks for the info Jeff!
>
> Good to know about these new APIs for Australis. I notice they are listed as "low-level" APIs on MDN. I'm just curious why they wouldn't be high-level instead?
I was wondering the same.

David

Marcio Galli

unread,
Mar 16, 2014, 4:26:49 PM3/16/14
to mozilla-la...@googlegroups.com
It's been a few years I am not using the Add-on Sdk however I wanted
to give it a try.

I have your sample case (australis-ui) and also downloaded the 1.15 SDK and did:

* source ./bin/activate
* cfx run from the australis-ui directory

Got the following error:

(addon-sdk-1.15)Marcios-MacBook:australis-ui marciogalli$ cfx run --no-run
ModuleNotFoundError: unable to satisfy: require(sdk/ui/button/action) from
/Users/marciogalli/Desktop/addon/australis-ui/lib/main.js:11:
Looked for it in:
/Users/marciogalli/Desktop/addon/australis-ui/lib/sdk/ui/button/action.js
/Users/marciogalli/Desktop/addon/addon-sdk-1.15/lib/sdk/ui/button/action.js
/Users/marciogalli/Desktop/addon/australis-ui/lib/sdk/ui/button/action.js

Have I missed something from online documentation on how to get your
sample going?

Appreciate any note,

Marcio
> --
> You received this message because you are subscribed to the Google Groups "mozilla-labs-jetpack" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to mozilla-labs-jet...@googlegroups.com.
> To post to this group, send email to mozilla-la...@googlegroups.com.
> Visit this group at http://groups.google.com/group/mozilla-labs-jetpack.
> For more options, visit https://groups.google.com/d/optout.



--
T e l a S o c i a l / T a b o c a L a b s
www.taboca.com

Marcio Galli

unread,
Mar 16, 2014, 4:28:18 PM3/16/14
to mozilla-la...@googlegroups.com
Sorry for the "--no-run" in the path in the above error copy and
paste. In fact I got a similar error when simply executing "cfx run"
from the australis-ui project.

m

Jordan Santell

unread,
Mar 17, 2014, 12:03:27 AM3/17/14
to mozilla-la...@googlegroups.com
Marcio -- using the newest modules may require you to use the SDK from the master branch from the GitHub repo (along with Nightly builds) until a later version of the SDK (1.16) is released which will not do checking during build to see if the module exists at the time of the SDK's publishing, and instead rely on what modules are available in Firefox when running.

With regard to them being low-level APIs, my guess is that they're new, and could change in the future, as low-level APIs are more experimental than the battle-tested high level APIs.
>> To unsubscribe from this group and stop receiving emails from it, send an email to mozilla-labs-jetpack+unsub...@googlegroups.com.

ZER0

unread,
Mar 17, 2014, 5:44:24 AM3/17/14
to mozilla-la...@googlegroups.com
On 16/03/14, 16:13 , Paul Morris wrote:

> Good to know about these new APIs for Australis. I notice they are listed as "low-level" APIs on MDN. I'm just curious why they wouldn't be high-level instead?

We have a convention in SDK where API that have just one slash are
basically considered High Level API, because they're immediately after
the "sdk" namespace. However, in new components, we tried to avoid to
pollute the high level space with something like "sdk/action-button",
"sdk/toggle-button", "sdk/frame", "sdk/toolbar", also to give a more
organic folder structure (ActionButton and ToggleButton are both under
"button" folder, for example).

Nevertheless, they're High Level API to the core. In order to keep our
convention, we exposed a "sdk/ui" module that group all the new UI
components:

https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/ui

This also makes easier create add-on with multiple elements, such two
ToggleButton that opens one a Sidebar and one a Toolbar:

const { ToogleButton, Toolbar, Sidebar } = require("sdk/ui");

Instead of requires every single UI module.
Of course that is still possible, especially if your add-on use just one
ActionButton for example, you can requires just that:

const { ActionButton } = require("sdk/ui/button/action");

Marcio Galli

unread,
Mar 17, 2014, 9:17:23 AM3/17/14
to mozilla-la...@googlegroups.com
On Mon, Mar 17, 2014 at 1:03 AM, Jordan Santell <jsan...@gmail.com> wrote:
> Marcio -- using the newest modules may require you to use the SDK from the
> master branch from the GitHub repo (along with Nightly builds) until a later
> version of the SDK (1.16) is released which will not do checking during
> build to see if the module exists at the time of the SDK's publishing, and
> instead rely on what modules are available in Firefox when running.
>
Thanks -- I have pushed a note to the following doc on MDN so potential
contestants can know of this ahead of time:
https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/ui.
Also sent a pull request to yours README.md.

m
>> >> an email to mozilla-labs-jet...@googlegroups.com.
>> >> To post to this group, send email to mozilla-la...@googlegroups.com.
>> >> Visit this group at
>> >> http://groups.google.com/group/mozilla-labs-jetpack.
>> >> For more options, visit https://groups.google.com/d/optout.
>> >
>> >
>> >
>> > --
>> > T e l a S o c i a l / T a b o c a L a b s
>> > www.taboca.com
>>
>>
>>
>> --
>> T e l a S o c i a l / T a b o c a L a b s
>> www.taboca.com
>
> --
> You received this message because you are subscribed to the Google Groups
> "mozilla-labs-jetpack" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mozilla-labs-jet...@googlegroups.com.

Will Bamberg

unread,
Mar 17, 2014, 1:01:35 PM3/17/14
to mozilla-la...@googlegroups.com
On 14-03-17 6:17 AM, Marcio Galli wrote:
> On Mon, Mar 17, 2014 at 1:03 AM, Jordan Santell <jsan...@gmail.com> wrote:
>> Marcio -- using the newest modules may require you to use the SDK from the
>> master branch from the GitHub repo (along with Nightly builds) until a later
>> version of the SDK (1.16) is released which will not do checking during
>> build to see if the module exists at the time of the SDK's publishing, and
>> instead rely on what modules are available in Firefox when running.
>>
> Thanks -- I have pushed a note to the following doc on MDN so potential
> contestants can know of this ahead of time:
> https://developer.mozilla.org/en-US/Add-ons/SDK/High-Level_APIs/ui.
> Also sent a pull request to yours README.md.

Thanks Marcio!

Will

Erik Vold

unread,
Mar 17, 2014, 2:45:01 PM3/17/14
to mozilla-la...@googlegroups.com
The SDK 1.16 version (which we will release soon) will address this issue, bug 961846.

To work around this in the meantime you can do:

var button = 'sdk/ui/button/action';
button = require(button);

Erik

Will Bamberg

unread,
Mar 18, 2014, 5:17:14 PM3/18/14
to mozilla-la...@googlegroups.com
An update to this: the feature to attach panels to buttons, and the
feature to add buttons to toolbars, did not make it into Firefox 29 (the
current Beta). Both these features are in Firefox 30 (the current Aurora).

Will

William Marquardt

unread,
Mar 24, 2014, 8:40:50 PM3/24/14
to mozilla-la...@googlegroups.com
the feature to add buttons to toolbars, did not make it into Firefox 29 (the current Beta). Both these features are in Firefox 30 (the current Aurora).
 
 Will FF30 be out before the April 15th deadline? Should entries for the competition use the new modules anyway?
Reply all
Reply to author
Forward
0 new messages