Skip to content

Commit

Permalink
docs: annotate protected methods correctly (#3979)
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan authored Jun 1, 2022
1 parent 3db4159 commit 677de83
Show file tree
Hide file tree
Showing 11 changed files with 19 additions and 3 deletions.
1 change: 1 addition & 0 deletions packages/accordion/src/vaadin-accordion.js
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,7 @@ class Accordion extends ThemableMixin(ElementMixin(PolymerElement)) {
}
}

/** @protected */
ready() {
super.ready();

Expand Down
1 change: 1 addition & 0 deletions packages/checkbox-group/src/vaadin-checkbox-group.js
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ class CheckboxGroup extends FieldMixin(FocusMixin(DisabledMixin(ElementMixin(The
this.__onCheckboxCheckedChanged = this.__onCheckboxCheckedChanged.bind(this);
}

/** @protected */
ready() {
super.ready();

Expand Down
11 changes: 8 additions & 3 deletions packages/component-base/src/controller-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
*/
import { dedupingMixin } from '@polymer/polymer/lib/utils/mixin.js';

/**
* @typedef ReactiveController
* @type {import('lit').ReactiveController}
*/

/**
* A mixin for connecting controllers to the element.
*
Expand All @@ -17,7 +22,7 @@ export const ControllerMixin = dedupingMixin(
super();

/**
* @type {Set<import('lit').ReactiveController>}
* @type {Set<ReactiveController>}
*/
this.__controllers = new Set();
}
Expand Down Expand Up @@ -47,7 +52,7 @@ export const ControllerMixin = dedupingMixin(
/**
* Registers a controller to participate in the element update cycle.
*
* @param {import('lit').ReactiveController} controller
* @param {ReactiveController} controller
* @protected
*/
addController(controller) {
Expand All @@ -61,7 +66,7 @@ export const ControllerMixin = dedupingMixin(
/**
* Removes a controller from the element.
*
* @param {import('lit').ReactiveController} controller
* @param {ReactiveController} controller
* @protected
*/
removeController(controller) {
Expand Down
1 change: 1 addition & 0 deletions packages/details/src/vaadin-details.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ class Details extends ShadowFocusMixin(ElementMixin(ThemableMixin(PolymerElement
return this.shadowRoot.querySelector('[part="summary"]');
}

/** @protected */
ready() {
super.ready();
const uniqueId = (Details._uniqueId = 1 + Details._uniqueId || 0);
Expand Down
1 change: 1 addition & 0 deletions packages/grid/src/vaadin-grid-active-item-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ export const ActiveItemMixin = (superClass) =>
};
}

/** @protected */
ready() {
super.ready();

Expand Down
1 change: 1 addition & 0 deletions packages/grid/src/vaadin-grid-column-reordering-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export const ColumnReorderingMixin = (superClass) =>
return ['_updateOrders(_columnTree, _columnTree.*)'];
}

/** @protected */
ready() {
super.ready();
addListener(this, 'track', this._onTrackEvent);
Expand Down
1 change: 1 addition & 0 deletions packages/grid/src/vaadin-grid-column-resizing-mixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { addListener } from '@vaadin/component-base/src/gestures.js';
*/
export const ColumnResizingMixin = (superClass) =>
class ColumnResizingMixin extends superClass {
/** @protected */
ready() {
super.ready();
const scroller = this.$.scroller;
Expand Down
2 changes: 2 additions & 0 deletions packages/icon/src/vaadin-icon.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,13 @@ class Icon extends ThemableMixin(ElementMixin(PolymerElement)) {
}
}

/** @protected */
connectedCallback() {
super.connectedCallback();
document.addEventListener('vaadin-iconset-registered', this.__onIconsetRegistered);
}

/** @protected */
disconnectedCallback() {
super.disconnectedCallback();
document.removeEventListener('vaadin-iconset-registered', this.__onIconsetRegistered);
Expand Down
1 change: 1 addition & 0 deletions packages/list-box/src/vaadin-list-box.js
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class ListBox extends ElementMixin(MultiSelectListMixin(ThemableMixin(Controller
this.focused;
}

/** @protected */
ready() {
super.ready();
this.setAttribute('role', 'list');
Expand Down
1 change: 1 addition & 0 deletions packages/message-list/src/vaadin-message-list.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ class MessageList extends ElementMixin(ThemableMixin(PolymerElement)) {
`;
}

/** @protected */
ready() {
super.ready();

Expand Down
1 change: 1 addition & 0 deletions packages/tabs/src/vaadin-tabs.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ class Tabs extends ResizeMixin(ElementMixin(ListMixin(ThemableMixin(PolymerEleme
});
}

/** @protected */
ready() {
super.ready();
this._scrollerElement.addEventListener('scroll', () => this._updateOverflow());
Expand Down

0 comments on commit 677de83

Please sign in to comment.