API docs renderer: handle non-callable API exports

RESOLVED FIXED

Status

Add-on SDK
General
RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: warner, Assigned: warner)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Assignee)

Description

8 years ago
While writing the "self" module's documentation, I found that the API docs renderer is always attaching parentheses to the API object name. "self.data" is an object (with callable properties, like self.data.url() and self.data.load()), but is not itself callable. So the rendered docs are misleading: they make it look like users are meant to invoke "self.data()", which isn't right.

We need to decide upon an appropriate top-level tag for these things (maybe @attribute? or @object?), and change the renderer to only add the parentheses to things that are tagged with @method or @function.

(in fact, I suspect that many of the things exported by jetpack modules will be objects-with-callable-methods, and I wonder if the API docs format really makes that easy to express.. maybe if the tags said something like <api name="data.url"> and @method ?)

(in fact, the right place to start is probably just a list of known @tags and what they're meant to be used for)
(Assignee)

Updated

8 years ago
Assignee: nobody → warner-bugzilla
The Add-on SDK is no longer a Mozilla Labs experiment and has become a big enough project to warrant its own Bugzilla product, so the "Add-on SDK" product has been created for it, and I am moving its bugs to that product.

To filter bugmail related to this change, filter on the word "looptid".
Component: Jetpack SDK → General
Product: Mozilla Labs → Add-on SDK
QA Contact: jetpack-sdk → general
Version: Trunk → unspecified
Will says this is fixed!
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.