Issue 2056: Half-star Ratings for Albums#2167
Conversation
FinnRG
left a comment
There was a problem hiding this comment.
Hi, thank you for your contributions. A few comments on the changes:
- The changeset is too large and contains unrelated changes. AFAICT you formatted the files using a different formatter. Please run
npm run formator check your setup - I don't like pulling in an entirely different framework for a single UI component. According to this fiddle: https://jsfiddle.net/jqwidgets/6bA3D/, jqWidgets might support a precision parameter for half star reviews. Could you check that out?
- Not a strict requirement, but it would be great if you could squash/rewrite your commit history to make it cleaner and reviews easier. It currently contains a lot of fixups that could be merged to the previous commits.
|
@FinnRG I addressed your changes:
I faced a lot of difficulty trying to get
In the end, none of these attempts worked, and I'm not entirely sure why. I suspect it has something to do with the way the DOM is rendered, as |
This PR addresses Issue 2056 by allowing users to submit half star ratings. In addition, ratings on pages are fractional as opposed to being whole stars. Below are screenshots taken from a local build of the PR:
Albums list under artist:

Album page:

Update pop-up:

This PR includes both front-end and back-end changes. The front-end changes are seen above. Notably, the
EditCollectionDialogcomponent for inputting a rating has a new import: the outdatedimport JqxRating from 'jqwidgets-scripts/jqwidgets-react-tsx/jqxrating';is replaced with a more modernimport Rating from '@mui/material/Rating';frommaterial-ui. For displaying fractional stars, the<Stars />component has been tweaked and is now used in places where stars were hard coded (e.g.AlbumReviews.tsx). The<StarsMeta />and<StarsMetaSpan />components were also changed.Because half-star ratings are allowed, the back-end has been updated to take
ratingand related members in asdoubleinstead ofint. Included in this PR is a migration script to migrate the MSSQL database frominttodouble.This change was tested locally and verified to work.