Closed Bug 1310752 Opened 8 years ago Closed 4 years ago

Document mozAddonManager

Categories

(Toolkit :: Add-ons Manager, task, P5)

task

Tracking

()

RESOLVED WONTFIX

People

(Reporter: chuck, Unassigned)

Details

(Whiteboard: [documentation] triaged)

We're hoping to make greater use of mozAddonManager in Test Pilot [1], but would very much prefer to not have to crawl through DXR to figure out what it's capable 

It'd be great if we could get documentation that is at least on par with its browser counterpart [2].

[1] https://github.com/mozilla/testpilot/issues/1344
[2] https://developer.mozilla.org/en-US/Add-ons/Add-on_Manager/AddonManager
Priority: -- → P5
Whiteboard: [documentation] triaged
:ddurst Any chance of bumping the priority of this? As time goes on we're making more use of this it would be good to commit to have some basic documentation for APIs that are in widespread use. 

Most recently the TAAR team would like some documentation on what this API can do for purposes of recommendations in AMO and I know the AMO eng team would appreciate having docs too.
Flags: needinfo?(ddurst)
I'm struggling to understand if we're looking for more than what's in https://searchfox.org/mozilla-central/source/dom/webidl/AddonManager.webidl or not. I don't think I'm versed enough in what things are needed that are not called out there...
Flags: needinfo?(ddurst) → needinfo?(scolville)
I think that's a good starting point.

It needs to cover:

permissionPromptsEnabled - Boolean to know if permission prompts are enabled. As an aside - usage of this is probably getting to the point where this can be considered for deprecation.

createInstall()
​​getAddonByID()
​​
To cover the details we would also need documentation of the objects returned by these calls. For example the addon object returned by getAddonByID has the uninstall methods on it.

The docs should also cover the events related to the install/uninstall processes and any other relevant events that might be relevant to mozAddonManager consumers.

Our wrapper code might help in showing some of what is required: https://github.com/mozilla/addons-frontend/blob/master/src/core/addonManager.js
Flags: needinfo?(scolville)
FWIW I think we could probably generate docs from WebIDL for https://firefox-source-docs.mozilla.org/ which uses Sphinx.

WebIDL files tend to have comments, and keeping separate docs up to date is going to be a huge pain.

We use a Sphinx jsdoc plugin to do this for JS, for example:
https://firefox-source-docs.mozilla.org/toolkit/components/extensions/webextensions/reference.html

I'm upping this to provide context for the mozAddonManager conversations, at least.

I don't think we're going to expand the consumers of this, but I do think that the context in which its used has bearing on future decisions and some current concerns.

Type: defect → task
Priority: P5 → P2

We want to phase out this api, and for internal use, the webidl is enough. WONTFIX.

Status: NEW → RESOLVED
Closed: 4 years ago
Priority: P2 → P5
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.