From 9a07681dc25b563c4a1d39a1eb120e2380b252aa Mon Sep 17 00:00:00 2001 From: Tao Zhou Date: Tue, 17 Dec 2019 09:59:28 +0100 Subject: [PATCH] Replace deprecated `require-jsdoc`, `valid-jsdoc` with jsdoc plugin for eslint Enabled and fixed for `check-alignment`, `implements-on-classes`, `newline-after-description`, `require-param-name`, `require-param-type`, `require-returns-type` and `valid-types`. Change-Id: Icb0533e44e17b10246f1b9d33f8d01f16a1e15a5 --- package.json | 1 + polygerrit-ui/app/.eslintrc.json | 34 +++++++++- .../docs-url-behavior/docs-url-behavior.html | 1 + .../dom-util-behavior/dom-util-behavior.html | 1 + .../gr-change-table-behavior.html | 2 + .../gr-patch-set-behavior.html | 2 + .../gr-url-encoding-behavior.html | 2 + .../rest-client-behavior.html | 6 +- .../safe-types-behavior.html | 2 + .../gr-access-section/gr-access-section.js | 13 ++-- .../gr-admin-group-list.js | 17 ++--- .../admin/gr-admin-view/gr-admin-view.js | 8 +-- .../gr-confirm-delete-item-dialog.js | 4 +- .../gr-create-change-dialog.js | 14 ++--- .../gr-create-group-dialog.js | 6 +- .../gr-create-pointer-dialog.js | 6 +- .../gr-create-repo-dialog.js | 6 +- .../gr-group-audit-log/gr-group-audit-log.js | 6 +- .../gr-group-members/gr-group-members.js | 8 +-- .../app/elements/admin/gr-group/gr-group.js | 4 +- .../admin/gr-permission/gr-permission.js | 13 ++-- .../admin/gr-plugin-list/gr-plugin-list.js | 16 ++--- .../admin/gr-repo-access/gr-repo-access.js | 11 ++-- .../gr-repo-commands/gr-repo-commands.js | 4 +- .../gr-repo-dashboards/gr-repo-dashboards.js | 4 +- .../gr-repo-detail-list.js | 24 +++---- .../admin/gr-repo-list/gr-repo-list.js | 15 ++--- .../gr-repo-plugin-config.js | 4 +- .../app/elements/admin/gr-repo/gr-repo.js | 4 +- .../admin/gr-rule-editor/gr-rule-editor.js | 17 ++--- .../gr-change-list-item.js | 12 ++-- .../gr-change-list-view.js | 43 ++++++------- .../gr-change-list/gr-change-list.js | 38 +++++------ .../gr-dashboard-view/gr-dashboard-view.js | 10 +-- .../gr-user-header/gr-user-header.js | 4 +- .../gr-change-actions/gr-change-actions.js | 16 ++--- .../gr-change-metadata/gr-change-metadata.js | 9 +-- .../gr-change-requirements.js | 4 +- .../change/gr-change-view/gr-change-view.js | 12 ++-- .../change/gr-comment-list/gr-comment-list.js | 8 +-- .../gr-confirm-abandon-dialog.js | 6 +- .../gr-confirm-cherrypick-conflict-dialog.js | 4 +- .../gr-confirm-cherrypick-dialog.js | 4 +- .../gr-confirm-move-dialog.js | 4 +- .../gr-confirm-revert-dialog.js | 4 +- .../gr-confirm-revert-submission-dialog.js | 4 +- .../gr-confirm-submit-dialog.js | 8 +-- .../gr-download-dialog/gr-download-dialog.js | 8 +-- .../gr-file-list-header.js | 7 ++- .../change/gr-file-list/gr-file-list.js | 35 ++++++++--- .../gr-included-in-dialog.js | 4 +- .../change/gr-label-scores/gr-label-scores.js | 4 +- .../elements/change/gr-message/gr-message.js | 14 ++--- .../gr-messages-list/gr-messages-list.js | 9 +-- .../gr-related-changes-list.js | 11 ++-- .../change/gr-reply-dialog/gr-reply-dialog.js | 25 ++++---- .../gr-reviewer-list/gr-reviewer-list.js | 6 +- .../change/gr-thread-list/gr-thread-list.js | 1 + .../gr-upload-help-dialog.js | 4 +- .../gr-account-dropdown.js | 4 +- .../core/gr-error-manager/gr-error-manager.js | 10 +-- .../gr-keyboard-shortcuts-dialog.js | 6 +- .../core/gr-main-header/gr-main-header.js | 10 +-- .../core/gr-navigation/gr-navigation.html | 6 ++ .../core/gr-reporting/gr-reporting.js | 6 ++ .../app/elements/core/gr-router/gr-router.js | 16 +++-- .../core/gr-search-bar/gr-search-bar.js | 8 ++- .../core/gr-smart-search/gr-smart-search.js | 7 ++- .../diff/gr-comment-api/gr-comment-api.js | 19 +++--- .../gr-coverage-layer/gr-coverage-layer.js | 14 ++--- .../diff/gr-diff-builder/gr-diff-builder.html | 1 + .../diff/gr-diff-builder/gr-diff-builder.js | 9 +++ .../diff/gr-diff-cursor/gr-diff-cursor.js | 33 +++++----- .../diff/gr-diff-highlight/gr-annotation.js | 1 + .../gr-diff-highlight/gr-diff-highlight.js | 28 +++++---- .../gr-diff-highlight/gr-range-normalizer.js | 1 + .../diff/gr-diff-host/gr-diff-host.js | 40 ++++++------ .../gr-diff-mode-selector.js | 6 +- .../gr-diff-preferences-dialog.js | 4 +- .../gr-diff-processor/gr-diff-processor.js | 33 +++++----- .../gr-diff-selection/gr-diff-selection.js | 5 +- .../diff/gr-diff-view/gr-diff-view.js | 46 +++++++------- .../elements/diff/gr-diff/gr-diff-group.js | 1 + .../app/elements/diff/gr-diff/gr-diff-line.js | 2 +- .../app/elements/diff/gr-diff/gr-diff.js | 47 ++++++++------ .../gr-patch-range-select.js | 5 +- .../gr-ranged-comment-layer.js | 4 ++ .../gr-selection-action-box.js | 4 +- .../diff/gr-syntax-layer/gr-syntax-layer.js | 17 +++-- .../gr-documentation-search.js | 4 +- .../edit/gr-edit-controls/gr-edit-controls.js | 16 ++--- .../edit/gr-editor-view/gr-editor-view.js | 10 +-- polygerrit-ui/app/elements/gr-app-element.js | 19 +++--- .../gr-attribute-helper.js | 1 + .../plugins/gr-dom-hooks/gr-dom-hooks.js | 2 + .../gr-endpoint-decorator.js | 11 ++-- .../gr-event-helper/gr-event-helper.js | 5 ++ .../gr-popup-interface/gr-popup-interface.js | 2 + .../plugins/gr-styles-api/gr-styles-api.js | 5 +- .../gr-account-info/gr-account-info.js | 4 +- .../gr-agreements-list/gr-agreements-list.js | 4 +- .../gr-change-table-editor.js | 5 +- .../settings/gr-cla-view/gr-cla-view.js | 6 +- .../settings/gr-identities/gr-identities.js | 4 +- .../gr-registration-dialog.js | 4 +- .../gr-settings-view/gr-settings-view.js | 12 ++-- .../shared/gr-account-chip/gr-account-chip.js | 4 +- .../gr-account-label/gr-account-label.js | 6 +- .../shared/gr-account-link/gr-account-link.js | 4 +- .../shared/gr-account-list/gr-account-list.js | 7 ++- .../gr-autocomplete-dropdown.js | 8 +-- .../shared/gr-autocomplete/gr-autocomplete.js | 43 ++++++------- .../elements/shared/gr-avatar/gr-avatar.js | 4 +- .../elements/shared/gr-button/gr-button.js | 6 +- .../gr-comment-thread/gr-comment-thread.js | 63 ++++++++++--------- .../elements/shared/gr-comment/gr-comment.js | 16 ++--- .../gr-confirm-delete-comment-dialog.js | 4 +- .../gr-cursor-manager/gr-cursor-manager.js | 41 +++++++----- .../gr-date-formatter/gr-date-formatter.js | 14 ++--- .../elements/shared/gr-dialog/gr-dialog.js | 4 +- .../gr-download-commands.js | 4 +- .../gr-dropdown-list/gr-dropdown-list.js | 2 + .../shared/gr-dropdown/gr-dropdown.js | 33 +++++++--- .../gr-editable-content.js | 4 +- .../gr-editable-label/gr-editable-label.js | 6 +- .../gr-event-interface/gr-event-interface.js | 1 + .../shared/gr-fixed-panel/gr-fixed-panel.js | 8 +-- .../gr-formatted-text/gr-formatted-text.js | 1 + .../shared/gr-hovercard/gr-hovercard.js | 44 ++++++------- .../gr-annotation-actions-context.js | 3 + .../gr-annotation-actions-js-api.js | 8 +++ .../gr-js-api-interface/gr-api-utils.js | 1 + .../gr-change-actions-js-api.js | 2 + .../gr-change-reply-js-api.js | 1 + .../shared/gr-js-api-interface/gr-gerrit.js | 6 +- .../gr-js-api-interface.js | 4 +- .../gr-plugin-endpoints.js | 3 + .../gr-js-api-interface/gr-plugin-loader.js | 4 ++ .../gr-js-api-interface/gr-plugin-rest-api.js | 2 + .../gr-js-api-interface/gr-public-js-api.js | 5 +- .../app/elements/shared/gr-label/gr-label.js | 4 +- .../gr-labeled-autocomplete.js | 8 +-- .../shared/gr-lib-loader/gr-lib-loader.js | 5 ++ .../shared/gr-limited-text/gr-limited-text.js | 14 ++--- .../shared/gr-linked-chip/gr-linked-chip.js | 4 +- .../shared/gr-list-view/gr-list-view.js | 8 +-- .../elements/shared/gr-overlay/gr-overlay.js | 4 +- .../gr-repo-branch-picker.js | 4 +- .../gr-etag-decorator.js | 2 + .../gr-rest-api-interface.js | 25 +++++--- .../gr-rest-apis/gr-rest-api-helper.js | 5 ++ .../gr-reviewer-updates-parser.js | 5 ++ .../elements/shared/gr-select/gr-select.js | 4 +- .../shared/gr-textarea/gr-textarea.js | 6 +- .../gr-tooltip-content/gr-tooltip-content.js | 4 +- .../shared/revision-info/revision-info.html | 3 + polygerrit-ui/app/lint_test.sh | 2 +- polygerrit-ui/app/types/types.js | 3 + 158 files changed, 905 insertions(+), 651 deletions(-) diff --git a/package.json b/package.json index 2656f74820..600f1ab7be 100644 --- a/package.json +++ b/package.json @@ -7,6 +7,7 @@ "eslint": "^6.6.0", "eslint-config-google": "^0.13.0", "eslint-plugin-html": "^6.0.0", + "eslint-plugin-jsdoc": "^18.4.3", "fried-twinkie": "^0.2.2", "polymer-cli": "^1.9.11", "typescript": "^2.x.x", diff --git a/polygerrit-ui/app/.eslintrc.json b/polygerrit-ui/app/.eslintrc.json index fc9ed58336..472bb3250a 100644 --- a/polygerrit-ui/app/.eslintrc.json +++ b/polygerrit-ui/app/.eslintrc.json @@ -90,13 +90,41 @@ "prefer-const": "error", "prefer-spread": "error", "quote-props": ["error", "consistent-as-needed"], - "require-jsdoc": "off", "semi": [2, "always"], "template-curly-spacing": "error", - "valid-jsdoc": "off" + + "require-jsdoc": 0, + "valid-jsdoc": 0, + "jsdoc/check-alignment": 2, + "jsdoc/check-examples": 0, + "jsdoc/check-indentation": 0, + "jsdoc/check-param-names": 0, + "jsdoc/check-syntax": 0, + "jsdoc/check-tag-names": 0, + "jsdoc/check-types": 0, + "jsdoc/implements-on-classes": 2, + "jsdoc/match-description": 0, + "jsdoc/newline-after-description": 2, + "jsdoc/no-types": 0, + "jsdoc/no-undefined-types": 0, + "jsdoc/require-description": 0, + "jsdoc/require-description-complete-sentence": 0, + "jsdoc/require-example": 0, + "jsdoc/require-hyphen-before-param-description": 0, + "jsdoc/require-jsdoc": 0, + "jsdoc/require-param": 0, + "jsdoc/require-param-description": 0, + "jsdoc/require-param-name": 2, + "jsdoc/require-param-type": 2, + "jsdoc/require-returns": 0, + "jsdoc/require-returns-check": 0, + "jsdoc/require-returns-description": 0, + "jsdoc/require-returns-type": 2, + "jsdoc/valid-types": 2 }, "plugins": [ - "html" + "html", + "jsdoc" ], "settings": { "html/report-bad-indent": "error" diff --git a/polygerrit-ui/app/behaviors/docs-url-behavior/docs-url-behavior.html b/polygerrit-ui/app/behaviors/docs-url-behavior/docs-url-behavior.html index 3361bc8523..05a7a5852d 100644 --- a/polygerrit-ui/app/behaviors/docs-url-behavior/docs-url-behavior.html +++ b/polygerrit-ui/app/behaviors/docs-url-behavior/docs-url-behavior.html @@ -31,6 +31,7 @@ limitations under the License. /** * Get the docs base URL from either the server config or by probing. + * * @param {Object} config The server config. * @param {!Object} restApi A REST API instance * @return {!Promise} A promise that resolves with the docs base diff --git a/polygerrit-ui/app/behaviors/dom-util-behavior/dom-util-behavior.html b/polygerrit-ui/app/behaviors/dom-util-behavior/dom-util-behavior.html index 5daa03286c..1377627ac5 100644 --- a/polygerrit-ui/app/behaviors/dom-util-behavior/dom-util-behavior.html +++ b/polygerrit-ui/app/behaviors/dom-util-behavior/dom-util-behavior.html @@ -25,6 +25,7 @@ limitations under the License. /** * Are any ancestors of the element (or the element itself) members of the * given class. + * * @param {!Element} element * @param {string} className * @param {Element=} opt_stopElement If provided, stop traversing the diff --git a/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior.html b/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior.html index db35a67503..31b9423eae 100644 --- a/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior.html +++ b/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior.html @@ -41,6 +41,7 @@ limitations under the License. /** * Returns the complement to the given column array + * * @param {Array} columns * @return {!Array} */ @@ -63,6 +64,7 @@ limitations under the License. * The Project column was renamed to Repo, but some users may have * preferences that use its old name. If that column is found, rename it * before use. + * * @param {!Array} columns * @return {!Array} If the column was renamed, returns a new array * with the corrected name. Otherwise, it returns the original param. diff --git a/polygerrit-ui/app/behaviors/gr-patch-set-behavior/gr-patch-set-behavior.html b/polygerrit-ui/app/behaviors/gr-patch-set-behavior/gr-patch-set-behavior.html index c2ca081b8d..84d6cab753 100644 --- a/polygerrit-ui/app/behaviors/gr-patch-set-behavior/gr-patch-set-behavior.html +++ b/polygerrit-ui/app/behaviors/gr-patch-set-behavior/gr-patch-set-behavior.html @@ -52,6 +52,7 @@ limitations under the License. /** * Whether the given patch is a numbered parent of a merge (i.e. a negative * number). + * * @param {string|number} n * @return {Boolean} */ @@ -265,6 +266,7 @@ limitations under the License. /** * Convert parent indexes from patch range expressions to numbers. * For example, in a patch range expression `"-3"` becomes `3`. + * * @param {number|string} rangeBase * @return {number} */ diff --git a/polygerrit-ui/app/behaviors/gr-url-encoding-behavior/gr-url-encoding-behavior.html b/polygerrit-ui/app/behaviors/gr-url-encoding-behavior/gr-url-encoding-behavior.html index c4979b5596..0396c4ffe2 100644 --- a/polygerrit-ui/app/behaviors/gr-url-encoding-behavior/gr-url-encoding-behavior.html +++ b/polygerrit-ui/app/behaviors/gr-url-encoding-behavior/gr-url-encoding-behavior.html @@ -25,6 +25,7 @@ limitations under the License. /** * Pretty-encodes a URL. Double-encodes the string, and then replaces * benevolent characters for legibility. + * * @param {string} url * @param {boolean=} replaceSlashes * @return {string} @@ -45,6 +46,7 @@ limitations under the License. * Single decode for URL components. Will decode plus signs ('+') to spaces. * Note: because this function decodes once, it is not the inverse of * encodeURL. + * * @param {string} url * @return {string} */ diff --git a/polygerrit-ui/app/behaviors/rest-client-behavior/rest-client-behavior.html b/polygerrit-ui/app/behaviors/rest-client-behavior/rest-client-behavior.html index 27041f7554..2237866bd8 100644 --- a/polygerrit-ui/app/behaviors/rest-client-behavior/rest-client-behavior.html +++ b/polygerrit-ui/app/behaviors/rest-client-behavior/rest-client-behavior.html @@ -99,9 +99,9 @@ limitations under the License. SKIP_MERGEABLE: 22, /** - * Skip diffstat computation that compute the insertions field (number of lines inserted) and - * deletions field (number of lines deleted) - */ + * Skip diffstat computation that compute the insertions field (number of lines inserted) and + * deletions field (number of lines deleted) + */ SKIP_DIFFSTAT: 23, }, diff --git a/polygerrit-ui/app/behaviors/safe-types-behavior/safe-types-behavior.html b/polygerrit-ui/app/behaviors/safe-types-behavior/safe-types-behavior.html index 43022d9b42..8f08f0caba 100644 --- a/polygerrit-ui/app/behaviors/safe-types-behavior/safe-types-behavior.html +++ b/polygerrit-ui/app/behaviors/safe-types-behavior/safe-types-behavior.html @@ -28,6 +28,7 @@ limitations under the License. /** * Wraps a string to be used as a URL. An error is thrown if the string cannot * be considered safe. + * * @constructor * @param {string} url the unwrapped, potentially unsafe URL. */ @@ -40,6 +41,7 @@ limitations under the License. /** * Get the string representation of the safe URL. + * * @returns {string} */ Gerrit.SafeTypes.SafeUrl.prototype.asString = function() { diff --git a/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section.js b/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section.js index 158e20bcf0..83390fb82d 100644 --- a/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section.js +++ b/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section.js @@ -25,6 +25,7 @@ /** * Fired when a section that was previously added was removed. + * * @event added-section-removed */ @@ -37,15 +38,15 @@ const LABEL = 'Label'; /** - * @appliesMixin Gerrit.AccessMixin - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.AccessMixin + * @appliesMixin Gerrit.FireMixin + */ class GrAccessSection extends Polymer.mixinBehaviors( [ Gerrit.AccessBehavior, /** - * Unused in this element, but called by other elements in tests - * e.g gr-repo-access_test. - */ + * Unused in this element, but called by other elements in tests + * e.g gr-repo-access_test. + */ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( Polymer.LegacyElementMixin( diff --git a/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list.js b/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list.js index e387724986..5a625842c5 100644 --- a/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list.js +++ b/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list.js @@ -18,9 +18,9 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.ListViewMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.ListViewMixin + */ class GrAdminGroupList extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.ListViewBehavior, @@ -40,8 +40,8 @@ }, /** - * Offset of currently visible query results. - */ + * Offset of currently visible query results. + */ _offset: Number, _path: { type: String, @@ -56,9 +56,9 @@ _groups: Array, /** - * Because we request one more than the groupsPerPage, _shownGroups - * may be one less than _groups. - * */ + * Because we request one more than the groupsPerPage, _shownGroups + * may be one less than _groups. + * */ _shownGroups: { type: Array, computed: 'computeShownItems(_groups)', @@ -95,6 +95,7 @@ /** * Opens the create overlay if the route has a hash 'create' + * * @param {!Object} params */ _maybeOpenCreateOverlay(params) { diff --git a/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.js b/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.js index 23c7ae0b35..afc373dcd1 100644 --- a/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.js +++ b/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view.js @@ -20,10 +20,10 @@ const INTERNAL_GROUP_REGEX = /^[\da-f]{40}$/; /** - * @appliesMixin Gerrit.AdminNavMixin - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.AdminNavMixin + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrAdminView extends Polymer.mixinBehaviors( [ Gerrit.AdminNavBehavior, Gerrit.BaseUrlBehavior, diff --git a/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog.js b/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog.js index e257c71f85..7400d2ad3d 100644 --- a/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog.js +++ b/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog.js @@ -24,8 +24,8 @@ }; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrConfirmDeleteItemDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog.js b/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog.js index 31e27932de..eb96794510 100644 --- a/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog.js +++ b/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog.js @@ -21,16 +21,16 @@ const REF_PREFIX = 'refs/heads/'; /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrCreateChangeDialog extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, /** - * Unused in this element, but called by other elements in tests - * e.g gr-repo-commands_test. - */ + * Unused in this element, but called by other elements in tests + * e.g gr-repo-commands_test. + */ Gerrit.FireBehavior, Gerrit.URLEncodingBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog.js b/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog.js index 6b1af9a8a7..40729863c7 100644 --- a/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog.js +++ b/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog.js @@ -18,9 +18,9 @@ 'use strict'; /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrCreateGroupDialog extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, Gerrit.URLEncodingBehavior, diff --git a/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog.js b/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog.js index 56d7bc890a..cf59af885d 100644 --- a/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog.js +++ b/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog.js @@ -23,9 +23,9 @@ }; /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrCreatePointerDialog extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, Gerrit.URLEncodingBehavior, diff --git a/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog.js b/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog.js index fd6dc4ad86..a6da3a12ff 100644 --- a/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog.js +++ b/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog.js @@ -18,9 +18,9 @@ 'use strict'; /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrCreateRepoDialog extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, Gerrit.URLEncodingBehavior, diff --git a/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log.js b/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log.js index e0c980c48c..57b9689e3d 100644 --- a/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log.js +++ b/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log.js @@ -20,9 +20,9 @@ const GROUP_EVENTS = ['ADD_GROUP', 'REMOVE_GROUP']; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.ListViewMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.ListViewMixin + */ class GrGroupAuditLog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.ListViewBehavior, diff --git a/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members.js b/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members.js index 574bc29a75..f3a7ec7bbe 100644 --- a/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members.js +++ b/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members.js @@ -24,10 +24,10 @@ const URL_REGEX = '^(?:[a-z]+:)?//'; /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrGroupMembers extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/admin/gr-group/gr-group.js b/polygerrit-ui/app/elements/admin/gr-group/gr-group.js index 760ab9fafe..6597b4df32 100644 --- a/polygerrit-ui/app/elements/admin/gr-group/gr-group.js +++ b/polygerrit-ui/app/elements/admin/gr-group/gr-group.js @@ -31,8 +31,8 @@ }; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrGroup extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.js b/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.js index e1e7c0ac92..e94b7fcf7b 100644 --- a/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.js +++ b/polygerrit-ui/app/elements/admin/gr-permission/gr-permission.js @@ -25,9 +25,9 @@ ]; /** - * @appliesMixin Gerrit.AccessMixin - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.AccessMixin + * @appliesMixin Gerrit.FireMixin + */ /** * Fired when the permission has been modified or removed. * @@ -35,14 +35,15 @@ */ /** * Fired when a permission that was previously added was removed. + * * @event added-permission-removed */ class GrPermission extends Polymer.mixinBehaviors( [ Gerrit.AccessBehavior, /** - * Unused in this element, but called by other elements in tests - * e.g gr-access-section_test. - */ + * Unused in this element, but called by other elements in tests + * e.g gr-access-section_test. + */ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( Polymer.LegacyElementMixin( diff --git a/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list.js b/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list.js index e0089dca30..262f3d56be 100644 --- a/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list.js +++ b/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list.js @@ -18,9 +18,9 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.ListViewMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.ListViewMixin + */ class GrPluginList extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.ListViewBehavior, @@ -39,8 +39,8 @@ observer: '_paramsChanged', }, /** - * Offset of currently visible query results. - */ + * Offset of currently visible query results. + */ _offset: { type: Number, value: 0, @@ -52,9 +52,9 @@ }, _plugins: Array, /** - * Because we request one more than the pluginsPerPage, _shownPlugins - * maybe one less than _plugins. - * */ + * Because we request one more than the pluginsPerPage, _shownPlugins + * maybe one less than _plugins. + * */ _shownPlugins: { type: Array, computed: 'computeShownItems(_plugins)', diff --git a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js index ffd4751256..bffad1c5d4 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js +++ b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access.js @@ -68,11 +68,11 @@ Defs.projectAccessInput; /** - * @appliesMixin Gerrit.AccessMixin - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.AccessMixin + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrRepoAccess extends Polymer.mixinBehaviors( [ Gerrit.AccessBehavior, Gerrit.BaseUrlBehavior, @@ -356,6 +356,7 @@ /** * As add / delete both can happen in the new section, * so here to make sure it will remove the deleted ones. + * * @see Issue 11339 */ this._recursivelyRemoveDeleted(addRemoveObj.add[k]); diff --git a/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands.js b/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands.js index f85af353e0..db1bd3089d 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands.js +++ b/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands.js @@ -27,8 +27,8 @@ const CREATE_CHANGE_SUCCEEDED_MESSAGE = 'Navigating to change'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrRepoCommands extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards.js b/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards.js index b4d34ae542..f87f119fbf 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards.js +++ b/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrRepoDashboards extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.js b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.js index bacc1e1a14..109aa106cb 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.js +++ b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list.js @@ -25,10 +25,10 @@ const PGP_START = '-----BEGIN PGP SIGNATURE-----'; /** - * @appliesMixin Gerrit.ListViewMixin - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.ListViewMixin + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrRepoDetailList extends Polymer.mixinBehaviors( [ Gerrit.ListViewBehavior, Gerrit.FireBehavior, @@ -48,9 +48,9 @@ observer: '_paramsChanged', }, /** - * The kind of detail we are displaying, possibilities are determined by - * the const DETAIL_TYPES. - */ + * The kind of detail we are displaying, possibilities are determined by + * the const DETAIL_TYPES. + */ detailType: String, _editing: { @@ -66,15 +66,15 @@ value: false, }, /** - * Offset of currently visible query results. - */ + * Offset of currently visible query results. + */ _offset: Number, _repo: Object, _items: Array, /** - * Because we request one more than the projectsPerPage, _shownProjects - * maybe one less than _projects. - */ + * Because we request one more than the projectsPerPage, _shownProjects + * maybe one less than _projects. + */ _shownItems: { type: Array, computed: 'computeShownItems(_items)', diff --git a/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list.js b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list.js index 82bb3e2e3b..3e706b5dbc 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list.js +++ b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.ListViewMixin - */ + * @appliesMixin Gerrit.ListViewMixin + */ class GrRepoList extends Polymer.mixinBehaviors( [ Gerrit.ListViewBehavior, ], Polymer.GestureEventListeners( @@ -38,8 +38,8 @@ }, /** - * Offset of currently visible query results. - */ + * Offset of currently visible query results. + */ _offset: Number, _path: { type: String, @@ -54,9 +54,9 @@ _repos: Array, /** - * Because we request one more than the projectsPerPage, _shownProjects - * maybe one less than _projects. - * */ + * Because we request one more than the projectsPerPage, _shownProjects + * maybe one less than _projects. + * */ _shownRepos: { type: Array, computed: 'computeShownItems(_repos)', @@ -96,6 +96,7 @@ /** * Opens the create overlay if the route has a hash 'create' + * * @param {!Object} params */ _maybeOpenCreateOverlay(params) { diff --git a/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config.js b/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config.js index 86583978b7..69d3281235 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config.js +++ b/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.RepoPluginConfigMixin - */ + * @appliesMixin Gerrit.RepoPluginConfigMixin + */ class GrRepoPluginConfig extends Polymer.mixinBehaviors( [ Gerrit.RepoPluginConfig, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js index 5bd7d27a09..5d24442ce5 100644 --- a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js +++ b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo.js @@ -52,8 +52,8 @@ }; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrRepo extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor.js b/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor.js index 7c0078766d..24e95b6474 100644 --- a/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor.js +++ b/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor.js @@ -25,6 +25,7 @@ /** * Fired when a rule that was previously added was removed. + * * @event added-rule-removed */ @@ -64,18 +65,18 @@ ]; /** - * @appliesMixin Gerrit.AccessMixin - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.AccessMixin + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrRuleEditor extends Polymer.mixinBehaviors( [ Gerrit.AccessBehavior, Gerrit.BaseUrlBehavior, /** - * Unused in this element, but called by other elements in tests - * e.g gr-permission_test. - */ + * Unused in this element, but called by other elements in tests + * e.g gr-permission_test. + */ Gerrit.FireBehavior, Gerrit.URLEncodingBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.js b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.js index 3ce87f8719..dedf88707b 100644 --- a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.js +++ b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.js @@ -25,12 +25,12 @@ }; /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.ChangeTableMixin - * @appliesMixin Gerrit.PathListMixin - * @appliesMixin Gerrit.RESTClientMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.ChangeTableMixin + * @appliesMixin Gerrit.PathListMixin + * @appliesMixin Gerrit.RESTClientMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrChangeListItem extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, Gerrit.ChangeTableBehavior, diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js b/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js index 49aa1ebd35..3d2c1087f3 100644 --- a/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js +++ b/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view.js @@ -30,10 +30,10 @@ const LIMIT_OPERATOR_PATTERN = /\blimit:(\d+)/i; /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrChangeListView extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, Gerrit.FireBehavior, @@ -59,8 +59,8 @@ }, /** - * True when user is logged in. - */ + * True when user is logged in. + */ _loggedIn: { type: Boolean, computed: '_computeLoggedIn(account)', @@ -72,13 +72,14 @@ }, /** - * State persisted across restamps of the element. - * - * Need sub-property declaration since it is used in template before - * assignment. - * @type {{ selectedChangeIndex: (number|undefined) }} - * - */ + * State persisted across restamps of the element. + * + * Need sub-property declaration since it is used in template before + * assignment. + * + * @type {{ selectedChangeIndex: (number|undefined) }} + * + */ viewState: { type: Object, notify: true, @@ -90,29 +91,29 @@ _changesPerPage: Number, /** - * Currently active query. - */ + * Currently active query. + */ _query: { type: String, value: '', }, /** - * Offset of currently visible query results. - */ + * Offset of currently visible query results. + */ _offset: Number, /** - * Change objects loaded from the server. - */ + * Change objects loaded from the server. + */ _changes: { type: Array, observer: '_changesChanged', }, /** - * For showing a "loading..." string during ajax requests. - */ + * For showing a "loading..." string during ajax requests. + */ _loading: { type: Boolean, value: true, diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.js b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.js index 5ac4fcd689..d1136ccdce 100644 --- a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.js +++ b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.js @@ -23,13 +23,13 @@ const MAX_SHORTCUT_CHARS = 5; /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.ChangeTableMixin - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - * @appliesMixin Gerrit.RESTClientMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.ChangeTableMixin + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + * @appliesMixin Gerrit.RESTClientMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrChangeList extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, Gerrit.ChangeTableBehavior, @@ -64,23 +64,23 @@ value: null, }, /** - * An array of ChangeInfo objects to render. - * https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#change-info - */ + * An array of ChangeInfo objects to render. + * https://gerrit-review.googlesource.com/Documentation/rest-api-changes.html#change-info + */ changes: { type: Array, observer: '_changesChanged', }, /** - * ChangeInfo objects grouped into arrays. The sections and changes - * properties should not be used together. - * - * @type {!Array<{ - * name: string, - * query: string, - * results: !Array - * }>} - */ + * ChangeInfo objects grouped into arrays. The sections and changes + * properties should not be used together. + * + * @type {!Array<{ + * name: string, + * query: string, + * results: !Array + * }>} + */ sections: { type: Array, value() { return []; }, diff --git a/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view.js b/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view.js index d699a35b38..0170b0b8c8 100644 --- a/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view.js +++ b/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view.js @@ -20,9 +20,9 @@ const PROJECT_PLACEHOLDER_PATTERN = /\$\{project\}/g; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.RESTClientMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.RESTClientMixin + */ class GrDashboardView extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.RESTClientBehavior, @@ -61,8 +61,8 @@ _results: Array, /** - * For showing a "loading..." string during ajax requests. - */ + * For showing a "loading..." string during ajax requests. + */ _loading: { type: Boolean, value: true, diff --git a/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js b/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js index af8af3f69e..d9e9107fdf 100644 --- a/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js +++ b/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header.js @@ -41,8 +41,8 @@ }, /** - * @type {?{name: ?, email: ?, registered_on: ?}} - */ + * @type {?{name: ?, email: ?, registered_on: ?}} + */ _accountDetails: { type: Object, value: null, diff --git a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js index f2d46bcce6..53a9568a7f 100644 --- a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js +++ b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions.js @@ -193,10 +193,10 @@ const AWAIT_CHANGE_TIMEOUT_MS = 1000; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.PatchSetMixin - * @appliesMixin Gerrit.RESTClientMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.PatchSetMixin + * @appliesMixin Gerrit.RESTClientMixin + */ class GrChangeActions extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.PatchSetBehavior, @@ -214,7 +214,7 @@ /** * Fired when an action is tapped. * - * @event -tap + * @event custom-tap - naming pattern: -tap */ /** @@ -644,8 +644,8 @@ } /** - * @param {string=} actionName - */ + * @param {string=} actionName + */ _deleteAndNotify(actionName) { if (this.actions && this.actions[actionName]) { delete this.actions[actionName]; @@ -886,6 +886,7 @@ /** * Capitalize the first letter and lowecase all others. + * * @param {string} s * @return {string} */ @@ -1413,6 +1414,7 @@ /** * Merge sources of change actions into a single ordered array of action * values. + * * @param {!Array} changeActionsRecord * @param {!Array} revisionActionsRecord * @param {!Array} primariesRecord diff --git a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.js b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.js index e0d9676021..94519b0af6 100644 --- a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.js +++ b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata.js @@ -49,8 +49,8 @@ }; /** - * @appliesMixin Gerrit.RESTClientMixin - */ + * @appliesMixin Gerrit.RESTClientMixin + */ class GrChangeMetadata extends Polymer.mixinBehaviors( [ Gerrit.RESTClientBehavior, ], Polymer.GestureEventListeners( @@ -96,8 +96,8 @@ computed: '_computeHashtagReadOnly(_mutable, change)', }, /** - * @type {Gerrit.PushCertificateValidation} - */ + * @type {Gerrit.PushCertificateValidation} + */ _pushCertificateValidation: { type: Object, computed: '_computePushCertificateValidation(serverConfig, change)', @@ -401,6 +401,7 @@ /** * Get the user with the specified role on the change. Returns null if the * user with that role is the same as the owner. + * * @param {!Object} change * @param {string} role One of the values from _CHANGE_ROLE * @return {Object|null} either an accound or null. diff --git a/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements.js b/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements.js index 2e0332b5aa..346fee3247 100644 --- a/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements.js +++ b/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.RESTClientMixin - */ + * @appliesMixin Gerrit.RESTClientMixin + */ class GrChangeRequirements extends Polymer.mixinBehaviors( [ Gerrit.RESTClientBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js index 12595c5606..5962c2bec2 100644 --- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js +++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.js @@ -64,11 +64,11 @@ const SEND_REPLY_TIMING_LABEL = 'SendReply'; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - * @appliesMixin Gerrit.PatchSetMixin - * @appliesMixin Gerrit.RESTClientMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + * @appliesMixin Gerrit.PatchSetMixin + * @appliesMixin Gerrit.RESTClientMixin + */ class GrChangeView extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.KeyboardShortcutBehavior, @@ -942,6 +942,7 @@ /** * Gets base patch number, if it is a parent try and decide from * preference whether to default to `auto merge`, `Parent 1` or `PARENT`. + * * @param {Object} change * @param {Object} patchRange * @return {number|string} @@ -1415,6 +1416,7 @@ /** * Reload the change. + * * @param {boolean=} opt_isLocationChange Reloads the related changes * when true and ends reporting events that started on location change. * @return {Promise} A promise that resolves when the core data has loaded. diff --git a/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list.js b/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list.js index 60d459e510..3de51a7ed4 100644 --- a/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list.js +++ b/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list.js @@ -18,10 +18,10 @@ 'use strict'; /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.PathListMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.PathListMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrCommentList extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, Gerrit.PathListBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog.js index 6ef5b694f8..eb6f5f3440 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog.js @@ -18,9 +18,9 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + */ class GrConfirmAbandonDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.KeyboardShortcutBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog.js index 669c6b19db..0b3639ffda 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrConfirmCherrypickConflictDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.js index bdc5c10d0a..6b01465684 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog.js @@ -20,8 +20,8 @@ const SUGGESTIONS_LIMIT = 15; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrConfirmCherrypickDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog.js index fb78bfb8da..d595f48198 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog.js @@ -20,8 +20,8 @@ const SUGGESTIONS_LIMIT = 15; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrConfirmMoveDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog.js index e95f2c9e05..379226ac9e 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog.js @@ -21,8 +21,8 @@ 'Unable to find the commit hash of this change.'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrConfirmRevertDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/change/gr-confirm-revert-submission-dialog/gr-confirm-revert-submission-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-revert-submission-dialog/gr-confirm-revert-submission-dialog.js index 6665440696..2413a0ffac 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-revert-submission-dialog/gr-confirm-revert-submission-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-revert-submission-dialog/gr-confirm-revert-submission-dialog.js @@ -22,8 +22,8 @@ const CHANGE_SUBJECT_LIMIT = 50; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrConfirmRevertSubmissionDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js index 05841e9648..b4d3595aa0 100644 --- a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog.js @@ -44,10 +44,10 @@ change: Object, /** - * @type {{ - * label: string, - * }} - */ + * @type {{ + * label: string, + * }} + */ action: Object, }; } diff --git a/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog.js b/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog.js index 9329ba5ea0..72ad5d2c0d 100644 --- a/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog.js @@ -18,10 +18,10 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.PatchSetMixin - * @appliesMixin Gerrit.RESTClientMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.PatchSetMixin + * @appliesMixin Gerrit.RESTClientMixin + */ class GrDownloadDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.PatchSetBehavior, diff --git a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.js b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.js index dded147761..46463d243e 100644 --- a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.js +++ b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.js @@ -22,9 +22,9 @@ const MERGED_STATUS = 'MERGED'; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.PatchSetMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.PatchSetMixin + */ class GrFileListHeader extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.PatchSetBehavior, @@ -183,6 +183,7 @@ /** * Update the patchset description with the rest API. + * * @param {string} desc * @param {?(Event|Node)} e * @return {!Promise} diff --git a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js index 9943192894..5bec680890 100644 --- a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js +++ b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list.js @@ -42,13 +42,13 @@ }; /** - * @appliesMixin Gerrit.AsyncForeachMixin - * @appliesMixin Gerrit.DomUtilMixin - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - * @appliesMixin Gerrit.PatchSetMixin - * @appliesMixin Gerrit.PathListMixin - */ + * @appliesMixin Gerrit.AsyncForeachMixin + * @appliesMixin Gerrit.DomUtilMixin + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + * @appliesMixin Gerrit.PatchSetMixin + * @appliesMixin Gerrit.PathListMixin + */ class GrFileList extends Polymer.mixinBehaviors( [ Gerrit.AsyncForeachBehavior, Gerrit.DomUtilBehavior, @@ -148,9 +148,9 @@ }, /** - * The amount of files added to the shown files list the last time it was - * updated. This is used for reporting the average render time. - */ + * The amount of files added to the shown files list the last time it was + * updated. This is used for reporting the average render time. + */ _reportinShownFilesIncrement: Number, _expandedFilePaths: { @@ -538,6 +538,7 @@ /** * The closure compiler doesn't realize this.specialFilePathCompare is * valid. + * * @suppress {checkTypes} */ _normalizeChangeFilesResponse(response) { @@ -972,6 +973,7 @@ /** * Get a descriptive label for use in the status indicator's tooltip and * ARIA label. + * * @param {string} status * @return {string} */ @@ -1004,6 +1006,7 @@ * entries in the expanded list, then render each diff corresponding in * order by waiting for the previous diff to finish before starting the next * one. + * * @param {!Array} record The splice record in the expanded paths list. */ _expandedPathsChanged(record) { @@ -1048,6 +1051,7 @@ * Given an array of paths and a NodeList of diff elements, render the diff * for each path in order, awaiting the previous render to complete before * continung. + * * @param {!Array} paths * @param {!NodeList} diffElements (GrDiffHostElement) * @param {number} initialCount The total number of paths in the pass. This @@ -1093,6 +1097,7 @@ /** * In the given NodeList of diff elements, find the diff for the given path. + * * @param {string} path * @param {!NodeList} diffElements (GrDiffElement) * @return {!Object|undefined} (GrDiffElement) @@ -1107,6 +1112,7 @@ /** * Reset the comments of a modified thread + * * @param {string} rootId * @param {string} path */ @@ -1153,6 +1159,7 @@ * Update the loading class for the file list rows. The update is inside a * debouncer so that the file list doesn't flash gray when the API requests * are reasonably fast. + * * @param {boolean} loading */ _loadingChanged(loading) { @@ -1178,6 +1185,7 @@ /** * Given a file path, return whether that path should have visible size bars * and be included in the size bars calculation. + * * @param {string} path * @return {boolean} */ @@ -1187,6 +1195,7 @@ /** * Compute size bar layout values from the file list. + * * @return {Gerrit.LayoutStats|undefined} */ _computeSizeBarLayout(shownFilesRecord) { @@ -1221,6 +1230,7 @@ /** * Get the width of the addition bar for a file. + * * @param {Object} file * @param {Gerrit.LayoutStats} stats * @return {number} @@ -1238,6 +1248,7 @@ /** * Get the x-offset of the addition bar for a file. + * * @param {Object} file * @param {Gerrit.LayoutStats} stats * @return {number} @@ -1249,6 +1260,7 @@ /** * Get the width of the deletion bar for a file. + * * @param {Object} file * @param {Gerrit.LayoutStats} stats * @return {number} @@ -1266,6 +1278,7 @@ /** * Get the x-offset of the deletion bar for a file. + * * @param {Gerrit.LayoutStats} stats * @return {number} */ @@ -1302,6 +1315,7 @@ /** * Returns true if none of the inline diffs have been expanded. + * * @return {boolean} */ _noDiffsExpanded() { @@ -1312,6 +1326,7 @@ * Method to call via binding when each file list row is rendered. This * allows approximate detection of when the dom-repeat has completed * rendering. + * * @param {number} index The index of the row being rendered. * @return {string} an empty string. */ diff --git a/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog.js b/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog.js index f0cba0be1f..134ce1005f 100644 --- a/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrIncludedInDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores.js b/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores.js index 2c164f17ae..d2488e43a5 100644 --- a/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores.js +++ b/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores.js @@ -129,8 +129,8 @@ } /** - * @param label {string|undefined} - * @param permittedLabels {Object|undefined} + * @param {string|undefined} label + * @param {Object|undefined} permittedLabels * @return {string} */ _computeLabelAccessClass(label, permittedLabels) { diff --git a/polygerrit-ui/app/elements/change/gr-message/gr-message.js b/polygerrit-ui/app/elements/change/gr-message/gr-message.js index 7c1d66c83f..39438b5775 100644 --- a/polygerrit-ui/app/elements/change/gr-message/gr-message.js +++ b/polygerrit-ui/app/elements/change/gr-message/gr-message.js @@ -21,8 +21,8 @@ const LABEL_TITLE_SCORE_PATTERN = /^([A-Za-z0-9-]+)([+-]\d+)$/; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrMessage extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( @@ -86,14 +86,14 @@ }, /** - * A mapping from label names to objects representing the minimum and - * maximum possible values for that label. - */ + * A mapping from label names to objects representing the minimum and + * maximum possible values for that label. + */ labelExtremes: Object, /** - * @type {{ commentlinks: Array }} - */ + * @type {{ commentlinks: Array }} + */ _projectConfig: Object, // Computed property needed to trigger Polymer value observing. _expanded: { diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js index 92e7cce643..9afb334d05 100644 --- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js +++ b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.js @@ -59,16 +59,16 @@ value: false, }, /** - * The messages after processing and including merged reviewer updates. - */ + * The messages after processing and including merged reviewer updates. + */ _processedMessages: { type: Array, computed: '_computeItems(messages, reviewerUpdates)', observer: '_processedMessagesChanged', }, /** - * The subset of _processedMessages that is visible to the user. - */ + * The subset of _processedMessages that is visible to the user. + */ _visibleMessages: { type: Array, value() { return []; }, @@ -223,6 +223,7 @@ * Computes message author's file comments for change's message. * Method uses this.messages to find next message and relies on messages * to be sorted by date field descending. + * * @param {!Object} changeComments changeComment object, which includes * a method to get all published comments (including robot comments), * which returns a Hash of arrays of comments, filename as key. diff --git a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.js b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.js index 25a56a9b1d..4035115015 100644 --- a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.js +++ b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.js @@ -18,10 +18,10 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.PatchSetMixin - * @appliesMixin Gerrit.RESTClientMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.PatchSetMixin + * @appliesMixin Gerrit.RESTClientMixin + */ class GrRelatedChangesList extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.PatchSetBehavior, @@ -166,6 +166,7 @@ * Determines whether or not the given change has a parent change. If there * is a relation chain, and the change id is not the last item of the * relation chain, there is a parent. + * * @param {number} currentChangeId * @param {!Array} relatedChanges * @return {boolean} @@ -227,6 +228,7 @@ /** * Do the given objects describe the same change? Compares the changes by * their numbers. + * * @see /Documentation/rest-api-changes.html#change-info * @see /Documentation/rest-api-changes.html#related-change-and-commit-info * @param {!Object} a Either ChangeInfo or RelatedChangeAndCommitInfo @@ -244,6 +246,7 @@ * SubmittedTogetherInfo responses) or get the change number from a * RelatedChangeAndCommitInfo (such as those included in a * RelatedChangesInfo response). + * * @see /Documentation/rest-api-changes.html#change-info * @see /Documentation/rest-api-changes.html#related-change-and-commit-info * diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js index eab1c8d8fb..9551a464a2 100644 --- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.js @@ -53,12 +53,12 @@ const SEND_REPLY_TIMING_LABEL = 'SendReply'; /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - * @appliesMixin Gerrit.PatchSetMixin - * @appliesMixin Gerrit.RESTClientMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + * @appliesMixin Gerrit.PatchSetMixin + * @appliesMixin Gerrit.RESTClientMixin + */ class GrReplyDialog extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, Gerrit.FireBehavior, @@ -102,10 +102,10 @@ */ /** - * Fires when the state of the send button (enabled/disabled) changes. - * - * @event send-disabled-changed - */ + * Fires when the state of the send button (enabled/disabled) changes. + * + * @event send-disabled-changed + */ constructor() { super(); @@ -157,8 +157,8 @@ }, permittedLabels: Object, /** - * @type {{ commentlinks: Array }} - */ + * @type {{ commentlinks: Array }} + */ projectConfig: Object, knownLatestState: String, underReview: { @@ -641,6 +641,7 @@ * Generates a function to filter out reviewer/CC entries. When isCCs is * truthy, the function filters out entries that already exist in this._ccs. * When falsy, the function filters entries that exist in this._reviewers. + * * @param {boolean} isCCs * @return {!Function} */ diff --git a/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list.js b/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list.js index 3cc79fa9a7..252a490bb8 100644 --- a/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list.js +++ b/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrReviewerList extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( @@ -110,6 +110,7 @@ /** * Returns hash of labels to max permitted score. + * * @param {!Object} change * @returns {!Object} labels to max permitted scores hash */ @@ -124,6 +125,7 @@ /** * Returns max permitted score for reviewer. + * * @param {!Object} reviewer * @param {!Object} change * @param {string} label diff --git a/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list.js b/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list.js index 3a6b2df01f..de58d72672 100644 --- a/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list.js +++ b/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list.js @@ -65,6 +65,7 @@ * - Unresolved threads without drafts (reverse chronological) * - Resolved threads with drafts (reverse chronological) * - Resolved threads without drafts (reverse chronological) + * * @param {!Object} changeRecord */ _computeSortedThreads(changeRecord) { diff --git a/polygerrit-ui/app/elements/change/gr-upload-help-dialog/gr-upload-help-dialog.js b/polygerrit-ui/app/elements/change/gr-upload-help-dialog/gr-upload-help-dialog.js index a3ae1f995c..9a699ea0a6 100644 --- a/polygerrit-ui/app/elements/change/gr-upload-help-dialog/gr-upload-help-dialog.js +++ b/polygerrit-ui/app/elements/change/gr-upload-help-dialog/gr-upload-help-dialog.js @@ -28,8 +28,8 @@ ]; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrUploadHelpDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown.js b/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown.js index 4f51a02169..6aac157c59 100644 --- a/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown.js +++ b/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown.js @@ -20,8 +20,8 @@ const INTERPOLATE_URL_PATTERN = /\$\{([\w]+)\}/g; /** - * @appliesMixin Gerrit.DisplayNameMixin - */ + * @appliesMixin Gerrit.DisplayNameMixin + */ class GrAccountDropdown extends Polymer.mixinBehaviors( [ Gerrit.DisplayNameBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager.js b/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager.js index 7437187ccc..506cb73540 100644 --- a/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager.js +++ b/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager.js @@ -26,9 +26,9 @@ const AUTHENTICATION_REQUIRED = 'Authentication required\n'; /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.FireMixin + */ class GrErrorManager extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, Gerrit.FireBehavior, @@ -55,8 +55,8 @@ }, /** - * The time (in milliseconds) since the most recent credential check. - */ + * The time (in milliseconds) since the most recent credential check. + */ _lastCredentialCheck: { type: Number, value() { return Date.now(); }, diff --git a/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog.js b/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog.js index e16c975a8b..788c9e068d 100644 --- a/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog.js +++ b/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog.js @@ -20,9 +20,9 @@ const {ShortcutSection} = window.Gerrit.KeyboardShortcutBinder; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + */ class GrKeyboardShortcutsDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.KeyboardShortcutBehavior, diff --git a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.js b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.js index 1ae1e93f74..d009225843 100644 --- a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.js +++ b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.js @@ -70,11 +70,11 @@ ]); /** - * @appliesMixin Gerrit.AdminNavMixin - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.DocsUrlMixin - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.AdminNavMixin + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.DocsUrlMixin + * @appliesMixin Gerrit.FireMixin + */ class GrMainHeader extends Polymer.mixinBehaviors( [ Gerrit.AdminNavBehavior, Gerrit.BaseUrlBehavior, diff --git a/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.html b/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.html index 1d8f04b2bc..e79277a41d 100644 --- a/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.html +++ b/polygerrit-ui/app/elements/core/gr-navigation/gr-navigation.html @@ -224,6 +224,7 @@ limitations under the License. /** * Setup router implementation. + * * @param {function(!string)} navigate the router-abstracted equivalent of * `window.location.href = ...`. Takes a string. * @param {function(!Object): string} generateUrl generates a URL given @@ -260,6 +261,7 @@ limitations under the License. /** * Generate a URL for the given route parameters. + * * @param {Object} params * @return {string} */ @@ -336,6 +338,7 @@ limitations under the License. /** * Navigate to a search for changes with the given status. + * * @param {string} status */ navigateToStatusSearch(status) { @@ -347,6 +350,7 @@ limitations under the License. /** * Navigate to a search query + * * @param {string} query * @param {number=} opt_offset */ @@ -548,6 +552,7 @@ limitations under the License. /** * Navigate to an arbitrary relative URL. + * * @param {string} relativeUrl */ navigateToRelativeUrl(relativeUrl) { @@ -570,6 +575,7 @@ limitations under the License. /** * Navigate to a repo settings page. + * * @param {string} repoName */ navigateToRepo(repoName) { diff --git a/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting.js b/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting.js index 3f2f4bdc5c..b868ec8e8b 100644 --- a/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting.js +++ b/polygerrit-ui/app/elements/core/gr-reporting/gr-reporting.js @@ -212,6 +212,7 @@ /** * The default reporter reports events immediately. + * * @param {string} type * @param {string} category * @param {string} eventName @@ -254,6 +255,7 @@ /** * The caching reporter will queue reports until plugins have loaded, and * log events immediately if they're reported after plugins have loaded. + * * @param {string} type * @param {string} category * @param {string} eventName @@ -437,6 +439,7 @@ /** * Reports just line timeEnd, but additionally reports an average given a * denominator and a separate reporiting name for the average. + * * @param {string} name Timing name. * @param {string} averageName Average timing name. * @param {number} denominator Number by which to divide the total to @@ -455,6 +458,7 @@ /** * Send a timing report with an arbitrary time value. + * * @param {string} name Timing name. * @param {number} time The time to report as an integer of milliseconds. */ @@ -467,6 +471,7 @@ * Get a timer object to for reporing a user timing. The start time will be * the time that the object has been created, and the end time will be the * time that the "end" method is called on the object. + * * @param {string} name Timing name. * @returns {!Object} The timer object. */ @@ -513,6 +518,7 @@ /** * Log timing information for an RPC. + * * @param {string} anonymizedUrl The URL of the RPC with tokens obfuscated. * @param {number} elapsed The time elapsed of the RPC. */ diff --git a/polygerrit-ui/app/elements/core/gr-router/gr-router.js b/polygerrit-ui/app/elements/core/gr-router/gr-router.js index 1ae4e27bfc..e84beb6ead 100644 --- a/polygerrit-ui/app/elements/core/gr-router/gr-router.js +++ b/polygerrit-ui/app/elements/core/gr-router/gr-router.js @@ -106,6 +106,7 @@ /** * Support vestigial params from GWT UI. + * * @see Issue 7673. * @type {!RegExp} */ @@ -162,6 +163,7 @@ * the hash of diff URLs. In this format, a number on its own indicates that * line number in the revision of the diff. A number prefixed by either an 'a' * or a 'b' indicates that line number of the base of the diff. + * * @type {RegExp} */ const LINE_ADDRESS_PATTERN = /^([ab]?)(\d+)$/; @@ -208,11 +210,11 @@ })(); /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.PatchSetMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.PatchSetMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrRouter extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, Gerrit.FireBehavior, @@ -547,6 +549,7 @@ * Given an object of parameters, potentially including a `patchNum` or a * `basePatchNum` or both, return a string representation of that range. If * no range is indicated in the params, the empty string is returned. + * * @param {!Object} params * @return {string} */ @@ -613,6 +616,7 @@ /** * Redirect the user to login using the given return-URL for redirection * after authentication success. + * * @param {string} returnUrl */ _redirectToLogin(returnUrl) { @@ -625,6 +629,7 @@ * Hashes parsed by page.js exclude "inner" hashes, so a URL like "/a#b#c" * is parsed to have a hash of "b" rather than "b#c". Instead, this method * parses hashes correctly. Will return an empty string if there is no hash. + * * @param {!string} canonicalPath * @return {!string} Everything after the first '#' ("a#b#c" -> "b#c"). */ @@ -645,6 +650,7 @@ * Check to see if the user is logged in and return a promise that only * resolves if the user is logged in. If the user us not logged in, the * promise is rejected and the page is redirected to the login flow. + * * @param {!Object} data The parsed route data. * @return {!Promise} A promise yielding the original route data * (if it resolves). diff --git a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.js b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.js index 4ae1f20571..48e8662185 100644 --- a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.js +++ b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.js @@ -104,9 +104,9 @@ const TOKENIZE_REGEX = /(?:[^\s"]+|"[^"]*")+\s*/g; /** - * @appliesMixin Gerrit.KeyboardShortcutMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.KeyboardShortcutMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrSearchBar extends Polymer.mixinBehaviors( [ Gerrit.KeyboardShortcutBehavior, Gerrit.URLEncodingBehavior, @@ -215,6 +215,7 @@ /** * Determine what array of possible suggestions should be provided * to _getSearchSuggestions. + * * @param {string} input - The full search term, in lowercase. * @return {!Promise} This returns a promise that resolves to an array of * suggestion objects. @@ -256,6 +257,7 @@ /** * Get the sorted, pruned list of suggestions for the current search query. + * * @param {string} input - The complete search query. * @return {!Promise} This returns a promise that resolves to an array of * suggestions. diff --git a/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search.js b/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search.js index 03a2c0dfe6..935352f90a 100644 --- a/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search.js +++ b/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search.js @@ -22,8 +22,8 @@ const ME_EXPRESSION = 'me'; /** - * @appliesMixin Gerrit.DisplayNameMixin - */ + * @appliesMixin Gerrit.DisplayNameMixin + */ class GrSmartSearch extends Polymer.mixinBehaviors( [ Gerrit.DisplayNameBehavior, ], Polymer.GestureEventListeners( @@ -76,6 +76,7 @@ /** * Fetch from the API the predicted projects. + * * @param {string} predicate - The first part of the search term, e.g. * 'project' * @param {string} expression - The second part of the search term, e.g. @@ -96,6 +97,7 @@ /** * Fetch from the API the predicted groups. + * * @param {string} predicate - The first part of the search term, e.g. * 'ownerin' * @param {string} expression - The second part of the search term, e.g. @@ -117,6 +119,7 @@ /** * Fetch from the API the predicted accounts. + * * @param {string} predicate - The first part of the search term, e.g. * 'owner' * @param {string} expression - The second part of the search term, e.g. diff --git a/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js b/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js index e84e9960aa..8edc546866 100644 --- a/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js +++ b/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api.js @@ -406,12 +406,13 @@ }; /** - * Whether the given comment should be included in the base side of the - * given patch range. - * @param {!Object} comment - * @param {!Gerrit.PatchRange} range - * @return {boolean} - */ + * Whether the given comment should be included in the base side of the + * given patch range. + * + * @param {!Object} comment + * @param {!Gerrit.PatchRange} range + * @return {boolean} + */ ChangeComments.prototype._isInBaseOfPatchRange = function(comment, range) { // If the base of the patch range is a parent of a merge, and the comment // appears on a specific parent then only show the comment if the parent @@ -439,6 +440,7 @@ /** * Whether the given comment should be included in the revision side of the * given patch range. + * * @param {!Object} comment * @param {!Gerrit.PatchRange} range * @return {boolean} @@ -451,6 +453,7 @@ /** * Whether the given comment should be included in the given patch range. + * * @param {!Object} comment * @param {!Gerrit.PatchRange} range * @return {boolean|undefined} @@ -461,8 +464,8 @@ }; /** - * @appliesMixin Gerrit.PatchSetMixin - */ + * @appliesMixin Gerrit.PatchSetMixin + */ class GrCommentApi extends Polymer.mixinBehaviors( [ Gerrit.PatchSetBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/diff/gr-coverage-layer/gr-coverage-layer.js b/polygerrit-ui/app/elements/diff/gr-coverage-layer/gr-coverage-layer.js index d1df4d0116..201da05508 100644 --- a/polygerrit-ui/app/elements/diff/gr-coverage-layer/gr-coverage-layer.js +++ b/polygerrit-ui/app/elements/diff/gr-coverage-layer/gr-coverage-layer.js @@ -41,13 +41,13 @@ side: String, /** - * We keep track of the line number from the previous annotate() call, - * and also of the index of the coverage range that had matched. - * annotate() calls are coming in with increasing line numbers and - * coverage ranges are sorted by line number. So this is a very simple - * and efficient way for finding the coverage range that matches a given - * line number. - */ + * We keep track of the line number from the previous annotate() call, + * and also of the index of the coverage range that had matched. + * annotate() calls are coming in with increasing line numbers and + * coverage ranges are sorted by line number. So this is a very simple + * and efficient way for finding the coverage range that matches a given + * line number. + */ _lineNumber: { type: Number, value: 0, diff --git a/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.html b/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.html index 01e1f1fa5a..40fbe3c7e4 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.html +++ b/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.html @@ -113,6 +113,7 @@ limitations under the License. * The promise last returned from `render()` while the asynchronous * rendering is running - `null` otherwise. Provides a `cancel()` * method that rejects it with `{isCancelled: true}`. + * * @type {?Object} */ _cancelableRenderPromise: Object, diff --git a/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.js b/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.js index c381a8cb93..92921219a2 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder.js @@ -92,6 +92,7 @@ /** * Abstract method + * * @param {string} outputEl * @param {number} fontSize */ @@ -101,6 +102,7 @@ /** * Abstract method + * * @param {Object} group */ GrDiffBuilder.prototype.buildSectionElement = function() { @@ -469,6 +471,7 @@ /** * Finds the next DIV.contentText element following the given element, and on * the same side. Will only search within a group. + * * @param {HTMLElement} content * @param {string} side Either 'left' or 'right' * @return {HTMLElement} @@ -480,6 +483,7 @@ /** * Determines whether the given group is either totally an addition or totally * a removal. + * * @param {!Object} group (GrDiffGroup) * @return {boolean} */ @@ -492,6 +496,7 @@ /** * Set the blame information for the diff. For any already-rendered line, * re-render its blame cell content. + * * @param {Object} blame */ GrDiffBuilder.prototype.setBlame = function(blame) { @@ -519,6 +524,7 @@ /** * Find the blame cell for a given line number. + * * @param {number} lineNum * @return {HTMLTableDataCellElement} */ @@ -531,6 +537,7 @@ * Given a base line number, return the commit containing that line in the * current set of blame information. If no blame information has been * provided, null is returned. + * * @param {number} lineNum * @return {Object} The commit information. */ @@ -550,6 +557,7 @@ /** * Given the number of a base line, get the content for the blame cell of that * line. If there is no blame information for that line, returns null. + * * @param {number} lineNum * @param {Object=} opt_commit Optionally provide the commit object, so that * it does not need to be searched. @@ -578,6 +586,7 @@ /** * Create a blame cell for the given base line. Blame information will be * included in the cell if available. + * * @param {GrDiffLine} line * @return {HTMLTableDataCellElement} */ diff --git a/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.js b/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.js index fc4173c38e..25f8770272 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor.js @@ -57,33 +57,33 @@ }, /** - * The diff views to cursor through and listen to. - */ + * The diff views to cursor through and listen to. + */ diffs: { type: Array, value() { return []; }, }, /** - * If set, the cursor will attempt to move to the line number (instead of - * the first chunk) the next time the diff renders. It is set back to null - * when used. It should be only used if you want the line to be focused - * after initialization of the component and page should scroll - * to that position. This parameter should be set at most for one gr-diff - * element in the page. - * - * @type (?number) - */ + * If set, the cursor will attempt to move to the line number (instead of + * the first chunk) the next time the diff renders. It is set back to null + * when used. It should be only used if you want the line to be focused + * after initialization of the component and page should scroll + * to that position. This parameter should be set at most for one gr-diff + * element in the page. + * + * @type {?number} + */ initialLineNumber: { type: Number, value: null, }, /** - * The scroll behavior for the cursor. Values are 'never' and - * 'keep-visible'. 'keep-visible' will only scroll if the cursor is beyond - * the viewport. - */ + * The scroll behavior for the cursor. Values are 'never' and + * 'keep-visible'. 'keep-visible' will only scroll if the cursor is beyond + * the viewport. + */ _scrollBehavior: { type: String, value: ScrollBehavior.KEEP_VISIBLE, @@ -201,6 +201,7 @@ /** * Get the line number element targeted by the cursor row and side. + * * @return {?Element|undefined} */ getTargetLineElement() { @@ -290,6 +291,7 @@ * {leftSide: false, number: 123} for line 123 of the revision, or * {leftSide: true, number: 321} for line 321 of the base patch. * Returns null if an address is not available. + * * @return {?Object} */ getAddress() { @@ -414,6 +416,7 @@ /** * Setup and tear down on-render listeners for any diffs that are added or * removed from the cursor. + * * @private */ _diffsChanged(changeRecord) { diff --git a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-annotation.js b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-annotation.js index c5a9cfd591..14c8800176 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-annotation.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-annotation.js @@ -31,6 +31,7 @@ /** * The DOM API textContent.length calculation is broken when the text * contains Unicode. See https://mathiasbynens.be/notes/javascript-unicode . + * * @param {!Text} node text node. * @return {number} The length of the text. */ diff --git a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight.js b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight.js index 88d19aabf9..adb1be86c9 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrDiffHighlight extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( @@ -36,20 +36,20 @@ }, loggedIn: Boolean, /** - * querySelector can return null, so needs to be nullable. - * - * @type {?HTMLElement} - * */ + * querySelector can return null, so needs to be nullable. + * + * @type {?HTMLElement} + * */ _cachedDiffBuilder: Object, /** - * Which range is currently selected by the user. - * Stored in order to add a range-based comment - * later. - * undefined if no range is selected. - * - * @type {{side: string, range: Gerrit.Range}|undefined} - */ + * Which range is currently selected by the user. + * Stored in order to add a range-based comment + * later. + * undefined if no range is selected. + * + * @type {{side: string, range: Gerrit.Range}|undefined} + */ selectedRange: { type: Object, notify: true, @@ -162,6 +162,7 @@ * Merges multiple ranges, accounts for triple click, accounts for * syntax highligh, convert native DOM Range objects to Gerrit concepts * (line, side, etc). + * * @param {Selection} selection * @return {({ * start: { @@ -197,6 +198,7 @@ /** * Normalize a specific DOM Range. + * * @return {!Object} fixed normalized range */ _normalizeRange(domRange) { diff --git a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-range-normalizer.js b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-range-normalizer.js index 0ff63db04f..3b6c41c7cd 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-range-normalizer.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-range-normalizer.js @@ -97,6 +97,7 @@ /** * The DOM API textContent.length calculation is broken when the text * contains Unicode. See https://mathiasbynens.be/notes/javascript-unicode . + * * @param {text} node A text node. * @return {number} The length of the text. */ diff --git a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.js b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.js index d7a1537a3d..7d78212e3e 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host.js @@ -69,9 +69,9 @@ }; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.PatchSetMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.PatchSetMixin + */ /** * Wrapper around gr-diff. * @@ -87,6 +87,7 @@ static get is() { return 'gr-diff-host'; } /** * Fired when the user selects a line. + * * @event line-selected */ @@ -155,20 +156,21 @@ }, /** - * Special line number which should not be collapsed into a shared region. - * @type {{ - * number: number, - * leftSide: {boolean} - * }|null} - */ + * Special line number which should not be collapsed into a shared region. + * + * @type {{ + * number: number, + * leftSide: {boolean} + * }|null} + */ lineOfInterest: Object, /** - * If the diff fails to load, show the failure message in the diff rather - * than bubbling the error up to the whole page. This is useful for when - * loading inline diffs because one diff failing need not mark the whole - * page with a failure. - */ + * If the diff fails to load, show the failure message in the diff rather + * than bubbling the error up to the whole page. This is useful for when + * loading inline diffs because one diff failing need not mark the whole + * page with a failure. + */ showLoadFailure: Boolean, isBlameLoaded: { @@ -198,8 +200,8 @@ /** @type {?Object} */ _revisionImage: Object, /** - * This is a DiffInfo object. - */ + * This is a DiffInfo object. + */ diff: { type: Object, notify: true, @@ -212,8 +214,8 @@ }, /** - * @type {!Array} - */ + * @type {!Array} + */ _coverageRanges: { type: Array, value: () => [], @@ -454,6 +456,7 @@ /** * Load and display blame information for the base of the diff. + * * @return {Promise} A promise that resolves when blame finishes rendering. */ loadBlame() { @@ -476,6 +479,7 @@ /** * The thread elements in this diff, in no particular order. + * * @return {!Array} */ getThreadEls() { diff --git a/polygerrit-ui/app/elements/diff/gr-diff-mode-selector/gr-diff-mode-selector.js b/polygerrit-ui/app/elements/diff/gr-diff-mode-selector/gr-diff-mode-selector.js index 8d8785a5ef..ae7ef6d211 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-mode-selector/gr-diff-mode-selector.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-mode-selector/gr-diff-mode-selector.js @@ -30,9 +30,9 @@ }, /** - * If set to true, the user's preference will be updated every time a - * button is tapped. Don't set to true if there is no user. - */ + * If set to true, the user's preference will be updated every time a + * button is tapped. Don't set to true if there is no user. + */ saveOnChange: { type: Boolean, value: false, diff --git a/polygerrit-ui/app/elements/diff/gr-diff-preferences-dialog/gr-diff-preferences-dialog.js b/polygerrit-ui/app/elements/diff/gr-diff-preferences-dialog/gr-diff-preferences-dialog.js index 2d793114db..7ed27dd5a5 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-preferences-dialog/gr-diff-preferences-dialog.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-preferences-dialog/gr-diff-preferences-dialog.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrDiffPreferencesDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.js b/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.js index 817da453e1..0b46d75229 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-processor/gr-diff-processor.js @@ -73,30 +73,30 @@ return { /** - * The amount of context around collapsed groups. - */ + * The amount of context around collapsed groups. + */ context: Number, /** - * The array of groups output by the processor. - */ + * The array of groups output by the processor. + */ groups: { type: Array, notify: true, }, /** - * Locations that should not be collapsed, including the locations of - * comments. - */ + * Locations that should not be collapsed, including the locations of + * comments. + */ keyLocations: { type: Object, value() { return {left: {}, right: {}}; }, }, /** - * The maximum number of lines to process synchronously. - */ + * The maximum number of lines to process synchronously. + */ _asyncThreshold: { type: Number, value: 64, @@ -105,11 +105,12 @@ /** @type {?number} */ _nextStepHandle: Number, /** - * The promise last returned from `process()` while the asynchronous - * processing is running - `null` otherwise. Provides a `cancel()` - * method that rejects it with `{isCancelled: true}`. - * @type {?Object} - */ + * The promise last returned from `process()` while the asynchronous + * processing is running - `null` otherwise. Provides a `cancel()` + * method that rejects it with `{isCancelled: true}`. + * + * @type {?Object} + */ _processPromise: { type: Object, value: null, @@ -139,6 +140,7 @@ /** * Asynchronously process the diff chunks into groups. As it processes, it * will splice groups into the `groups` property of the component. + * * @param {!Array} chunks * @param {boolean} isBinary * @return {!Promise>} A promise that resolves with an @@ -464,6 +466,7 @@ * In order to show key locations, such as comments, out of the bounds of * the selected context, treat them as separate chunks within the model so * that the content (and context surrounding it) renders correctly. + * * @param {!Array} chunks DiffContents as returned from server. * @return {!Array} Finer grained DiffContents. */ @@ -607,6 +610,7 @@ * If a group is an addition or a removal, break it down into smaller groups * of that type using the MAX_GROUP_SIZE. If the group is a shared chunk * or a delta it is returned as the single element of the result array. + * * @param {!Gerrit.DiffChunk} chunk A raw chunk from a diff response. * @return {!Array>} */ @@ -636,6 +640,7 @@ /** * Given an array and a size, return an array of arrays where no inner array * is larger than that size, preserving the original order. + * * @param {!Array} array * @param {number} size * @return {!Array>} diff --git a/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection.js b/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection.js index 0dc0fba7cb..37d54c9bf4 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection.js @@ -31,8 +31,8 @@ const getNewCache = () => { return {left: null, right: null}; }; /** - * @appliesMixin Gerrit.DomUtilMixin - */ + * @appliesMixin Gerrit.DomUtilMixin + */ class GrDiffSelection extends Polymer.mixinBehaviors( [ Gerrit.DomUtilBehavior, ], Polymer.GestureEventListeners( @@ -131,6 +131,7 @@ /** * Set the provided list of classes on the element, to the exclusion of all * other SelectionClass values. + * * @param {!Array} targetClasses */ _setClasses(targetClasses) { diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js index 2f2b386322..883fa01fe7 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js +++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view.js @@ -34,12 +34,12 @@ }; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - * @appliesMixin Gerrit.PatchSetMixin - * @appliesMixin Gerrit.PathListMixin - * @appliesMixin Gerrit.RESTClientMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + * @appliesMixin Gerrit.PatchSetMixin + * @appliesMixin Gerrit.PathListMixin + * @appliesMixin Gerrit.RESTClientMixin + */ class GrDiffView extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.KeyboardShortcutBehavior, @@ -76,8 +76,8 @@ value() { return document.body; }, }, /** - * @type {{ diffMode: (string|undefined) }} - */ + * @type {{ diffMode: (string|undefined) }} + */ changeViewState: { type: Object, notify: true, @@ -97,20 +97,20 @@ /** @type {?} */ _commitRange: Object, /** - * @type {{ - * subject: string, - * project: string, - * revisions: string, - * }} - */ + * @type {{ + * subject: string, + * project: string, + * revisions: string, + * }} + */ _change: Object, /** @type {?} */ _changeComments: Object, _changeNum: String, /** - * This is a DiffInfo object. - * This is retrieved and owned by a child component. - */ + * This is a DiffInfo object. + * This is retrieved and owned by a child component. + */ _diff: Object, // An array specifically formatted to be used in a gr-dropdown-list // element for selected a file to view. @@ -152,17 +152,17 @@ _filesWeblinks: Object, /** - * Map of paths in the current change and patch range that have comments - * or drafts or robot comments. - */ + * Map of paths in the current change and patch range that have comments + * or drafts or robot comments. + */ _commentMap: Object, _commentsForDiff: Object, /** - * Object to contain the path of the next and previous file in the current - * change and patch range that has comments. - */ + * Object to contain the path of the next and previous file in the current + * change and patch range that has comments. + */ _commentSkips: { type: Object, computed: '_computeCommentSkips(_commentMap, _fileList, _path)', diff --git a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff-group.js b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff-group.js index 6bd4f55e6d..46ea159e0b 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff-group.js +++ b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff-group.js @@ -36,6 +36,7 @@ /** * True means all changes in this line are whitespace changes that should * not be highlighted as changed as per the user settings. + * * @type{boolean} */ this.ignoredWhitespaceOnly = false; diff --git a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff-line.js b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff-line.js index b64385d7d6..16d234bd26 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff-line.js +++ b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff-line.js @@ -37,7 +37,7 @@ /** @type {boolean} */ this.hasIntralineInfo = false; - /** @type Array */ + /** @type {!Array} */ this.highlights = []; /** @type {?Array} ?Array */ diff --git a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.js b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.js index efcf81e793..de23c37321 100644 --- a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.js +++ b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff.js @@ -92,9 +92,9 @@ const RENDER_DIFF_TABLE_DEBOUNCE_NAME = 'renderDiffTable'; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.PatchSetMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.PatchSetMixin + */ class GrDiff extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.PatchSetBehavior, @@ -104,6 +104,7 @@ static get is() { return 'gr-diff'; } /** * Fired when the user selects a line. + * * @event line-selected */ @@ -186,7 +187,7 @@ observer: '_viewModeObserver', }, - /** @type ?Gerrit.LineOfInterest */ + /** @type {?Gerrit.LineOfInterest} */ lineOfInterest: Object, loading: { @@ -218,13 +219,13 @@ revisionImage: Object, /** - * Whether the safety check for large diffs when whole-file is set has - * been bypassed. If the value is null, then the safety has not been - * bypassed. If the value is a number, then that number represents the - * context preference to use when rendering the bypassed diff. - * - * @type (number|null) - */ + * Whether the safety check for large diffs when whole-file is set has + * been bypassed. If the value is null, then the safety has not been + * bypassed. If the value is a number, then that number represents the + * context preference to use when rendering the bypassed diff. + * + * @type {number|null} + */ _safetyBypass: { type: Number, value: null, @@ -255,18 +256,20 @@ _diffLength: Number, /** - * Observes comment nodes added or removed after the initial render. - * Can be used to unregister when the entire diff is (re-)rendered or upon - * detachment. - * @type {?PolymerDomApi.ObserveHandle} - */ + * Observes comment nodes added or removed after the initial render. + * Can be used to unregister when the entire diff is (re-)rendered or upon + * detachment. + * + * @type {?PolymerDomApi.ObserveHandle} + */ _incrementalNodeObserver: Object, /** - * Observes comment nodes added or removed at any point. - * Can be used to unregister upon detachment. - * @type {?PolymerDomApi.ObserveHandle} - */ + * Observes comment nodes added or removed at any point. + * Can be used to unregister upon detachment. + * + * @type {?PolymerDomApi.ObserveHandle} + */ _nodeObserver: Object, /** Set by Polymer. */ @@ -610,6 +613,7 @@ /** * Gets or creates a comment thread group for a specific line and side on a * diff. + * * @param {!Object} contentEl * @param {!Gerrit.DiffSide} commentSide * @return {!Node} @@ -909,6 +913,7 @@ /** * Find the last chunk for the given side. + * * @param {!Object} diff * @param {boolean} leftSide true if checking the base of the diff, * false if testing the revision. @@ -945,6 +950,7 @@ /** * Check whether the specified side of the diff has a trailing newline. + * * @param {!Object} diff * @param {boolean} leftSide true if checking the base of the diff, * false if testing the revision. @@ -995,6 +1001,7 @@ /** * Get the approximate length of the diff as the sum of the maximum * length of the chunks. + * * @param {Object} diff object * @return {number} */ diff --git a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js index 01a8df3678..88c3a0ea53 100644 --- a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js +++ b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js @@ -21,8 +21,8 @@ const PATCH_DESC_MAX_LENGTH = 500; /** - * @appliesMixin Gerrit.PatchSetMixin - */ + * @appliesMixin Gerrit.PatchSetMixin + */ /** * Fired when the patch range changes * @@ -186,6 +186,7 @@ * The basePatchNum should always be <= patchNum -- because sortedRevisions * is sorted in reverse order (higher patchset nums first), invalid base * patch nums have an index greater than the index of patchNum. + * * @param {number|string} basePatchNum The possible base patch num. * @param {number|string} patchNum The current selected patch num. * @param {!Array} sortedRevisions diff --git a/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer.js b/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer.js index 7ee6492575..8fc16f51f1 100644 --- a/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer.js +++ b/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer.js @@ -63,6 +63,7 @@ /** * Layer method to add annotations to a line. + * * @param {!HTMLElement} el The DIV.contentText element to apply the * annotation to. * @param {!HTMLElement} lineNumberEl @@ -90,6 +91,7 @@ /** * Register a listener for layer updates. + * * @param {function(number, number, string)} fn The update handler function. * Should accept as arguments the line numbers for the start and end of * the update and the side as a string. @@ -100,6 +102,7 @@ /** * Notify Layer listeners of changes to annotations. + * * @param {number} start The line where the update starts. * @param {number} end The line where the update ends. * @param {string} side The side of the update. ('left' or 'right') @@ -113,6 +116,7 @@ /** * Handle change in the ranges by updating the ranges maps and by * emitting appropriate update notifications. + * * @param {Object} record The change record. */ _handleCommentRangesChange(record) { diff --git a/polygerrit-ui/app/elements/diff/gr-selection-action-box/gr-selection-action-box.js b/polygerrit-ui/app/elements/diff/gr-selection-action-box/gr-selection-action-box.js index 3ef9105715..261cd4d358 100644 --- a/polygerrit-ui/app/elements/diff/gr-selection-action-box/gr-selection-action-box.js +++ b/polygerrit-ui/app/elements/diff/gr-selection-action-box/gr-selection-action-box.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrSelectionActionBox extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js b/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js index 8ef946c116..2e7325c6da 100644 --- a/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js +++ b/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer.js @@ -163,11 +163,12 @@ /** @type {?number} */ _processHandle: Number, /** - * The promise last returned from `process()` while the asynchronous - * processing is running - `null` otherwise. Provides a `cancel()` - * method that rejects it with `{isCancelled: true}`. - * @type {?Object} - */ + * The promise last returned from `process()` while the asynchronous + * processing is running - `null` otherwise. Provides a `cancel()` + * method that rejects it with `{isCancelled: true}`. + * + * @type {?Object} + */ _processPromise: { type: Object, value: null, @@ -187,6 +188,7 @@ /** * Annotation layer method to add syntax annotations to the given element * for the given line. + * * @param {!HTMLElement} el * @param {!HTMLElement} lineNumberEl * @param {!Object} line (GrDiffLine) @@ -231,6 +233,7 @@ /** * Start processing syntax for the loaded diff and notify layer listeners * as syntax info comes online. + * * @return {Promise} */ process() { @@ -328,6 +331,7 @@ * Take a string of HTML with the (potentially nested) syntax markers * Highlight.js emits and emit a list of text ranges and classes for the * markers. + * * @param {string} str The string of HTML. * @param {Map>} rangesCache A map for caching * ranges for each string. A cache is read and written by this method. @@ -372,6 +376,7 @@ /** * For a given state, process the syntax for the next line (or pair of * lines). + * * @param {!Object} state The processing state for the layer. */ _processNextLine(state, rangesCache) { @@ -488,6 +493,7 @@ /** * Tells whether the state has exhausted its current section. + * * @param {!Object} state * @return {boolean} */ @@ -504,6 +510,7 @@ /** * For a given state, notify layer listeners of any processed line ranges * that have not yet been notified. + * * @param {!Object} state */ _notify(state) { diff --git a/polygerrit-ui/app/elements/documentation/gr-documentation-search/gr-documentation-search.js b/polygerrit-ui/app/elements/documentation/gr-documentation-search/gr-documentation-search.js index 779b16fb3b..f317459159 100644 --- a/polygerrit-ui/app/elements/documentation/gr-documentation-search/gr-documentation-search.js +++ b/polygerrit-ui/app/elements/documentation/gr-documentation-search/gr-documentation-search.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.ListViewMixin - */ + * @appliesMixin Gerrit.ListViewMixin + */ class GrDocumentationSearch extends Polymer.mixinBehaviors( [ Gerrit.ListViewBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls.js b/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls.js index 6a585e1782..052c51c2fa 100644 --- a/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls.js +++ b/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.PatchSetMixin - */ + * @appliesMixin Gerrit.PatchSetMixin + */ class GrEditControls extends Polymer.mixinBehaviors( [ Gerrit.PatchSetBehavior, ], Polymer.GestureEventListeners( @@ -33,11 +33,11 @@ patchNum: String, /** - * TODO(kaspern): by default, the RESTORE action should be hidden in the - * file-list as it is a per-file action only. Remove this default value - * when the Actions dictionary is moved to a shared constants file and - * use the hiddenActions property in the parent component. - */ + * TODO(kaspern): by default, the RESTORE action should be hidden in the + * file-list as it is a per-file action only. Remove this default value + * when the Actions dictionary is moved to a shared constants file and + * use the hiddenActions property in the parent component. + */ hiddenActions: { type: Array, value() { return [GrEditConstants.Actions.RESTORE.id]; }, @@ -117,6 +117,7 @@ /** * Given a path string, checks that it is a valid file path. + * * @param {string} path * @return {boolean} */ @@ -131,6 +132,7 @@ /** * Given a dom event, gets the dialog that lies along this event path. + * * @param {!Event} e * @return {!Element|undefined} */ diff --git a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.js b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.js index ab509218e5..aaafa46302 100644 --- a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.js +++ b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view.js @@ -25,11 +25,11 @@ const STORAGE_DEBOUNCE_INTERVAL_MS = 100; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - * @appliesMixin Gerrit.PatchSetMixin - * @appliesMixin Gerrit.PathListMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + * @appliesMixin Gerrit.PatchSetMixin + * @appliesMixin Gerrit.PathListMixin + */ class GrEditorView extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.KeyboardShortcutBehavior, diff --git a/polygerrit-ui/app/elements/gr-app-element.js b/polygerrit-ui/app/elements/gr-app-element.js index 1e86acc285..14570f2145 100644 --- a/polygerrit-ui/app/elements/gr-app-element.js +++ b/polygerrit-ui/app/elements/gr-app-element.js @@ -18,9 +18,9 @@ 'use strict'; /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + */ class GrAppElement extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, Gerrit.KeyboardShortcutBehavior, @@ -51,18 +51,19 @@ }, /** - * The last time the g key was pressed in milliseconds (or a keydown event - * was handled if the key is held down). - * @type {number|null} - */ + * The last time the g key was pressed in milliseconds (or a keydown event + * was handled if the key is held down). + * + * @type {number|null} + */ _lastGKeyPressTimestamp: { type: Number, value: null, }, /** - * @type {{ plugin: Object }} - */ + * @type {{ plugin: Object }} + */ _serverConfig: Object, _version: String, _showChangeListView: Boolean, diff --git a/polygerrit-ui/app/elements/plugins/gr-attribute-helper/gr-attribute-helper.js b/polygerrit-ui/app/elements/plugins/gr-attribute-helper/gr-attribute-helper.js index df71da616a..358fba7e58 100644 --- a/polygerrit-ui/app/elements/plugins/gr-attribute-helper/gr-attribute-helper.js +++ b/polygerrit-ui/app/elements/plugins/gr-attribute-helper/gr-attribute-helper.js @@ -28,6 +28,7 @@ /** * Returns true if the property is defined on wrapped element. + * * @param {string} name * @return {boolean} */ diff --git a/polygerrit-ui/app/elements/plugins/gr-dom-hooks/gr-dom-hooks.js b/polygerrit-ui/app/elements/plugins/gr-dom-hooks/gr-dom-hooks.js index 230be0e03a..2d07382b1f 100644 --- a/polygerrit-ui/app/elements/plugins/gr-dom-hooks/gr-dom-hooks.js +++ b/polygerrit-ui/app/elements/plugins/gr-dom-hooks/gr-dom-hooks.js @@ -76,6 +76,7 @@ /** * Get instance of last DOM hook element attached into the endpoint. * Returns a Promise, that's resolved when attachment is done. + * * @return {!Promise} */ GrDomHook.prototype.getLastAttached = function() { @@ -108,6 +109,7 @@ /** * Install a new callback to invoke when a new instance of DOM hook element * is attached. + * * @param {function(Element)} callback */ GrDomHook.prototype.onAttached = function(callback) { diff --git a/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js b/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js index 994271610a..b98833e47c 100644 --- a/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js +++ b/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator.js @@ -33,11 +33,12 @@ value() { return new Map(); }, }, /** - * This map prevents importing the same endpoint twice. - * Without caching, if a plugin is loaded after the loaded plugins - * callback fires, it will be imported twice and appear twice on the page. - * @type {!Map} - */ + * This map prevents importing the same endpoint twice. + * Without caching, if a plugin is loaded after the loaded plugins + * callback fires, it will be imported twice and appear twice on the page. + * + * @type {!Map} + */ _initializedPlugins: { type: Map, value() { return new Map(); }, diff --git a/polygerrit-ui/app/elements/plugins/gr-event-helper/gr-event-helper.js b/polygerrit-ui/app/elements/plugins/gr-event-helper/gr-event-helper.js index 9da9c86e02..845c1e1794 100644 --- a/polygerrit-ui/app/elements/plugins/gr-event-helper/gr-event-helper.js +++ b/polygerrit-ui/app/elements/plugins/gr-event-helper/gr-event-helper.js @@ -25,6 +25,7 @@ /** * Add a callback to arbitrary event. * The callback may return false to prevent event bubbling. + * * @param {string} event Event name * @param {function(Event):boolean} callback * @return {function()} Unsubscribe function. @@ -35,6 +36,7 @@ /** * Alias of onClick + * * @see onClick */ GrEventHelper.prototype.onTap = function(callback) { @@ -44,6 +46,7 @@ /** * Add a callback to element click or touch. * The callback may return false to prevent event bubbling. + * * @param {function(Event):boolean} callback * @return {function()} Unsubscribe function. */ @@ -53,6 +56,7 @@ /** * Alias of captureClick + * * @see captureClick */ GrEventHelper.prototype.captureTap = function(callback) { @@ -64,6 +68,7 @@ * Callback is installed on parent during capture phase. * https://www.w3.org/TR/DOM-Level-3-Events/#event-flow * The callback may return false to cancel regular event listeners. + * * @param {function(Event):boolean} callback * @return {function()} Unsubscribe function. */ diff --git a/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-popup-interface.js b/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-popup-interface.js index e3f869481a..5418267c6c 100644 --- a/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-popup-interface.js +++ b/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-popup-interface.js @@ -22,6 +22,7 @@ * Provides method for opening and closing popups from plugin. * opt_moduleName is a name of custom element that will be automatically * inserted on popup opening. + * * @param {!Object} plugin * @param {opt_moduleName=} string */ @@ -40,6 +41,7 @@ * Opens the popup, inserts it into DOM over current UI. * Creates the popup if not previously created. Creates popup content element, * if it was provided with constructor. + * * @returns {!Promise} */ GrPopupInterface.prototype.open = function() { diff --git a/polygerrit-ui/app/elements/plugins/gr-styles-api/gr-styles-api.js b/polygerrit-ui/app/elements/plugins/gr-styles-api/gr-styles-api.js index 7473e88fe5..aedd658455 100644 --- a/polygerrit-ui/app/elements/plugins/gr-styles-api/gr-styles-api.js +++ b/polygerrit-ui/app/elements/plugins/gr-styles-api/gr-styles-api.js @@ -33,6 +33,7 @@ * if it hasn't been added yet. A root node is an document or is the * associated shadowRoot. This class can be added to any element with the same * root node. + * * @param {HTMLElement} element The element to get class name for. * @return {string} Appropriate class name for the element is returned */ @@ -56,6 +57,7 @@ /** * Apply shared style to the element. + * * @param {HTMLElement} element The element to apply style for */ GrStyleObject.prototype.apply = function(element) { @@ -67,9 +69,10 @@ /** * Creates a new GrStyleObject with specified style properties. + * * @param {string} String with style properties. * @return {GrStyleObject} - */ + */ GrStylesApi.prototype.css = function(ruleStr) { return new GrStyleObject(ruleStr); }; diff --git a/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js b/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js index e509b8b5bd..9b17fd706c 100644 --- a/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js +++ b/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrAccountInfo extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list.js b/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list.js index 13992f8e23..2886c8785c 100644 --- a/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list.js +++ b/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.BaseUrlMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + */ class GrAgreementsList extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor.js b/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor.js index d92c14814a..aa4e0c5a64 100644 --- a/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor.js +++ b/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.ChangeTableMixin - */ + * @appliesMixin Gerrit.ChangeTableMixin + */ class GrChangeTableEditor extends Polymer.mixinBehaviors( [ Gerrit.ChangeTableBehavior, ], Polymer.GestureEventListeners( @@ -43,6 +43,7 @@ /** * Get the list of enabled column names from whichever checkboxes are * checked (excluding the number checkbox). + * * @return {!Array} */ _getDisplayedColumns() { diff --git a/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view.js b/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view.js index 863577cd33..ca81544794 100644 --- a/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view.js +++ b/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view.js @@ -18,9 +18,9 @@ 'use strict'; /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.FireMixin + */ class GrClaView extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/settings/gr-identities/gr-identities.js b/polygerrit-ui/app/elements/settings/gr-identities/gr-identities.js index 94c9e5a94d..8b74130ba4 100644 --- a/polygerrit-ui/app/elements/settings/gr-identities/gr-identities.js +++ b/polygerrit-ui/app/elements/settings/gr-identities/gr-identities.js @@ -23,8 +23,8 @@ ]; /** - * @appliesMixin Gerrit.BaseUrlMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + */ class GrIdentities extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog.js b/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog.js index af23f5b623..25499d63fc 100644 --- a/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog.js +++ b/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrRegistrationDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view.js b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view.js index 39ca22011f..0236261ab2 100644 --- a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view.js +++ b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view.js @@ -46,10 +46,10 @@ ]; /** - * @appliesMixin Gerrit.DocsUrlMixin - * @appliesMixin Gerrit.ChangeTableMixin - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.DocsUrlMixin + * @appliesMixin Gerrit.ChangeTableMixin + * @appliesMixin Gerrit.FireMixin + */ class GrSettingsView extends Polymer.mixinBehaviors( [ Gerrit.DocsUrlBehavior, Gerrit.ChangeTableBehavior, @@ -143,8 +143,8 @@ _emailsChanged: Boolean, /** - * For testing purposes. - */ + * For testing purposes. + */ _loadingPromise: Object, _showNumber: Boolean, diff --git a/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip.js b/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip.js index 27b1cc40c2..7a683dccfd 100644 --- a/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip.js +++ b/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrAccountChip extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.js b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.js index 3d96421543..1c0cb65a91 100644 --- a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.js +++ b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label.js @@ -18,9 +18,9 @@ 'use strict'; /** - * @appliesMixin Gerrit.DisplayNameMixin - * @appliesMixin Gerrit.TooltipMixin - */ + * @appliesMixin Gerrit.DisplayNameMixin + * @appliesMixin Gerrit.TooltipMixin + */ class GrAccountLabel extends Polymer.mixinBehaviors( [ Gerrit.DisplayNameBehavior, Gerrit.TooltipBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-account-link/gr-account-link.js b/polygerrit-ui/app/elements/shared/gr-account-link/gr-account-link.js index 07646690b5..f23959adfc 100644 --- a/polygerrit-ui/app/elements/shared/gr-account-link/gr-account-link.js +++ b/polygerrit-ui/app/elements/shared/gr-account-link/gr-account-link.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.BaseUrlMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + */ class GrAccountLink extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list.js b/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list.js index 3caec32e4f..e60782c886 100644 --- a/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list.js +++ b/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list.js @@ -20,8 +20,8 @@ const VALID_EMAIL_ALERT = 'Please input a valid email.'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrAccountList extends Polymer.mixinBehaviors( [ // Used in the tests for gr-account-list and other elements tests. Gerrit.FireBehavior, @@ -52,6 +52,7 @@ /** * Returns suggestions and convert them to list item + * * @type {Gerrit.GrSuggestionsProvider} */ suggestionsProvider: { @@ -60,6 +61,7 @@ /** * Needed for template checking since value is initially set to null. + * * @type {?Object} */ pendingConfirmation: { @@ -91,6 +93,7 @@ /** * Returns suggestion items + * * @type {!function(string): Promise>} */ _querySuggestions: { diff --git a/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown.js b/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown.js index 707c426879..f5366663a5 100644 --- a/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown.js +++ b/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown.js @@ -18,10 +18,10 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - * @appliesMixin Polymer.IronFitMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + * @appliesMixin Polymer.IronFitMixin + */ class GrAutocompleteDropdown extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.KeyboardShortcutBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.js b/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.js index edc8bc9ce5..e2f42b3cfa 100644 --- a/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.js +++ b/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete.js @@ -21,9 +21,9 @@ const DEBOUNCE_WAIT_MS = 200; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + */ class GrAutocomplete extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.KeyboardShortcutBehavior, @@ -54,16 +54,16 @@ return { /** - * Query for requesting autocomplete suggestions. The function should - * accept the input as a string parameter and return a promise. The - * promise yields an array of suggestion objects with "name", "label", - * "value" properties. The "name" property will be displayed in the - * suggestion entry. The "label" property will, when specified, appear - * next to the "name" as label text. The "value" property will be emitted - * if that suggestion is selected. - * - * @type {function(string): Promise} - */ + * Query for requesting autocomplete suggestions. The function should + * accept the input as a string parameter and return a promise. The + * promise yields an array of suggestion objects with "name", "label", + * "value" properties. The "name" property will be displayed in the + * suggestion entry. The "label" property will, when specified, appear + * next to the "name" as label text. The "value" property will be emitted + * if that suggestion is selected. + * + * @type {function(string): Promise} + */ query: { type: Function, value() { @@ -129,26 +129,26 @@ }, /** - * Multi mode appends autocompleted entries to the value. - * If false, autocompleted entries replace value. - */ + * Multi mode appends autocompleted entries to the value. + * If false, autocompleted entries replace value. + */ multi: { type: Boolean, value: false, }, /** - * When true and uncommitted text is left in the autocomplete input after - * blurring, the text will appear red. - */ + * When true and uncommitted text is left in the autocomplete input after + * blurring, the text will appear red. + */ warnUncommitted: { type: Boolean, value: false, }, /** - * When true, querying for suggestions is not debounced w/r/t keypresses - */ + * When true, querying for suggestions is not debounced w/r/t keypresses + */ noDebounce: { type: Boolean, value: false, @@ -235,6 +235,7 @@ /** * Set the text of the input without triggering the suggestion dropdown. + * * @param {string} text The new text for the input. */ setText(text) { diff --git a/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar.js b/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar.js index e57ba338f0..4238eed69d 100644 --- a/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar.js +++ b/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.BaseUrlMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + */ class GrAvatar extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/shared/gr-button/gr-button.js b/polygerrit-ui/app/elements/shared/gr-button/gr-button.js index 8c9ba50996..75efcdc344 100644 --- a/polygerrit-ui/app/elements/shared/gr-button/gr-button.js +++ b/polygerrit-ui/app/elements/shared/gr-button/gr-button.js @@ -18,9 +18,9 @@ 'use strict'; /** - * @appliesMixin Gerrit.KeyboardShortcutMixin - * @appliesMixin Gerrit.TooltipMixin - */ + * @appliesMixin Gerrit.KeyboardShortcutMixin + * @appliesMixin Gerrit.TooltipMixin + */ class GrButton extends Polymer.mixinBehaviors( [ Gerrit.KeyboardShortcutBehavior, Gerrit.TooltipBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.js b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.js index 779e2477af..a1165ca64d 100644 --- a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.js +++ b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread.js @@ -21,14 +21,14 @@ const NEWLINE_PATTERN = /\n/g; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - * @appliesMixin Gerrit.PathListMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + * @appliesMixin Gerrit.PathListMixin + */ class GrCommentThread extends Polymer.mixinBehaviors( [ /** - * Not used in this element rather other elements tests - */ + * Not used in this element rather other elements tests + */ Gerrit.FireBehavior, Gerrit.KeyboardShortcutBehavior, Gerrit.PathListBehavior, @@ -49,25 +49,25 @@ */ /** - * gr-comment-thread exposes the following attributes that allow a - * diff widget like gr-diff to show the thread in the right location: - * - * line-num: - * 1-based line number or undefined if it refers to the entire file. - * - * comment-side: - * "left" or "right". These indicate which of the two diffed versions - * the comment relates to. In the case of unified diff, the left - * version is the one whose line number column is further to the left. - * - * range: - * The range of text that the comment refers to (start_line, - * start_character, end_line, end_character), serialized as JSON. If - * set, range's end_line will have the same value as line-num. Line - * numbers are 1-based, char numbers are 0-based. The start position - * (start_line, start_character) is inclusive, and the end position - * (end_line, end_character) is exclusive. - */ + * gr-comment-thread exposes the following attributes that allow a + * diff widget like gr-diff to show the thread in the right location: + * + * line-num: + * 1-based line number or undefined if it refers to the entire file. + * + * comment-side: + * "left" or "right". These indicate which of the two diffed versions + * the comment relates to. In the case of unified diff, the left + * version is the one whose line number column is further to the left. + * + * range: + * The range of text that the comment refers to (start_line, + * start_character, end_line, end_character), serialized as JSON. If + * set, range's end_line will have the same value as line-num. Line + * numbers are 1-based, char numbers are 0-based. The start position + * (start_line, start_character) is inclusive, and the end position + * (end_line, end_character) is exclusive. + */ static get properties() { return { changeNum: String, @@ -76,9 +76,9 @@ value() { return []; }, }, /** - * @type {?{start_line: number, start_character: number, end_line: number, - * end_character: number}} - */ + * @type {?{start_line: number, start_character: number, end_line: number, + * end_character: number}} + */ range: { type: Object, reflectToAttribute: true, @@ -116,9 +116,9 @@ computed: '_computeRootId(comments.*)', }, /** - * If this is true, the comment thread also needs to have the change and - * line properties property set - */ + * If this is true, the comment thread also needs to have the change and + * line properties property set + */ showFilePath: { type: Boolean, value: false, @@ -512,6 +512,7 @@ /** * Load the project config when a project name has been provided. + * * @param {string} name The project name. */ _projectNameChanged(name) { diff --git a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.js b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.js index 79284b4155..62d15e5b72 100644 --- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.js +++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.js @@ -32,9 +32,9 @@ const FILE = 'FILE'; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + */ class GrComment extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.KeyboardShortcutBehavior, @@ -151,11 +151,11 @@ }, /** - * Property for storing references to overlay elements. When the overlays - * are moved to Gerrit.getRootElement() to be shown they are no-longer - * children, so they can't be queried along the tree, so they are stored - * here. - */ + * Property for storing references to overlay elements. When the overlays + * are moved to Gerrit.getRootElement() to be shown they are no-longer + * children, so they can't be queried along the tree, so they are stored + * here. + */ _overlays: { type: Object, value: () => ({}), diff --git a/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog.js b/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog.js index 79cd25108d..6a4232f540 100644 --- a/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog.js +++ b/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrConfirmDeleteCommentDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.js b/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.js index 4232ef964a..04724df18c 100644 --- a/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.js +++ b/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager.js @@ -37,22 +37,23 @@ observer: '_updateIndex', }, /** - * @type (?Object) - */ + * @type {?Object} + */ target: { type: Object, notify: true, observer: '_scrollToTarget', }, /** - * The height of content intended to be included with the target. - * @type (?number) - */ + * The height of content intended to be included with the target. + * + * @type {?number} + */ _targetHeight: Number, /** - * The index of the current target (if any). -1 otherwise. - */ + * The index of the current target (if any). -1 otherwise. + */ index: { type: Number, value: -1, @@ -60,28 +61,29 @@ }, /** - * The class to apply to the current target. Use null for no class. - */ + * The class to apply to the current target. Use null for no class. + */ cursorTargetClass: { type: String, value: null, }, /** - * The scroll behavior for the cursor. Values are 'never' and - * 'keep-visible'. 'keep-visible' will only scroll if the cursor is beyond - * the viewport. - * TODO (beckysiegel) figure out why it can be undefined - * @type (string|undefined) - */ + * The scroll behavior for the cursor. Values are 'never' and + * 'keep-visible'. 'keep-visible' will only scroll if the cursor is beyond + * the viewport. + * TODO (beckysiegel) figure out why it can be undefined + * + * @type {string|undefined} + */ scrollBehavior: { type: String, value: ScrollBehavior.NEVER, }, /** - * When true, will call element.focus() during scrolling. - */ + * When true, will call element.focus() during scrolling. + */ focusOnMove: { type: Boolean, value: false, @@ -96,6 +98,7 @@ /** * Move the cursor forward. Clipped to the ends of the stop list. + * * @param {!Function=} opt_condition Optional stop condition. If a condition * is passed the cursor will continue to move in the specified direction * until the condition is met. @@ -117,6 +120,7 @@ /** * Set the cursor to an arbitrary element. + * * @param {!HTMLElement} element * @param {boolean=} opt_noScroll prevent any potential scrolling in response * setting the cursor. @@ -164,6 +168,7 @@ /** * Move the cursor forward or backward by delta. Clipped to the beginning or * end of stop list. + * * @param {number} delta either -1 or 1. * @param {!Function=} opt_condition Optional stop condition. If a condition * is passed the cursor will continue to move in the specified direction @@ -220,6 +225,7 @@ /** * Get the next stop index indicated by the delta direction. + * * @param {number} delta either -1 or 1. * @param {!Function=} opt_condition Optional stop condition. * @param {boolean=} opt_clipToTop When none of the next indices match, move @@ -270,6 +276,7 @@ /** * Calculate where the element is relative to the window. + * * @param {!Object} target Target to scroll to. * @return {number} Distance to top of the target. */ diff --git a/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter.js b/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter.js index f79c1b6185..374844d172 100644 --- a/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter.js +++ b/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter.js @@ -32,8 +32,8 @@ }; /** - * @appliesMixin Gerrit.TooltipMixin - */ + * @appliesMixin Gerrit.TooltipMixin + */ class GrDateFormatter extends Polymer.mixinBehaviors( [ Gerrit.TooltipBehavior, ], Polymer.GestureEventListeners( @@ -54,14 +54,14 @@ }, /** - * When true, the detailed date appears in a GR-TOOLTIP rather than in the - * native browser tooltip. - */ + * When true, the detailed date appears in a GR-TOOLTIP rather than in the + * native browser tooltip. + */ hasTooltip: Boolean, /** - * The title to be used as the native tooltip or by the tooltip behavior. - */ + * The title to be used as the native tooltip or by the tooltip behavior. + */ title: { type: String, reflectToAttribute: true, diff --git a/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog.js b/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog.js index b84434efef..d36aa377cb 100644 --- a/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog.js +++ b/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrDialog extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands.js b/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands.js index 3cf0b721b6..9e90ae3c2b 100644 --- a/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands.js +++ b/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.RESTClientMixin - */ + * @appliesMixin Gerrit.RESTClientMixin + */ class GrDownloadCommands extends Polymer.mixinBehaviors( [ Gerrit.RESTClientBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.js b/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.js index 6272a67949..473a0a9ca6 100644 --- a/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.js +++ b/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.js @@ -82,6 +82,7 @@ /** * Handle a click on the iron-dropdown element. + * * @param {!Event} e */ _handleDropdownClick(e) { @@ -94,6 +95,7 @@ /** * Handle a click on the button to open the dropdown. + * * @param {!Event} e */ _showDropdownTapHandler(e) { diff --git a/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.js b/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.js index fc92e7696e..619005adfb 100644 --- a/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.js +++ b/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown.js @@ -21,9 +21,9 @@ const REL_EXTERNAL = 'external'; /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + */ class GrDropdown extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, Gerrit.KeyboardShortcutBehavior, @@ -57,8 +57,8 @@ }, /** - * Style the dropdown trigger as a link (rather than a button). - */ + * Style the dropdown trigger as a link (rather than a button). + */ link: { type: Boolean, value: false, @@ -70,17 +70,17 @@ }, /** - * List the IDs of dropdown buttons to be disabled. (Note this only - * diisables bittons and not link entries.) - */ + * List the IDs of dropdown buttons to be disabled. (Note this only + * diisables bittons and not link entries.) + */ disabledIds: { type: Array, value() { return []; }, }, /** - * The elements of the list. - */ + * The elements of the list. + */ _listElements: { type: Array, value() { return []; }, @@ -99,6 +99,7 @@ /** * Handle the up key. + * * @param {!Event} e */ _handleUp(e) { @@ -113,6 +114,7 @@ /** * Handle the down key. + * * @param {!Event} e */ _handleDown(e) { @@ -127,6 +129,7 @@ /** * Handle the tab key. + * * @param {!Event} e */ _handleTab(e) { @@ -139,6 +142,7 @@ /** * Handle the enter key. + * * @param {!Event} e */ _handleEnter(e) { @@ -157,6 +161,7 @@ /** * Handle a click on the iron-dropdown element. + * * @param {!Event} e */ _handleDropdownClick(e) { @@ -165,6 +170,7 @@ /** * Hanlde a click on the button to open the dropdown. + * * @param {!Event} e */ _dropdownTriggerTapHandler(e) { @@ -197,6 +203,7 @@ /** * Get the class for a top-content item based on the given boolean. + * * @param {boolean} bold Whether the item is bold. * @return {string} The class for the top-content item. */ @@ -207,6 +214,7 @@ /** * Build a URL for the given host and path. The base URL will be only added, * if it is not already included in the path. + * * @param {!string} host * @param {!string} path * @return {!string} The scheme-relative URL. @@ -221,6 +229,7 @@ * Build a scheme-relative URL for the current host. Will include the base * URL if one is present. Note: the URL will be scheme-relative but absolute * with regard to the host. + * * @param {!string} path The path for the URL. * @return {!string} The scheme-relative URL. */ @@ -231,6 +240,7 @@ /** * Compute the URL for a link object. + * * @param {!Object} link The object describing the link. * @return {!string} The URL. */ @@ -248,6 +258,7 @@ * Compute the value for the rel attribute of an anchor for the given link * object. If the link has a target value, then the rel must be "noopener" * for security reasons. + * * @param {!Object} link The object describing the link. * @return {?string} The rel value for the link. */ @@ -260,6 +271,7 @@ /** * Handle a click on an item of the dropdown. + * * @param {!Event} e */ _handleItemTap(e) { @@ -275,6 +287,7 @@ /** * If a dropdown item is shown as a button, get the class for the button. + * * @param {string} id * @param {!Object} disabledIdsRecord The change record for the disabled IDs * list. diff --git a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.js b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.js index 49b1025389..0c2d4f5671 100644 --- a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.js +++ b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content.js @@ -21,8 +21,8 @@ const STORAGE_DEBOUNCE_INTERVAL_MS = 400; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrEditableContent extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label.js b/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label.js index b989401940..13000b48c1 100644 --- a/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label.js +++ b/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label.js @@ -21,9 +21,9 @@ const AWAIT_STEP = 5; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + */ class GrEditableLabel extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.KeyboardShortcutBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface.js b/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface.js index d024bb2df3..f76345737e 100644 --- a/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface.js +++ b/polygerrit-ui/app/elements/shared/gr-event-interface/gr-event-interface.js @@ -39,6 +39,7 @@ constructor() { /** * Shared events map from name to the listeners. + * * @type {!Object>} */ this._listenersMap = new Map(); diff --git a/polygerrit-ui/app/elements/shared/gr-fixed-panel/gr-fixed-panel.js b/polygerrit-ui/app/elements/shared/gr-fixed-panel/gr-fixed-panel.js index af533bc729..1e8f767735 100644 --- a/polygerrit-ui/app/elements/shared/gr-fixed-panel/gr-fixed-panel.js +++ b/polygerrit-ui/app/elements/shared/gr-fixed-panel/gr-fixed-panel.js @@ -39,13 +39,13 @@ }, /** - * Initial offset from the top of the document, in pixels. - */ + * Initial offset from the top of the document, in pixels. + */ _topInitial: Number, /** - * Current offset from the top of the window, in pixels. - */ + * Current offset from the top of the window, in pixels. + */ _topLast: Number, _headerHeight: Number, diff --git a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.js b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.js index 7730a75f53..39b114d86e 100644 --- a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.js +++ b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.js @@ -252,6 +252,7 @@ /** * Map an array of block objects to an array of DOM nodes. + * * @param {!Array} blocks * @return {!Array} */ diff --git a/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard.js b/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard.js index 5e3cfb3ee9..37972f91ba 100644 --- a/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard.js +++ b/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard.js @@ -38,41 +38,41 @@ _target: Object, /** - * Determines whether or not the hovercard is visible. - * - * @type {boolean} - */ + * Determines whether or not the hovercard is visible. + * + * @type {boolean} + */ _isShowing: { type: Boolean, value: false, }, /** - * The `id` of the element that the hovercard is anchored to. - * - * @type {string} - */ + * The `id` of the element that the hovercard is anchored to. + * + * @type {string} + */ for: { type: String, observer: '_forChanged', }, /** - * The spacing between the top of the hovercard and the element it is - * anchored to. - * - * @type {number} - */ + * The spacing between the top of the hovercard and the element it is + * anchored to. + * + * @type {number} + */ offset: { type: Number, value: 14, }, /** - * Positions the hovercard to the top, right, bottom, left, bottom-left, - * bottom-right, top-left, or top-right of its content. - * - * @type {string} - */ + * Positions the hovercard to the top, right, bottom, left, bottom-left, + * bottom-right, top-left, or top-right of its content. + * + * @type {string} + */ position: { type: String, value: 'bottom', @@ -80,10 +80,10 @@ container: Object, /** - * ID for the container element. - * - * @type {string} - */ + * ID for the container element. + * + * @type {string} + */ containerId: { type: String, value: 'gr-hovercard-container', diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-context.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-context.js index 76cb51f2f7..708e5b68f0 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-context.js +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-context.js @@ -19,6 +19,7 @@ /** * Used to create a context for GrAnnotationActionsInterface. + * * @param {HTMLElement} contentEl The DIV.contentText element of the line * content to apply the annotation to using annotateRange. * @param {HTMLElement} lineNumberEl The TD element of the line number to @@ -41,6 +42,7 @@ /** * Method to add annotations to a content line. + * * @param {number} offset The char offset where the update starts. * @param {number} length The number of chars that the update covers. * @param {GrStyleObject} styleObject The style object for the range. @@ -56,6 +58,7 @@ /** * Method to add a CSS class to the line number TD element. + * * @param {GrStyleObject} styleObject The style object for the range. * @param {string} side The side of the update. ('left' or 'right') */ diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-js-api.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-js-api.js index b5ff46d955..4ba9820599 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-js-api.js +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-annotation-actions-js-api.js @@ -37,6 +37,7 @@ * GrAnnotationActionsContext.annotateRange and * GrAnnotationActionsContext.annotateLineNumber to apply a CSS class to the * line content or the line number. + * * @param {function(GrAnnotationActionsContext)} addLayerFunc The function * that will be called when the AnnotationLayer is ready to annotate. */ @@ -48,6 +49,7 @@ /** * The specified function will be called with a notify function for the plugin * to call when it has all required data for annotation. Optional. + * * @param {function(function(String, Number, Number, String))} notifyFunc See * doc of the notify function below to see what it does. */ @@ -129,6 +131,7 @@ * The notify function will call the listeners of all required annotation * layers. Intended to be called by the plugin when all required data for * annotation is available. + * * @param {String} path The file path whose listeners should be notified. * @param {Number} start The line where the update starts. * @param {Number} end The line where the update ends. @@ -149,6 +152,7 @@ /** * Should be called to register annotation layers by the framework. Not * intended to be called by plugins. + * * @param {String} path The file path (eg: /COMMIT_MSG'). * @param {String} changeNum The Gerrit change number. * @param {String} patchNum The Gerrit patch number. @@ -163,6 +167,7 @@ /** * Used to create an instance of the Annotation Layer interface. + * * @param {String} path The file path (eg: /COMMIT_MSG'). * @param {String} changeNum The Gerrit change number. * @param {String} patchNum The Gerrit patch number. @@ -180,6 +185,7 @@ /** * Register a listener for layer updates. + * * @param {function(Number, Number, String)} fn The update handler function. * Should accept as arguments the line numbers for the start and end of * the update and the side as a string. @@ -190,6 +196,7 @@ /** * Layer method to add annotations to a line. + * * @param {HTMLElement} contentEl The DIV.contentText element of the line * content to apply the annotation to using annotateRange. * @param {HTMLElement} lineNumberEl The TD element of the line number to @@ -205,6 +212,7 @@ /** * Notify Layer listeners of changes to annotations. + * * @param {Number} start The line where the update starts. * @param {Number} end The line where the update ends. * @param {String} side The side of the update. ('left' or 'right') diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-api-utils.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-api-utils.js index 0ec3d6aeda..f5e720a19a 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-api-utils.js +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-api-utils.js @@ -35,6 +35,7 @@ /** * Retrieves the name of the plugin base on the url. + * * @param {string|URL} url */ function getPluginNameFromUrl(url) { diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-actions-js-api.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-actions-js-api.js index 407a6a8b0c..5658245665 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-actions-js-api.js +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-actions-js-api.js @@ -20,6 +20,7 @@ /** * Ensure GrChangeActionsInterface instance has access to gr-change-actions * element and retrieve if the interface was created before element. + * * @param {!GrChangeActionsInterface} api */ function ensureEl(api) { @@ -32,6 +33,7 @@ /** * Set gr-change-actions element to a GrChangeActionsInterface instance. + * * @param {!GrChangeActionsInterface} api * @param {!Element} el gr-change-actions */ diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-reply-js-api.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-reply-js-api.js index 72ebeb1710..e6a3f40cb0 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-reply-js-api.js +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-change-reply-js-api.js @@ -20,6 +20,7 @@ /** * Ensure GrChangeReplyInterface instance has access to gr-reply-dialog * element and retrieve if the interface was created before element. + * * @param {!GrChangeReplyInterfaceOld} api */ function ensureEl(api) { diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-gerrit.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-gerrit.js index e48ef91916..73a248063e 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-gerrit.js +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-gerrit.js @@ -16,9 +16,9 @@ */ /** - * This defines the Gerrit instance. All methods directly attached to Gerrit - * should be defined or linked here. - */ + * This defines the Gerrit instance. All methods directly attached to Gerrit + * should be defined or linked here. + */ (function(window) { 'use strict'; diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.js index d59f9b15c4..b1675cc6bd 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.js +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-js-api-interface.js @@ -38,8 +38,8 @@ }; /** - * @appliesMixin Gerrit.PatchSetMixin - */ + * @appliesMixin Gerrit.PatchSetMixin + */ class GrJsApiInterface extends Polymer.mixinBehaviors( [ Gerrit.PatchSetBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints.js index 4b7778c33e..5f5a74e3b7 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints.js +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-endpoints.js @@ -86,6 +86,7 @@ /** * Get detailed information about modules registered with an extension * endpoint. + * * @param {string} name Endpoint name. * @param {?{ * type: (string|undefined), @@ -112,6 +113,7 @@ /** * Get detailed module names for instantiating at the endpoint. + * * @param {string} name Endpoint name. * @param {?{ * type: (string|undefined), @@ -129,6 +131,7 @@ /** * Get .html plugin URLs with element and module definitions. + * * @param {string} name Endpoint name. * @param {?{ * type: (string|undefined), diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader.js index c98d0b05cf..8a096417d4 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader.js +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-loader.js @@ -95,6 +95,7 @@ /** * Use the plugin name or use the full url if not recognized. + * * @see gr-api-utils#getPluginNameFromUrl * @param {string|URL} url */ @@ -283,6 +284,7 @@ /** * Checks if given plugin path/url is enabled or not. + * * @param {string} pathOrUrl */ isPluginEnabled(pathOrUrl) { @@ -294,6 +296,7 @@ /** * Returns the plugin object with a given url. + * * @param {string} pathOrUrl */ getPlugin(pathOrUrl) { @@ -303,6 +306,7 @@ /** * Checks if given plugin path/url is loaded or not. + * * @param {string} pathOrUrl */ isPluginLoaded(pathOrUrl) { diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-rest-api.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-rest-api.js index af8bd9e3f0..ecfafb5d3d 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-rest-api.js +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-plugin-rest-api.js @@ -61,6 +61,7 @@ /** * Fetch and return native browser REST API Response. + * * @param {string} method HTTP Method (GET, POST, etc) * @param {string} url URL without base path or plugin prefix * @param {Object=} payload Respected for POST and PUT only. @@ -76,6 +77,7 @@ /** * Fetch and parse REST API response, if request succeeds. + * * @param {string} method HTTP Method (GET, POST, etc) * @param {string} url URL without base path or plugin prefix * @param {Object=} payload Respected for POST and PUT only. diff --git a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.js b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.js index 2facfd9f89..3d051f887a 100644 --- a/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.js +++ b/polygerrit-ui/app/elements/shared/gr-js-api-interface/gr-public-js-api.js @@ -82,7 +82,7 @@ /** * Registers an endpoint for the plugin. - */ + */ Plugin.prototype.registerCustomComponent = function( endpointName, opt_moduleName, opt_options) { return this._registerCustomComponent(endpointName, opt_moduleName, @@ -94,7 +94,7 @@ * * Dynamic plugins are registered by specific prefix, such as * 'change-list-header'. - */ + */ Plugin.prototype.registerDynamicCustomComponent = function( endpointName, opt_moduleName, opt_options) { const fullEndpointName = `${endpointName}-${this.getPluginName()}`; @@ -222,6 +222,7 @@ /** * To make REST requests for plugin-provided endpoints, use + * * @example * const pluginRestApi = plugin.restApi(plugin.url()); * diff --git a/polygerrit-ui/app/elements/shared/gr-label/gr-label.js b/polygerrit-ui/app/elements/shared/gr-label/gr-label.js index 7d82c9c9a6..440e8e92e7 100644 --- a/polygerrit-ui/app/elements/shared/gr-label/gr-label.js +++ b/polygerrit-ui/app/elements/shared/gr-label/gr-label.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.TooltipMixin - */ + * @appliesMixin Gerrit.TooltipMixin + */ class GrLabel extends Polymer.mixinBehaviors( [ Gerrit.TooltipBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete.js b/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete.js index d2646affde..c02c598bcc 100644 --- a/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete.js +++ b/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete.js @@ -31,10 +31,10 @@ return { /** - * Used just like the query property of gr-autocomplete. - * - * @type {function(string): Promise} - */ + * Used just like the query property of gr-autocomplete. + * + * @type {function(string): Promise} + */ query: { type: Function, value() { diff --git a/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader.js b/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader.js index 1fd122c32d..20b239eb40 100644 --- a/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader.js +++ b/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader.js @@ -44,6 +44,7 @@ * Get the HLJS library. Returns a promise that resolves with a reference to * the library after it's been loaded. The promise resolves immediately if * it's already been loaded. + * * @return {!Promise} */ getHLJS() { @@ -68,6 +69,7 @@ /** * Loads the dark theme document. Returns a promise that resolves with a * custom-style DOM element. + * * @return {!Promise} * @suppress {checkTypes} */ @@ -103,6 +105,7 @@ /** * Get the HLJS library, assuming it has been loaded. Configure the library * if it hasn't already been configured. + * * @return {!Object} */ _getHighlightLib() { @@ -118,6 +121,7 @@ /** * Get the resource path used to load the application. If the application * was loaded through a CDN, then this will be the path to CDN resources. + * * @return {string} */ _getLibRoot() { @@ -129,6 +133,7 @@ /** * Load and execute a JS file from the lib root. + * * @param {string} src The path to the JS file without the lib root. * @return {Promise} a promise that resolves when the script's onload * executes. diff --git a/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text.js b/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text.js index 92398667cc..a57f331b57 100644 --- a/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text.js +++ b/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.TooltipMixin - */ + * @appliesMixin Gerrit.TooltipMixin + */ /* * The gr-limited-text element is for displaying text with a maximum length * (in number of characters) to display. If the length of the text exceeds the @@ -51,17 +51,17 @@ }, /** - * Disable the tooltip. - * When set to true, will not show tooltip even text is over limit - */ + * Disable the tooltip. + * When set to true, will not show tooltip even text is over limit + */ disableTooltip: { type: Boolean, value: false, }, /** - * The maximum number of characters to display in the tooltop. - */ + * The maximum number of characters to display in the tooltop. + */ tooltipLimit: { type: Number, value: 1024, diff --git a/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip.js b/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip.js index aaae3d1545..bef9698cff 100644 --- a/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip.js +++ b/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrLinkedChip extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view.js b/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view.js index 9d5d8f538e..c4e4ddb810 100644 --- a/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view.js +++ b/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view.js @@ -20,10 +20,10 @@ const REQUEST_DEBOUNCE_INTERVAL_MS = 200; /** - * @appliesMixin Gerrit.BaseUrlMixin - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.BaseUrlMixin + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrListView extends Polymer.mixinBehaviors( [ Gerrit.BaseUrlBehavior, Gerrit.FireBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay.js b/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay.js index 9c7e680529..fc9dc994f6 100644 --- a/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay.js +++ b/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay.js @@ -22,8 +22,8 @@ const BREAKPOINT_FULLSCREEN_OVERLAY = '50em'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrOverlay extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Polymer.IronOverlayBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker.js b/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker.js index 47979f1ce6..c7afd4de5c 100644 --- a/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker.js +++ b/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker.js @@ -21,8 +21,8 @@ const REF_PREFIX = 'refs/heads/'; /** - * @appliesMixin Gerrit.URLEncodingMixin - */ + * @appliesMixin Gerrit.URLEncodingMixin + */ class GrRepoBranchPicker extends Polymer.mixinBehaviors( [ Gerrit.URLEncodingBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-etag-decorator.js b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-etag-decorator.js index f72c7cc84d..c20cdd7e46 100644 --- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-etag-decorator.js +++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-etag-decorator.js @@ -30,6 +30,7 @@ /** * Get or upgrade fetch options to include an ETag in a request. + * * @param {string} url The URL being fetched. * @param {!Object=} opt_options Optional options object in which to include * the ETag request header. If omitted, the result will be a fresh option @@ -77,6 +78,7 @@ /** * Get the cached payload for a given URL. + * * @param {string} url * @return {string|undefined} Returns the unparsed JSON payload from the * cache. diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js index 0ab18a1785..a8c5bb365e 100644 --- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js +++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-api-interface.js @@ -40,11 +40,11 @@ '/revisions/*'; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.PathListMixin - * @appliesMixin Gerrit.PatchSetMixin - * @appliesMixin Gerrit.RESTClientMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.PathListMixin + * @appliesMixin Gerrit.PatchSetMixin + * @appliesMixin Gerrit.RESTClientMixin + */ class GrRestApiInterface extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.PathListBehavior, @@ -106,8 +106,8 @@ value: new GrEtagDecorator(), // Share across instances. }, /** - * Used to maintain a mapping of changeNums to project names. - */ + * Used to maintain a mapping of changeNums to project names. + */ _projectLookup: { type: Object, value: {}, // Intentional to share the object across instances. @@ -1004,6 +1004,7 @@ /** * Inserts a change into _projectLookup iff it has a valid structure. + * * @param {?{ _number: (number|string) }} change */ _maybeInsertInLookup(change) { @@ -1206,6 +1207,7 @@ /** * The closure compiler doesn't realize this.specialFilePathCompare is * valid. + * * @suppress {checkTypes} */ getChangeFilePathsAsSpeciallySortedArray(changeNum, patchRange) { @@ -1766,6 +1768,7 @@ /** * Gets a file in a specific change and revision. + * * @param {number|string} changeNum * @param {string} path * @param {number|string} patchNum @@ -1785,6 +1788,7 @@ /** * Gets a file in a change edit. + * * @param {number|string} changeNum * @param {string} path */ @@ -1911,6 +1915,7 @@ /** * Public version of the _restApiHelper.send method preserved for plugins. + * * @param {string} method * @param {string} url * @param {?string|number|Object=} opt_body passed as null sometimes @@ -2603,6 +2608,7 @@ /** * Alias for _changeBaseURL.then(send). + * * @todo(beckysiegel) clean up comments * @param {Gerrit.ChangeSendRequest} req * @return {!Promise} @@ -2630,6 +2636,7 @@ /** * Alias for _changeBaseURL.then(_fetchJSON). + * * @param {Gerrit.ChangeFetchRequest} req * @return {!Promise} */ @@ -2652,6 +2659,7 @@ /** * Execute a change action or revision action on a change. + * * @param {number} changeNum * @param {string} method * @param {string} endpoint @@ -2674,6 +2682,7 @@ /** * Get blame information for the given diff. + * * @param {string|number} changeNum * @param {string|number} patchNum * @param {string} path @@ -2695,6 +2704,7 @@ /** * Modify the given create draft request promise so that it fails and throws * an error if the response bears HTTP status 200 instead of HTTP 201. + * * @see Issue 7763 * @param {Promise} promise The original promise. * @return {Promise} The modified promise. @@ -2724,6 +2734,7 @@ /** * Fetch a project dashboard definition. * https://gerrit-review.googlesource.com/Documentation/rest-api-projects.html#get-dashboard + * * @param {string} project * @param {string} dashboard * @param {function(?Response, string=)=} opt_errFn diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-apis/gr-rest-api-helper.js b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-apis/gr-rest-api-helper.js index c9cdfb436a..3908a001bb 100644 --- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-apis/gr-rest-api-helper.js +++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-rest-apis/gr-rest-api-helper.js @@ -122,6 +122,7 @@ /** * Wraps calls to the underlying authenticated fetch function (_auth.fetch) * with timing and logging. + * * @param {Gerrit.FetchRequest} req */ fetch(req) { @@ -139,6 +140,7 @@ * Log information about a REST call. Because the elapsed time is determined * by this method, it should be called immediately after the request * finishes. + * * @param {Gerrit.FetchRequest} req * @param {number} startTime the time that the request was started. * @param {number} status the HTTP status of the response. The status value @@ -171,6 +173,7 @@ * Returns a Promise that resolves to a native Response. * Doesn't do error checking. Supports cancel condition. Performs auth. * Validates auth expiry errors. + * * @param {Gerrit.FetchJSONRequest} req */ fetchRawJSON(req) { @@ -205,6 +208,7 @@ * Fetch JSON from url provided. * Returns a Promise that resolves to a parsed response. * Same as {@link fetchRawJSON}, plus error handling. + * * @param {Gerrit.FetchJSONRequest} req */ fetchJSON(req) { @@ -329,6 +333,7 @@ /** * Send an XHR. + * * @param {Gerrit.SendRequest} req * @return {Promise} */ diff --git a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-reviewer-updates-parser.js b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-reviewer-updates-parser.js index 7c6d372837..831019177a 100644 --- a/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-reviewer-updates-parser.js +++ b/polygerrit-ui/app/elements/shared/gr-rest-api-interface/gr-reviewer-updates-parser.js @@ -60,6 +60,7 @@ /** * Is a part of _groupUpdates(). Creates a new batch of updates. + * * @param {Object} update instance of ReviewerUpdateInfo */ GrReviewerUpdatesParser.prototype._startBatch = function(update) { @@ -75,6 +76,7 @@ * Is a part of _groupUpdates(). Validates current batch: * - filters out updates that don't change reviewer state. * - updates current reviewer state. + * * @param {Object} update instance of ReviewerUpdateInfo */ GrReviewerUpdatesParser.prototype._completeBatch = function(update) { @@ -136,6 +138,7 @@ /** * Generates update message for reviewer state change. + * * @param {string} prev previous reviewer state. * @param {string} state current reviewer state. * @return {string} @@ -157,6 +160,7 @@ /** * Groups updates for same category (eg CC->CC) into a hash arrays of * reviewers. + * * @param {!Array} updates Array of ReviewerUpdateItemInfo. * @return {!Object} Hash of arrays of AccountInfo, message as key. */ @@ -174,6 +178,7 @@ /** * Generates text messages for grouped reviewer updates. * Formats reviewer updates to a (not yet implemented) EventInfo instance. + * * @see https://gerrit-review.googlesource.com/c/94490/ */ GrReviewerUpdatesParser.prototype._formatUpdates = function() { diff --git a/polygerrit-ui/app/elements/shared/gr-select/gr-select.js b/polygerrit-ui/app/elements/shared/gr-select/gr-select.js index 152834faf4..c9f13dec1f 100644 --- a/polygerrit-ui/app/elements/shared/gr-select/gr-select.js +++ b/polygerrit-ui/app/elements/shared/gr-select/gr-select.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.FireMixin - */ + * @appliesMixin Gerrit.FireMixin + */ class GrSelect extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea.js b/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea.js index 5011067135..5b17a383a4 100644 --- a/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea.js +++ b/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea.js @@ -53,9 +53,9 @@ ]; /** - * @appliesMixin Gerrit.FireMixin - * @appliesMixin Gerrit.KeyboardShortcutMixin - */ + * @appliesMixin Gerrit.FireMixin + * @appliesMixin Gerrit.KeyboardShortcutMixin + */ class GrTextarea extends Polymer.mixinBehaviors( [ Gerrit.FireBehavior, Gerrit.KeyboardShortcutBehavior, diff --git a/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content.js b/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content.js index 3559949ad9..22a5ecb0ff 100644 --- a/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content.js +++ b/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content.js @@ -18,8 +18,8 @@ 'use strict'; /** - * @appliesMixin Gerrit.TooltipMixin - */ + * @appliesMixin Gerrit.TooltipMixin + */ class GrTooltipContent extends Polymer.mixinBehaviors( [ Gerrit.TooltipBehavior, ], Polymer.GestureEventListeners( diff --git a/polygerrit-ui/app/elements/shared/revision-info/revision-info.html b/polygerrit-ui/app/elements/shared/revision-info/revision-info.html index 75b8ac3758..48e488a47f 100644 --- a/polygerrit-ui/app/elements/shared/revision-info/revision-info.html +++ b/polygerrit-ui/app/elements/shared/revision-info/revision-info.html @@ -32,6 +32,7 @@ limitations under the License. * example, with normal changes this will always return 1. For merge changes * wherein the revisions are merge commits this will return 2 or potentially * more. + * * @return {Number} */ RevisionInfo.prototype.getMaxParents = function() { @@ -45,6 +46,7 @@ limitations under the License. /** * Get an object that maps revision numbers to the number of parents of the * commit of that revision. + * * @return {!Object} */ RevisionInfo.prototype.getParentCountMap = function() { @@ -68,6 +70,7 @@ limitations under the License. /** * Get the commit ID of the (0-offset) indexed parent in the given revision * number. + * * @param {number|string} patchNum * @param {number} parentIndex (0-offset) * @return {string} diff --git a/polygerrit-ui/app/lint_test.sh b/polygerrit-ui/app/lint_test.sh index 1862dce127..df37e54db7 100755 --- a/polygerrit-ui/app/lint_test.sh +++ b/polygerrit-ui/app/lint_test.sh @@ -35,6 +35,6 @@ cd ${UI_PATH} # Linking global eslint packages to the local project. Required to use eslint plugins with a global # eslint installation. -npm link eslint eslint-config-google eslint-plugin-html +npm link eslint eslint-config-google eslint-plugin-html eslint-plugin-jsdoc ${eslint_bin} -c ${UI_PATH}/.eslintrc.json --ignore-pattern 'node_modules/' --ignore-pattern 'bower_components/' --ignore-pattern 'gr-linked-text' --ignore-pattern 'scripts/vendor' --ext .html,.js ${UI_PATH} diff --git a/polygerrit-ui/app/types/types.js b/polygerrit-ui/app/types/types.js index 3b914073c9..7c42d76d74 100644 --- a/polygerrit-ui/app/types/types.js +++ b/polygerrit-ui/app/types/types.js @@ -99,6 +99,7 @@ Gerrit.ChangeFetchRequest; * - headers is a key-value hash to describe HTTP headers for the request. * - parseResponse states whether the result should be parsed as a JSON * object using getResponseObject. + * * @typedef {{ * method: string, * url: string, @@ -146,6 +147,7 @@ Gerrit.FetchRequest; * - cancelCondition is a function that, if provided and returns true, will * cancel the response after it resolves. * - params is a key-value hash to specify get params for the request URL. + * * @typedef {{ * url: string, * errFn: (function(?Response, string=)|null|undefined), @@ -217,6 +219,7 @@ Gerrit.CommentsBySide; * Note that the implied newline character at the end of each line is included * in the length calculation, and thus it is possible for the edits to span * newlines. + * * @typedef {!Array} */ Gerrit.IntralineInfo;