[6.x] Fix the stars rating field rendering#14820
Conversation
There was a problem hiding this comment.
This seems to undo a lot of the refactoring from 7827322. What has actually changed?
There was a problem hiding this comment.
I noticed 7827322 broke the way the stars worked with an input range, which meant the stars were mis-aligned on the frontend.
This is what Cursor said:
The computed value/min/unrated logic was brought back because the simplified version broke CSS thumb alignment and the unrated empty state. The inline style and inline @input from the refactor were kept. The substantive changes are min/step/unrated behaviour and CSS alignment fixes — not a return to the old architecture for its own sake.
I can try to bring it closer to your refactor…
There was a problem hiding this comment.
This looks like a more reasonable diff now—and the stars are working correctly on the rendered form
…evs can easily override
Description of the Problem
I noticed the star fills were not spaced correctly
What this PR Does
CSS
Logic
Behavioral note: A stored value of 0 still means “unrated”, but the slider visually sits at the first star position without showing fill.
So when there’s no rating:
Storage stays null / 0
Slider shows min (first star position) for alignment
CSS hides the fill via --unrated
The user never “selects 0 stars” — they either haven’t rated, or they’ve picked at least half a star.
How to Reproduce