Add tool-tip with "Total Votes" and actual avg. to star rating in article lists

  • In article list views such as "https://www.sqlservercentral.com/articles" and "https://www.sqlservercentral.com/author/solomon-rutzky", there are star ratings above the author name on the right if any such ratings exist. Since the page is already doing a SELECT to get the average rating, and since there will also soon be the total number of reads (please see "blog vs author main page"), this seems like a good opportunity to add a COUNT(*) column to the AVG query used to get the rating, and show the count and the calculated avg in a tool-tip when the cursor is placed over the stars. Meaning, it would look something like:

     

    Total Votes: 223
    Avg. Rating: 4.23

     

    Why do this? For the same reasons (I am guessing) that Amazon does it: the stars are a good visual indicator, but don't really differentiate between:

    1. 3.9 (which I assume would show up as 4 stars) and 4.2 (which I assume would also show up as 4 stars).
    2. 5 stars (based on 2 votes) vs 4 stars (based on 300 votes) OR 1 star (based on 1 vote) vs 2 stars (based on 100 votes)

    Meaning: regardless of the intention of displaying the star ratings, since they are being displayed, and since people use them (for better or for worse) to make snap judgments (even if they don't consciously know that they're doing it), it would be nice to provide additional data points to give some context to info that can very easily be misleading.

     

    Super bonus points awarded if tool-tip is even closer to Amazon ratings by showing how many and/or what percent of each rating :-). But that's just proverbial pie in a proverbial sky.

     

    Thanks, Solomon..

     

    SQL#https://SQLsharp.com/ ( SQLCLR library ofover 340 Functions and Procedures)
    Sql Quantum Lifthttps://SqlQuantumLift.com/ ( company )
    Sql Quantum Leaphttps://SqlQuantumLeap.com/ ( blog )
    Info sitesCollations     •     Module Signing     •     SQLCLR

  • We have a bug already filed to add the rating. I'll add the count as well.

  • Awesome! Thanks Steve 🙂

    SQL#https://SQLsharp.com/ ( SQLCLR library ofover 340 Functions and Procedures)
    Sql Quantum Lifthttps://SqlQuantumLift.com/ ( company )
    Sql Quantum Leaphttps://SqlQuantumLeap.com/ ( blog )
    Info sitesCollations     •     Module Signing     •     SQLCLR

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply