From 745918771de4ad60df81cea33c6407db2c5cc11f Mon Sep 17 00:00:00 2001 From: Robert Klebe Date: Mon, 23 Apr 2018 15:03:27 +0200 Subject: [PATCH 1/3] Cosmoz-tabs behavior, updating documentation. cosmoz-tabbed-behavior.html, updating documentation. --- cosmoz-tabbed-behavior.html | 38 +++++++++++++++++++++---------------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/cosmoz-tabbed-behavior.html b/cosmoz-tabbed-behavior.html index 4a8f6b1..d48628d 100644 --- a/cosmoz-tabbed-behavior.html +++ b/cosmoz-tabbed-behavior.html @@ -7,11 +7,13 @@ window.Cosmoz = window.Cosmoz || {}; /** + * Behavior for cosmoz-tabs. + * * @polymerBehavior Cosmoz.TabbedBehavior */ Cosmoz.TabbedBehaviorImpl = { /** - * Fired when the element should have it's selection state toggled. + * Fired when the element should have the selection state toggled. * * @event cosmoz-tab-toggle */ @@ -30,7 +32,7 @@ properties: { /** - * True if the item is selected. + * Item selection state, true if it is selected. */ isSelected: { type: Boolean, @@ -40,8 +42,9 @@ }, /** - * True if item is in accordion mode. - * This property should be forwarded by an ancestor `Cosmoz.TabbableBehavior` element. + * Accordion mode element state, true if it is in accordion mode. + * Should be forwarded by a `Cosmoz.TabbableBehavior` ancestor + * element. */ accordion: { type: Boolean, @@ -51,7 +54,7 @@ }, /** - * The items's heading text. + * Item heading text. */ heading: { type: String, @@ -59,7 +62,7 @@ }, /** - * The icon of the item. + * Icon name of the item. */ icon: { type: String, @@ -67,7 +70,7 @@ }, /** - * The icon of the item when it is selected. + * Icon name of the item when it is selected. */ selectedIcon: { type: String, @@ -75,7 +78,7 @@ }, /** - * The color of the items's icon. + * Color of the item icon. */ iconColor: { type: String, @@ -83,7 +86,8 @@ }, /** - * When not empty the element will contain a `paper-bagde` with the label set to this property. + * When not empty the element will contain a `paper-bagde` with the + * label set to this property. */ badge: { type: String, @@ -93,28 +97,30 @@ }, /** - * Computes the element's opened icon depending on the `opened` property + * Computes the element opened icon name depending on the `opened` + * property. * - * @param {Boolean} isSelected True if tab is opened - * @return {void} + * @param {boolean} isSelected Whether tab is opened or not. + * @return {string} */ _computeOpenedIcon: function (isSelected) { return isSelected ? 'expand-less' : 'expand-more'; }, /** - * Returns the element's icon. + * Gets the element icon name. * - * @returns {void} + * @returns {string} Name of the element icon. */ getIcon: function () { return this.isSelected && !this.accordion ? this.selectedIcon : this.icon; }, /** - * Returns the element's icon style. + * Gets the element icon style property and value if icon color is + * set, otherwise return nothing. * - * @returns {void} + * @returns {string/void} Style color property and value for the icon. */ getIconStyle: function () { if (this.iconColor) { From f7a218485a088887ff4184da61e97d823dd6ada4 Mon Sep 17 00:00:00 2001 From: Robert Klebe Date: Tue, 24 Apr 2018 13:53:07 +0200 Subject: [PATCH 2/3] Cosmoz tabbed behavior, review fix. cosmoz-tabbed-behavior.html, review fix. --- cosmoz-tabbed-behavior.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosmoz-tabbed-behavior.html b/cosmoz-tabbed-behavior.html index d48628d..4635d99 100644 --- a/cosmoz-tabbed-behavior.html +++ b/cosmoz-tabbed-behavior.html @@ -101,7 +101,7 @@ * property. * * @param {boolean} isSelected Whether tab is opened or not. - * @return {string} + * @returns {string} */ _computeOpenedIcon: function (isSelected) { return isSelected ? 'expand-less' : 'expand-more'; From f397e1b1c9a1fed12530baf5688230fee280c4fa Mon Sep 17 00:00:00 2001 From: Robert Klebe Date: Tue, 24 Apr 2018 13:57:37 +0200 Subject: [PATCH 3/3] Cosmoz tabbed behavior, codeclimate fix. cosmoz-tabbed-behavior.html, codeclimate fix. --- cosmoz-tabbed-behavior.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cosmoz-tabbed-behavior.html b/cosmoz-tabbed-behavior.html index 4635d99..31e8b01 100644 --- a/cosmoz-tabbed-behavior.html +++ b/cosmoz-tabbed-behavior.html @@ -101,7 +101,7 @@ * property. * * @param {boolean} isSelected Whether tab is opened or not. - * @returns {string} + * @returns {string} Opened icon name. */ _computeOpenedIcon: function (isSelected) { return isSelected ? 'expand-less' : 'expand-more';