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

Update the jsdoc comments to modern syntax - Part 2 #3698

Merged
merged 3 commits into from
Dec 2, 2016
Merged

Update the jsdoc comments to modern syntax - Part 2 #3698

merged 3 commits into from
Dec 2, 2016

Conversation

brandonocasey
Copy link
Contributor

@brandonocasey brandonocasey commented Oct 20, 2016

Description

  • Add @return and description where missing from functions
  • Add @param and description where missing
  • Remove un-necessary doc comments such as @class and @method
  • Update examples to match current code standards
  • Update descriptions to make more sense across the board
  • Keep all doc comments in a standard format
  • Verify that documentation looked good after running jsdoc
  • document @events and @fires

Files Changed (all others are from the previous PR)

  • src/js/extend.js
  • src/js/fullscreen-api.js
  • src/js/loading-spinner.js
  • src/js/media-error.js
  • src/js/menu/menu-button.js
  • src/js/menu/menu-item.js
  • src/js/menu/menu.js
  • src/js/modal-dialog.js
  • src/js/plugins.js
  • src/js/popup/popup-button.js
  • src/js/popup/popup.js

- src/js/poster-image.js

Requirements Checklist

  • Feature implemented / Bug fixed
  • Reviewed by Two Core Contributors

Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More good stuff.

* @type {Object|undefined}
* @private
* uses the map approach from [Screenful.js]{@link https://github.com/sindresorhus/screenfull.js}.
* The Spec for this is located [here]{@link https://dvcs.w3.org/hg/fullscreen/raw-file/tip/Overview.html}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use this url instead: https://fullscreen.spec.whatwg.org

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for the spec link? right?

@@ -9,15 +9,21 @@ import * as Fn from '../utils/fn.js';
import toTitleCase from '../utils/to-title-case.js';

/**
* A button class with a popup menu
* A Button class for any {@link Menu}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would be good to keep the word "popup" in there

* a constructor for a menu item
*
* @param {Player} player
* the player that this component should ataach to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*attach

* The constructor for Menu
*
* @param {Player} player
* the player that this component should ataach to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*attach

@@ -199,15 +219,23 @@ class ModalDialog extends Component {
}

/**
* Closes the modal.
* Closes the modal, does nothing if the ModalDialog is
8 not open
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 -> *

@brandonocasey
Copy link
Contributor Author

@gkatsev ready for re-review

* constructor for a MenuButton
*
* @param {Player} player
* the player that this component should ataach to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*attach

* but is not a native HTML button.
*
* @param {Player} player
* the player that this component should ataach to
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*ataach

* @fires Component#resize
*
* @param {string} widthOrHeight
8 'width' or 'height'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 -> *

8 'width' or 'height'
*
* @param {number|string} [num]
8 New dimension
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

8 -> *

@brandonocasey brandonocasey added the needs: LGTM Needs one or more additional approvals label Oct 31, 2016
@brandonocasey
Copy link
Contributor Author

@gkatsev made all the requested changes, ran through hemingway, and made this PR not depend on the other. Ready for a last review!

Copy link
Member

@gkatsev gkatsev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A super minor comment, LGTM otherwise.

@@ -100,4 +119,95 @@ for (let errNum = 0; errNum < MediaError.errorTypes.length; errNum++) {
MediaError.prototype[MediaError.errorTypes[errNum]] = errNum;
}

// jsdocs for instance/static members added above
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we note that this is why it will look like the following is doubled? i.e., we have both MediaError#MEDIA_ERROR_CUSTOM (instance) and MediaError.MEDIA_ERROR_CUSTOM (static).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure will do

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(done)

@brandonocasey brandonocasey added confirmed and removed needs: LGTM Needs one or more additional approvals labels Nov 3, 2016
@gkatsev gkatsev modified the milestone: 5.14 Nov 15, 2016
@gkatsev gkatsev merged commit cfc3ed7 into videojs:master Dec 2, 2016
@brandonocasey brandonocasey deleted the chore/modernize-docs-2 branch December 6, 2016 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants