Decathlon / vitamin-compose

Decathlon Design System UI components for Compose applications
https://www.decathlon.design
Apache License 2.0
268 stars 29 forks source link

bug(ratings): Whole number ratings displays as half ratings #151

Closed Gregesteban closed 1 year ago

Gregesteban commented 1 year ago

Describe the bug

When providing whole number rating to a VitaminRatings.ReadOnly composable, it is displayed with a half more note that it should.

According to a bit of debugging, a missing case of handling .0 decimals is located here

To Reproduce

Expected behavior

There should be no half stars displayed.

Screenshots

Here the exact note is 3.0

image

Smartphone (please complete the following information):

ManonPolle commented 1 year ago

Thanks a lot for spotting and creating this issue. We will look at it as soon as possible. Don't hesitate to contribute if you'd like.