Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comment blocks to classes/methods/properties #378

Closed
teddyzeenny opened this issue Jun 3, 2015 · 7 comments
Closed

Add comment blocks to classes/methods/properties #378

teddyzeenny opened this issue Jun 3, 2015 · 7 comments

Comments

@teddyzeenny
Copy link
Contributor

Part of #360

Use YUIDoc format to comment on all classes/methods/properties.

Classes, methods, and properties should have a detailed description above them about what they do and how they are used. If a method/property is clearly self descriptive, no description is needed.

Classes need the @namespace and @class keywords.
Methods need the @method method-name, @param {Type} name Description, @return {Type} Description keywords.
Properties need the @property property-name, @type {Type}, @default default-value.

Computed properties are @property (not @method).

Example:

// app/adapters/basic.js

const { Object: EmberObject } = Ember;

/**
 * This is the parent adapter to be extended by all other adapters. 
 * It provides an abstraction to keep the code browser/environment agnostic. 
 * Adapters are instantiated and injected into Ember objects automatically. 
 * Properties and methods in this parent class need to be overridden.
 * 
 * @namespace Adapters
 * @class Basic
 */
export default EmberObject.extend({

  /**
   * Inspect a specific DOM element. This usually means using
   * the current environment's tools to inspector the element in the DOM tree.
   *
   * For example, in Chrome, `inspect(elem)` will open the Elements tab in dev tools
   * and highlight the element.
   *
   * @method inspectElement
   * @param {DOM Element} elem
   */
  inspectElement function(/* elem */) {},

  /**
   * Indicates whether the current environment
   * supports opening up a specific file for debugging.
   * An example is opening up a resource in the Chrome
   * Devtools "Sources" panel.
   *
   * @property canOpenResource
   * @type {Boolean}
   * @default false
   */
  canOpenResource: false
});
@pete-the-pete
Copy link
Contributor

@teddyzeenny I'd like to help with this, it would be a good way to get to know the code.

@locks
Copy link
Contributor

locks commented Sep 22, 2016

@pete-the-pete are you still interested?

@pete-the-pete
Copy link
Contributor

Yes, still interested, but obviously got busy and forgot about this. I
haven't worked on in since that PR. I can start contributing again next
week, but it someone else is ready to take it, I don't want to be in the
way.

On Thu, Sep 22, 2016 at 7:05 AM, Ricardo Mendes notifications@github.com
wrote:

@pete-the-pete https://github.com/pete-the-pete are you still
interested?


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#378 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAVHgVxUClMZIlorv3Hdeju5WZ3mTtAXks5qsospgaJpZM4E2l4O
.

@locks
Copy link
Contributor

locks commented Sep 23, 2016

@pete-the-pete no worries, this is in the "nice to have" camp so you're not blocking work. See you next week!

HallDJack added a commit to HallDJack/ember-inspector that referenced this issue Nov 8, 2017
@ynotdraw
Copy link

ynotdraw commented Oct 5, 2018

I'd love to lend a hand here!

@RobbieTheWagner
Copy link
Member

@ynotdraw please do! There is a lot of magic and complex code in Inspector, so the more docs the better!

@RobbieTheWagner
Copy link
Member

@ynotdraw let's sync up on what you would like to work on here, and split this into more concrete and manageable chunks of work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants