[ADF-4552][ADF-4482] Social component refactoring, add ability to unRate, added e2e automation (#4749)

* [ADF-4552] Rating component refactoring, add ability to unRate

* [ADF-4552] RTL support added

* [ADF-4552] Improve behaviour and styling structure in RTL languages

* [ADF-4552] Improve behaviour and styling structure in RTL languages

* [ADF-4552] Added refresh rating when the node Id input changes

* [ADF-4552][ADF-4482] Refactor social component, add ability to unrate, add e2e automation

* [ADF-4552][ADF-4482] Added unsibscribe from Observables, added css variables, removed unused class id's

* [ADF-4552][ADF-4482] Improve structure and behaviour of e2e automation tests

* [ADF-4552][ADF-4482] Improve structure and behaviour of e2e automation tests

* [ADF-4552][ADF-4482] fix expected single space

* [ADF-4552][ADF-4482] fix lint check failure

* Fix circular dependency error
This commit is contained in:
arditdomi
2019-06-03 14:27:13 +01:00
committed by Eugenio Romano
parent b19646d201
commit 3d67d9dc75
17 changed files with 571 additions and 124 deletions

View File

@@ -7,10 +7,18 @@ Last reviewed: 2019-01-14
# [Rating component](../../../lib/content-services/social/rating.component.ts "Defined in rating.component.ts")
Allows a user to add ratings to an item.
Allows a user to add and remove rating to an item.
It displays the average rating and the number of ratings. If the user has not rated the item the average rating stars color is grey.
![Rating component screenshot](../../docassets/images/social3.png)
If the user has rated the item the average rating stars color is yellow.
![Rating component screenshot](../../docassets/images/social2.png)
In order to remove the rating the user should click on the same star that he rated.
If the average is decimal number it will be rounded.
## Basic Usage
```html
@@ -31,7 +39,7 @@ Allows a user to add ratings to an item.
| Name | Type | Description |
| ---- | ---- | ----------- |
| changeVote | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Emitted when the "vote" gets changed. |
| changeVote | [`EventEmitter`](https://angular.io/api/core/EventEmitter)`<Object>` | Average rating is emitted when the "vote" gets changed. |
## See also