openlibrary icon indicating copy to clipboard operation
openlibrary copied to clipboard

Add Star Ratings & Want To Read counts to Search Result Cards

Open merwhite11 opened this issue 6 months ago • 6 comments

Closes #9463

Pulls ratings_count, ratings_average and want_to_read_count fields from Solr. Creates a new macro that accesses these fields and displays ratings_count in star graphic and ratings_count and want_to_read_count in Search Results cards.

Technical

Testing

When testing in my local environment, I manually updated the star ratings on the books page to trigger the StarRatingsByline macro to display.

Screenshot

Screenshot 2024-08-22 at 3 02 10 PM

Questions

I created a conditional that requires a minimum of 1 ratings_count and 1 want_to_read_count in order for the StarRatingsByline to display. Should I split up the conditional so that star ratings will display, even if there is no want_to_read_count ?

Stakeholders

@mekarpeles

merwhite11 avatar Aug 22 '24 22:08 merwhite11