Skip to content
This repository has been archived by the owner on Apr 10, 2023. It is now read-only.

Change the way ratings are displayed #32

Closed
knjk04 opened this issue May 16, 2020 · 1 comment · Fixed by #37
Closed

Change the way ratings are displayed #32

knjk04 opened this issue May 16, 2020 · 1 comment · Fixed by #37
Labels
enhancement New feature or improvement of an existing feature request good first issue Good for newcomers

Comments

@knjk04
Copy link
Member

knjk04 commented May 16, 2020

Is your feature request related to a problem? If so, please describe.
The rating field in the list of books in a given shelf show as their enum value (e.g. NINE), rather than 9/10 (see screenshot).

Describe the solution you'd like
Ratings are shown as a fraction out of 10. For example, if the rating is NINE_POINT_FIVE, it should be displayed as 9.5/10.

Additional context

How the ratings are shown in the list of books in a given shelf:
rating

Current enum:

public enum RatingScale {
    ZERO,
    ZERO_POINT_FIVE,
    ONE,
    ONE_POINT_FIVE,
    TWO,
    TWO_POINT_FIVE,
    THREE,
    THREE_POINT_FIVE,
    FOUR,
    FOUR_POINT_FIVE,
    FIVE,
    FIVE_POINT_FIVE,
    SIX,
    SIX_POINT_FIVE,
    SEVEN,
    SEVEN_POINT_FIVE,
    EIGHT,
    EIGHT_POINT_FIVE,
    NINE,
    NINE_POINT_FIVE,
    TEN
}

This should be similar to issue #20.

Related branch: ui. Please create your branch off ui and submit a PR to merge into it when done.

@knjk04 knjk04 added enhancement New feature or improvement of an existing feature request good first issue Good for newcomers labels May 16, 2020
tacianosilva added a commit to tacianosilva/book-project that referenced this issue May 19, 2020
I changed the type of the rating attribute from NumberField to ComboBox
<RatingScale>.

I have not found how to format the output of a NumberField.
@knjk04 knjk04 linked a pull request May 20, 2020 that will close this issue
tacianosilva added a commit to tacianosilva/book-project that referenced this issue May 20, 2020
For example, if the rating is NINE_POINT_FIVE, it should be displayed as
9.5/10.
@knjk04 knjk04 linked a pull request May 20, 2020 that will close this issue
@knjk04 knjk04 removed a link to a pull request May 20, 2020
@knjk04
Copy link
Member Author

knjk04 commented May 27, 2020

See PR 37

@knjk04 knjk04 closed this as completed May 27, 2020
kaansonmezoz pushed a commit to kaansonmezoz/book-project that referenced this issue Aug 2, 2020
For example, if the rating is NINE_POINT_FIVE, it should be displayed as
9.5/10.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or improvement of an existing feature request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant