Closed Bug 555180 Opened 14 years ago Closed 13 years ago

integrate into "cfx docs" an "apidoc/annotated sources" module view based on "code illuminated"

Categories

(Add-on SDK Graveyard :: General, enhancement)

enhancement
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: rpl, Assigned: rpl)

References

()

Details

Attachments

(1 file, 3 obsolete files)

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2) Gecko/20100115 Firefox/3.6
Build Identifier: 

This prototype use the existent server side python api and is modeled after the module markdown content generation.

I'm using the existent markdownToHtml instead of the creole parser used in the
original code illuminated, the content is generated browser side as in the current module view, and it's presented as a different module documentation view.


Reproducible: Always
Version: unspecified → 0.3
I'm pretty sure this patch needs some further work on css styles and some small code cleanup (currently I've not integrated code-illuminated css styles because of possible conflicts with current "cfx docs" stylesheets)
Thanks Luca, this looks great!

A few comments:

* I think it might look better if the "Overview | API Doc" line were below the header, so that the header lined up with the "Jetpack SDK Docs" header on the left column. It would be nice if the first line of the sources/docs was also aligned with the baseline of the "Developer Guide" line on the left column.

* For Jetpack packages, we're actually thinking that the markdown documentation will contain the public API documentation as well as any necessary overview information, while the source code mostly contains implementation notes--kind of like how Python's documentation+source is structured. In this vein, maybe "Overview" should be called "Documentation" and "API Docs" should be called "Source Code" or "Annotated Source Code"?

* It would be super cool if the particular section someone was in -- Documentation or Source Code -- was highlighted in the "Documentation | Source Code" selection, so the user knew which one they were currently viewing.

What do you think?
sounds good ;-)

I've attached a patch of the patch ;-)

all styles tweaks applied and bugfixed sourceToApidoc.

It make sense to rename "apidoc" to "annotated_source" into main.js too, isn't it?
Attachment #436331 - Attachment filename: jetpack-illuminated-style-tweaks.css → jetpack-illuminated-style-tweaks.diff
Assigning this to Luca, who seems to be actively working on it.  Luca: please correct me if that's wrong!
Assignee: nobody → luca.greco
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment on attachment 436331 [details] [diff] [review]
jetpack-sdk/code-illuminated style tweaks and annotated sources generation bugfix

Requesting review from Atul on this second patch to make sure it gets on his radar.
Attachment #436331 - Flags: review?(avarma)
(In reply to comment #6)
> Assigning this to Luca, who seems to be actively working on it.  Luca: please
> correct me if that's wrong!

Sure, I'm actively monitor this ticket and I can do a rebase of the patches on my git mirror anytime, if necessary.
I've just rebased and tweaked "module annotated source" patches on the new tip, but I'm not so sure of some points:

* syntax for module "source annotations" and apidoc are different (and I'm not sure developers will be happy of that)
* source annotations and apidoc have different meanings but we (developers) need a good reason to use both methods/syntaxes

If we decide that we don't want two different annotation/apidoc syntax or that the two feature are not sufficiently different, I can rewrite it as a simple "syntax highlighted" view of the module sourcecode.

P.S. if we decide to complete this feature I need to add some documentation, to explain how it works.
Attachment #435142 - Attachment is obsolete: true
Attachment #436331 - Attachment is obsolete: true
Attachment #436331 - Flags: review?(avarma)
Attachment #443381 - Flags: review?(avarma)
Awesome, thanks Luca! Sorry I haven't looked at this yet--I will soon.

Good point about the different methods/syntaxes here.  Hmm.  Another thing I've noticed is that some LLJAPI developers are duplicating their docs, putting them both in the Markdown documentation and in the code, which I thought the jsdoc-like doc parser (see bug 549786) was supposed to circumvent.

Sounds like we may need to discuss this a bit more on the Jetpack google group.
Oh! I just found bug 560656, "Come up with some documentation conventions". I'm gonna go ahead and say that it's blocking this bug.
Depends on: 560656
(In reply to comment #10)
> Good point about the different methods/syntaxes here.  Hmm.  Another thing I've
> noticed is that some LLJAPI developers are duplicating their docs, putting them
> both in the Markdown documentation and in the code, which I thought the
> jsdoc-like doc parser (see bug 549786) was supposed to circumvent.
> 
> Sounds like we may need to discuss this a bit more on the Jetpack google group.

bug 560656

http://groups.google.com/group/mozilla-labs-jetpack/browse_thread/thread/a9fd21bd1009ee1a
Some days ago I started to better analyze the problem and now I've a better idea of the problem and possible solutions:

The main problem is that  jetpack need a proper apidoc, by now every module
needs a separate markdown file and every change in the source needs a context swap to be documented.

It could be simpler and more natural if we could add apidoc comments into the sourcecode (as dietrich suggested some days ago on irc), so I've done a small change into server.py, apiparser.py and main.js to render the current jetpack <api> syntax embedded into the source files.

With some small changes we could use markdown to write developer manuals and tutorials embedded into the jetpack module, and write apidoc comments embedded into the sourcecode as we are used to.
Attachment #443381 - Attachment is obsolete: true
Attachment #444256 - Flags: review?(avarma)
Attachment #443381 - Flags: review?(avarma)
Thanks Luca!

Hmm, so when I apply your patch and go to any of the module documentation pages in jetpack-core, I just get a page with "Module 'foo'" at the top (where foo is the name of the module), but the rest of the content area is empty. It seems to be doing this both on Firefox 3.6 and Safari... Any suggestions?
Ah, nice, so here all the per-module docs are generated straight from the source... Cool.

How would you propose doing things like introductions, tutorials, and so forth? Should those just be contained in specially-formatted comments, or kept in the Markdown files in the docs/ subdirectory?
I've tried to extend package details to a package documentation browser:

https://bugzilla.mozilla.org/attachment.cgi?id=444256&action=diff#a/static-files/js/main.js_sec4

It's just prototyped, so it need some work to better integrate a doc page
navigation section into the package detail view.
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: 0.3 → unspecified
Attachment #444256 - Flags: review?(avarma)
We integrated code highlighting into the documentation a few months ago, so I think this is actually fixed (albeit via a different route).  Please correct me if I'm wrong, however!
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: