bug(ratings): Ratings around half value are wrongly choosen
olivierperez opened this issue · 1 comments
olivierperez commented
Describe the bug
Reading Design System's Rating doc it seemed that the number of stars shown in VitaminRatings
isn't correct.
For instance:
- the value 3.2 is closer to 3.0 than 3.5, so it should show ★★★✩✩ but it is showing ★★★[half-star]✩
- the value 3.5 is strictly equal to 3.5, so it should show ★★★[half-star]✩ but it is showing ★★★★✩
- the value 3.6 is closer to 3.5 than 4.0, so it should show ★★★[half-star]✩ but it is showing ★★★★✩
I double checked it by playing with the showcase.
To Reproduce
Show a Ratings with the values given as example above.
Screenshots
Actual ratings of 3.0, 3.1, ..., 3.9, 4.0
Excpected ratings of 3.0, 3.1, ..., 3.9, 4.0
Smartphone (please complete the following information):
- Device: One Plus 6
- OS: Red Velvet Cake
- Version: 11
ManonPolle commented
Thanks a lot @olivierperez for this complete issue and pull request ! I'll check as quick as possible