Skip to content

Show fractional star fill for decimal average ratings - #611

Merged
bpepple merged 1 commit into
masterfrom
average-star-rating-improvement
Aug 22, 2026
Merged

Show fractional star fill for decimal average ratings#611
bpepple merged 1 commit into
masterfrom
average-star-rating-improvement

Conversation

@bpepple

@bpepple bpepple commented Aug 22, 2026

Copy link
Copy Markdown
Member

Summary

  • Average ratings (e.g. 3.2) previously rendered whole stars only, rounding down and coloring 3 of 5 stars for a 3.2 average with no visual indication of the remaining .2
  • Adds a star_fill_percent template filter (comicsdb/templatetags/rating_tags.py) that computes a 0-100% fill for each star position given a decimal average
  • Updates partials/rating_summary.html (issue/series detail headers) and the "Average Rating" display in partials/rating_widget.html (issue detail page) to render each star as a grey outline with a gold overlay clipped to that percentage, so a 3.2 average now shows stars 1-3 fully filled, star 4 at ~20%, and star 5 empty
  • The interactive "Your Rating" stars in rating_widget.html are unchanged — user ratings are always whole integers (1-5)

@bpepple bpepple self-assigned this Aug 22, 2026
@bpepple bpepple added the enhancement New feature or request label Aug 22, 2026
@bpepple
bpepple merged commit da922dc into master Aug 22, 2026
2 checks passed
@bpepple
bpepple deleted the average-star-rating-improvement branch August 22, 2026 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant