Closed Bug 743586 Opened 12 years ago Closed 12 years ago

Document flow for adding a package as a dependency

Categories

(Add-on SDK Graveyard :: Documentation, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wraithan, Assigned: wbamberg)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:12.0) Gecko/20100101 Firefox/12.0
Build ID: 20120403211507

Steps to reproduce:

I needed to do OAuth from my add-on and found https://github.com/mozilla/oauthorizer which I wanted to use.


Actual results:

I couldn't find any documentation on how to get it included into my add-on or for my add-on to rely on it as an external dependency or really any docs on this topic.


Expected results:

The process for adding a library to an add-on should be documented. Also it should be noted if you add a dependencies section to package.json that the couple packages that are depended on by default are no longer included. So modules like request and such were not available until I added the default includes back.
Component: General → Documentation
We actually do have all of that stuff documented: https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/tutorials/adding-menus.html

That URL may not seem like the obvious place for it, but on this page ( https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/tutorials/index.html ) that's what's linked in the "Using third-party modules" link.

Not sure if that should be changed or if what's there is sufficient to close this bug. Will?
Status: UNCONFIRMED → NEW
Ever confirmed: true
Ah, I didn't see it under tutorials. Googling all around didn't expose how to do this and I ended up having to copy another add-on. I can see this closing this bug. Though after clicking into that tutorial it should probably state its intention on the page so it is more discoverable.

I could be wrong, just my two cents. Feel free to close it, if you think the docs are sufficient.
Attached patch a patchSplinter Review
Add a sentence to clarify that this tutorial is doing double duty.
Assignee: nobody → wbamberg
Attachment #613330 - Flags: review?(dietrich)
Comment on attachment 613330 [details] [diff] [review]
a patch

Review of attachment 613330 [details] [diff] [review]:
-----------------------------------------------------------------

::: doc/dev-guide-source/tutorials/adding-menus.md
@@ +17,4 @@
>  a [`menuitems`](https://github.com/erikvold/menuitems-jplib) package
>  that enables us to add menu items.
>  
> +So this tutorial does double-duty. It shows the general method for

s/So this/This/
Attachment #613330 - Flags: review?(dietrich) → review+
While the patch is fine, the reporter's problem is not well addressed. We might need to highlight this somehow in the navigation, instead of buried in the tutorial itself.
(In reply to Dietrich Ayala (:dietrich) from comment #5)
> While the patch is fine, the reporter's problem is not well addressed. We
> might need to highlight this somehow in the navigation, instead of buried in
> the tutorial itself.

This tutorial is accessed through two different links under https://addons.mozilla.org/en-US/developers/docs/sdk/latest/dev-guide/tutorials/index.html: 

 - "Add a menu item to Firefox"
 - "Using third-party modules"

The idea is that if you're looking for information on using 3rd party modules you'll find that second link.

That piece of navigation (finding "Using third-party modules" from "Tutorials") doesn't, to me, seem any more obscure than finding any of the other tutorials under that page, such as "Unit testing" or "Logging" or "Displaying a popup". So it's not obvious to me how we'd improve that. 

It is a bit jarring that you click this link, then see a tutorial that's not obviously what you were expecting. The sentence I added is supposed to help there, but maybe it's not enough? I could just clone this article, and give it a different title/lead-in for the third-party packages audience. Or I could write another article on third-party packages, but that seems redundant.

Let me know if you think any of those would help, or if you have any other ideas.
Commit pushed to master at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/ac1347181505e52cbdc69e1440d9851c7339781a
Bug 743586 - Document flow for adding a package as a dependency; r=@dietrich
I think Dietrich was persuaded by comment #6, so I'm closing this.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Will, I'm gonna be spinning a 1.7 beta 2 up in a few hours, and your doc improvements in a few bugs are the only real nominees for new stuff getting cherrypicked into stabilization this week.

Do you want this bug's fix to ship in 1.7 or should it wait for 1.8?
Commit pushed to stabilization at https://github.com/mozilla/addon-sdk

https://github.com/mozilla/addon-sdk/commit/85e6768e1b42a0ce790a94da7f181237eb60fb80
Bug 743586 - Document flow for adding a package as a dependency; r=@dietrich
(cherry picked from commit ac1347181505e52cbdc69e1440d9851c7339781a)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: