Status of Jetpack - What can it do NOW?

<<

JSLover

Posts: 130

Joined: Thu May 19, 2011 4:19 pm

Post Sat May 21, 2011 4:19 pm

Status of Jetpack - What can it do NOW?

Status of Jetpack - What can it do NOW?

    I'm really sorry, if I've overlooked something, but is there a clear-cut place to find out what "Jetpacks" (Jetpack-based Addons) can do NOW?...& what they can't do YET, but is planned? Yes, I could probably scour Bugzilla for hours & find technical jargon...& I've seen the stuff about "JEPs" in a Wiki somewhere, but is there any place that lists, in plain English, what can be done NOW (& what CAN'T be done) in Jetpack-based Addons? I'm not even sure what "Normal" Addons can do, let alone what "Jetpacks" can do.

    For a real-world example, I wanna update/rewrite NoUn Buttons (& give it a better name: "Unmerge Back & Forward Buttons (& Menus)"), it has not been updated for Firefox 4 & the author has stated, in a non-English forum, that he don't plan on updating it (for various reasons) (however, I have not E-mailed him about this yet). So, minimally, I wanna update it so it works on Firefox 4. It's a "non-Jetpack" Addon, so 1st I'll probably just "get it working" on Firefox 4, but in the long-run I'd like to convert it to a Jetpack, so it can be installed without a restart, but I don't know if Jetpacks can "Unmerge" Toolbar buttons...or even add new buttons?

    That sounds like simple functionality (modifying a Toolbar/adding/changing buttons), but can Jetpacks do that yet? Where should I look to find out? Wouldn't this Forum, in a Sticky, be a good place for this plain-English run-down of "What Jetpack can do NOW?".

    Looking at the source of the Jetpack SDK 1.0b5, under addon-sdk-1.0b5\packages\addon-kit\lib, there are these filenames...

      clipboard.js
      context-menu.js
      hotkeys.js
      notifications.js
      page-mod.js
      page-worker.js
      panel.js
      passwords.js
      private-browsing.js
      request.js
      selection.js
      simple-storage.js
      tabs.js
      widget.js
      windows.js
    ...there is "windows.js" but no "toolbars.js", can I modify Toolbars? Plus, windows.js seems to only have stuff about opening/closing windows, not messing with the Toolbars inside those windows.
Jetpack SDK - Don't include/install it in every Addon

    I would also like to take this time to recommend a different approach to installing the Jetpack SDK (for use in Addons, not in Development). Currently, every Jetpack-based Addon includes/installs the entire SDK. I think it would be better, if each Jetpack-based Addon would only include a reference to what SDK version the Addon requires (which version it was created/tested with), then Firefox would install that SDK version for that Addon. If the user installs another Addon, requiring the same Jetpack SDK version, nothing would happen, Firefox would NOT install another copy of the same SDK version...all Addons (using the same version) would just share the 1 copy (of that version). Furthermore, when an Addon is updated & is now based on a new Jetpack SDK version, that new version of the SDK would be installed & the old version of the SDK would be uninstalled (if it's no longer in-use by any other Addons). I think I read somewhere that they might've wanted to do this, but I'm not sure if this is exactly what they meant. This way, only 1 copy of each version of the Jetpack SDK is installed...& all Addons can share that 1 copy.
<<

kwierso

Posts: 116

Joined: Mon Jul 04, 2011 12:26 pm

Post Mon Jul 04, 2011 12:46 pm

Re: Status of Jetpack - What can it do NOW?

Hi, the best place to find out what the SDK can currently do is the documentation found here.

I don't believe there's anything in the SDK itself that allows you to modify the toolbar items like that, but you may want to give one of the third-party libraries located herea shot. (In particular, this one sounds like it would be of use to you.)

As to the packaging of the SDK in add-ons, I believe the current approach is that when the SDK add-ons get built, the builder tools scan the add-on for which modules are used, and then the add-on only packages what is needed for that particular add-on. (I haven't really kept up with this part of the SDK, I know that the builder tools do the scanning and make the list of modules, but it might still be including the full SDK for each add-on.)
<<

JSLover

Posts: 130

Joined: Thu May 19, 2011 4:19 pm

Post Tue Jul 05, 2011 2:19 am

Re: Status of Jetpack - What can it do NOW?

kwierso, thank you for replying! After almost 2 months with no replies, I thought no one would ever reply. I'm kinda shocked that no one from Mozilla or the Jetpack or Addons depts replied.

kwierso wrote:...the best place to find out what the SDK can currently do is the documentation found here.

...yes, I have read the docs, but most of the docs & examples show "how to add a context menu item to translate the selected text". Seeing as there is a "context-menu.js" in the SDK, I could probably figure that out, without docs.

Also, I must say, I find the docs confusing/lacking. The doc pages need to simply list what methods/functions you can call & what properties you can get/set. Let's take the windows docs for example...it says...

Classes
BrowserWindow

A BrowserWindow instance represents a single open window. They can be retrieved from the browserWindows property exported by this module.

...it gives 2 conflicting examples "BrowserWindow" & "browserWindows"...JavaScript is case-sensitive & one has an "s", the other don't...if I never, in my code, need to use "BrowserWindow" then, don't mention it in that context. Just say "To get a list of browser windows, use the browserWindows property from the windows object returned from this module. Example: listofwindows=windows.browserWindows". Now, the examples on the page help to explain what it really means, but the style of the page needs redone. There is not 1 place that lists all the "things" the windows library gives access to...for example, if I'm not misunderstanding the docs, in Jetpack 1.0, this list would be...

    windows.browserWindows
    windows.activate()
    windows.close()
    windows.title
    windows.tabs
    windows.open()
...then it could elaborate on that list of what params the functions take & what they return. I need a simple list of "what I can access". Like a table of contents. I kinda just want a recursive "for (x in <object>)" output. Like "for (x in windows)" then a recursive "for in" with each of those (example: "for (x in windows.browserWindows)"). Something like print_r from php. I (or someone) could probably write a Jetpack, whose only purpose is to list the API the Addon can "see", using "for in" loops, sorta like "live docs" or a "live API reference".

kwierso wrote:...but you may want to give one of the third-party libraries located here a shot.

...just curious, where did you find that?...was I supposed to know that there are "3rd party Jetpack SDKs" available (to fill the gaps in the official SDK API)...where was it linked from?

kwierso wrote:(In particular, this one sounds like it would be of use to you.)

...yes, I think I recently stumbled on that (don't remember how). It does look like exactly what I need! Thx! Any ideas of how to get that into the main SDK API?
<<

kwierso

Posts: 116

Joined: Mon Jul 04, 2011 12:26 pm

Post Tue Jul 05, 2011 7:22 am

Re: Status of Jetpack - What can it do NOW?

Hey, yeah, sorry about the 2 months thing. Didn't even realize this forum section existed. There should hopefully be more people coming here now that someone else linked to it on the Jetpack newsgroup.


If you find the documentation lacking, the best thing you can do is to go to Bugzilla and file a bug against the Add-on SDKproduct's "Documentation" component, telling what you think should be added or changed.

There is a table of contents type of thing in the top-right corner of the "windows" module's documentation page in the "API Reference" box.

There is an (indirect) link to the third-party libraries page from the SDK documentation, but yeah, it really should be more discoverable. If you click the "Jetpack Wiki" link on the left side of the docs, there's an "additional modules" link on the wiki's landing page.

Best way to try to get it into the main SDK is to post elsewhere (as a bug in bugzilla, to the Jetpack group on Google: http://groups.google.com/group/mozilla- ... pics?hl=en , the #jetpack channel on IRC) about how that library really helps you convert that NoUn Buttons add-on into a Jetpack-based add-on. Now that SDK 1.0 is out, the future goals for the SDK are to implement most of the things that are needed to convert the old style of add-on into Jetpacks.

Return to Add-on SDK & Add-on Builder

Who is online

Users browsing this forum: No registered users

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
CA Gen2 style designed by Vjacheslav Trushkin.