Skip to content

Commit

Permalink
chore(RatingIndicator): fix few comments from review (#1751)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilhan007 authored Jun 9, 2020
1 parent b44ea2c commit 5ae48a8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
17 changes: 12 additions & 5 deletions packages/main/src/RatingIndicator.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ const metadata = {

/**
* Defines whether the <code>ui5-rating-indicator</code> is disabled.
*
* <br><br>
* <b>Note:</b> A disabled <code>ui5-rating-indicator</code> is completely noninteractive.
* @type {boolean}
* @defaultvalue false
* @public
Expand All @@ -67,6 +70,11 @@ const metadata = {
},

/**
* Defines whether the <code>ui5-rating-indicator</code> is read-only.
* <br><br>
* <b>Note:</b> A read-only <code>ui5-rating-indicator</code> is not editable,
* but still provides visual feedback upon user interaction.
*
* @type {boolean}
* @defaultvalue false
* @public
Expand Down Expand Up @@ -113,12 +121,12 @@ const metadata = {
* Additionally, it is also used to display the average and overall ratings.
*
* <h3>Usage</h3>
* The preferred number of icons is between 5 and 7.
* The reccomended number of icons is between 5 and 7.
*
* <h3>Responsive Behavior</h3>
* You can change the size of the Rating Indicator by changing its <code>font-size</code> CSS property.
* <br>
* Example: <code><ui5-rating-indicator style="font-size: 3rem;"></ui5-rating-indicator></code>
* Example: <code>&lt;ui5-rating-indicator style="font-size: 3rem;">&lt;/ui5-rating-indicator></code>
*
* <h3>Usage</h3>
*
Expand All @@ -133,6 +141,7 @@ const metadata = {
* @extends UI5Element
* @tagname ui5-rating-indicator
* @public
* @since 1.0.0-rc.8
*/
class RatingIndicator extends UI5Element {
static get metadata() {
Expand All @@ -152,9 +161,7 @@ class RatingIndicator extends UI5Element {
}

static async onDefine() {
await Promise.all([
fetchI18nBundle("@ui5/webcomponents"),
]);
await fetchI18nBundle("@ui5/webcomponents");
}

constructor() {
Expand Down
10 changes: 8 additions & 2 deletions packages/main/test/samples/RatingIndicator.sample.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
<header>
<div class="control-header">Rating Indicator</div>
<header class="component-heading">
<h2 class="control-header">Rating Indicator</h2>
<div class="component-heading-since">
<span><!--since_tag_marker--></span>
</div>
</header>

<style>
.snippet > ui5-rating-indicator {
margin: 0 1rem;
Expand All @@ -16,10 +20,12 @@ <h3>Basic Rating Indicator</h3>
<div class="snippet">
<ui5-rating-indicator></ui5-rating-indicator>
<ui5-rating-indicator value="3"></ui5-rating-indicator>
<ui5-rating-indicator value="3.7"></ui5-rating-indicator>
</div>
<pre class="prettyprint lang-html"><xmp>
<ui5-rating-indicator></ui5-rating-indicator>
<ui5-rating-indicator value="3"></ui5-rating-indicator>
<ui5-rating-indicator value="3.7"></ui5-rating-indicator>
</xmp></pre>
</section>

Expand Down

0 comments on commit 5ae48a8

Please sign in to comment.