elliotwaite / thumbnail-rating-bar-for-youtube

A Chrome and Firefox extension for YouTube that adds a rating bar (likes/dislikes ratio) to the bottom of every thumbnail.
https://chrome.google.com/webstore/detail/youtube-thumbnail-rating/cmlddjbnoehmihdmfhaacemlpgfbpoeb
MIT License
248 stars 17 forks source link

[Feature request] Paint 1 unit (like/dislike) in a different color #84

Open TuTAH1 opened 1 year ago

TuTAH1 commented 1 year ago

Let's call it "unit color", it will be between likes and dislikes on preview bar (instead of white bar separator).

What:

  1. Suggest that the video have 1 more dislike, paint the difference between dislike bar length with and without additional dislike in other color. (videos with 0 dislikes will only have like color and unit color) If video have only dislikes, make 1 like difference instead of dislike. The algoritm may be different, the suggested algorithm just would work well with "exponational" setting too without any tweaks

  2. Add the number of ratings if "Add a color-coded text rating percentage to each video listing." enabled (like 100%/137 or 98.7%/12k)

Why:

To see the approximate number of ratings, so the video with 5/0 (likes/dislikes) rating will be visually different from 1000/0 rating; 2/1 will be different from 100/50 etc.

elliotwaite commented 1 year ago

Thanks for the feature request. This is an interesting idea. I currently don't have time to work on this, but if someone wanted to implement this, I'd be open to reviewing a PR. But if someone wants to write a PR, let's discuss its implementation before you do.

Another way to do it, instead of just coloring a unit dislike, would be to color both a unit like and a unit dislike. For example, if the colors were [green: like, dark-green: unit like, dark-red: unit dislike, red: dislike], and the bar was 100px wide, then these ratings could result in these bars (assuming linear scaling):

7 likes, 3 dislikes -> [60px green, 10px dark-green, 10px dark red, 20px red] 4 likes, 0 dislikes -> [75px green, 25px dark-green] 0 likes, 4 dislikes -> [25px dark-red, 75px red]

In exponential scaling mode, it seems like the width of the unit like and unit dislike would depend on the rating, since if it had a lower rating, the separator would be more to the left, and the unit widths in the left part of the bar are narrower than those on the left, at least that's how I interpret it, as if the rating bar had log-scaled grid lines. This might make the unit widths harder to interpret, but they could still offer some kind of insight into the total number ratings.

Another thing to consider about adding this feature is that it might require updating the options window to allow for more room for additional options. Right now, the options pane nicely fits all the available options without requiring scrolling. Adding this option and the option to customize the unit colors would probably require changing the options pane to have a scrollable section.

Those are just my initial thoughts. Again, I don't have time to work on this at the moment, but if someone wants to take on implementing this, let's figure out the issues discussed above before you do. And if no one implements it, and I feel like adding it in the future, I might code it up myself. And, thanks again for submitting this idea.

elliotwaite commented 1 year ago

Another way to implement it for exponential scaling, instead of thinking of the rating bar as having logarithmically spaced grid lines, would be to just divide the total width of the likes bar by the number of likes to get the unit-like width, and similarly to get the unit-dislike width.

For example, when using exponential scaling, a rating of 90% is displayed as being 50%. So for a rating of 90 likes and 10 dislikes, and a rating bar width of 100px, the unit-like would be (50px / 90 = 0.55556px) and the unit-dislike would be (50px / 10 = 5px). So the bar would be: [49.44444px green, 0.55556px dark-green, 5px dark-red, 45px red]

This would also allow for a nice interpretation of how much weight a like has compared to a dislike for the current rating. For example, using the 90 likes and 10 dislikes example above, you could think of each like as having a weight proportional to 0.55556px and each dislike as having a weight proportional to 5px.

TuTAH1 commented 1 year ago

I don't think both like&dislike units simultaniously will be usefull – in the linnear scaling it will be just the same (so, second bar won't give any useful info) and in exp rating one of the unit bars will be barely visible, so it will be useful only for visualising how exp rating works, but not for unit weight (since it's barely visible, so hard to interpret and user will be looking for other bar for info anyway. But it's still an interesting idea).

Regarding the settings window, if it would have an additional options (like display single or both units), why don't just add more height or width to a window? For now when I open a settings window, I see a small window with 1:1 ratio that already have a bit of scrooling (probably, becouse of my system scaling). Is it possible to just change its size if needed? image If no, the solution will be to make a settings as a page (I seen this implementation in most of extensions), so the size will be only limited to [browser window resolution]/[system scaling] and with no limits in implementing adaptive design (so, no limits to implementing as many option as you want) or making "advating settings" button in the default settings window that will refer to a page with advanced settings. The 3rd solution will be making sub-windows or collapsible items (what automatically means more clicks for results and less informative). If there wouldn't many settings, you can just decrease text to slider margins that will make space for 1-3 options And there's also space for ~2 options in the right

In the 3rd implementation variant, how does it will show a video with no likes/dislikes?

elliotwaite commented 1 year ago

My thoughts about adding both link and dislike unit bars were that it might be nice because you would still be able to see at least one of them even if the video had 0 likes or 0 dislikes. Also, it seems somewhat arbitrary to just show it for the dislikes, but not the likes, or vice versa. Also, I thought it might add some nice symmetry. Also, to me, it would make the exponential scaling make more sense, even if the like unit would be less visible. I figure, in a lot of cases the unit bars won't be visible, even with linear scaling, especially with popular videos, but they would still be visible with fewer ratings, linear or exponential. But both options could be tried to see which is preferred. And maybe that could even be made an option.

I think the reason for the current window size is that it is max size allowed on Chrome for that dropdown mode (if I remember correctly). But I think just switching it to a single-column layout that is scrollable would make sense.

I was thinking when videos have no likes/dislikes in exponential scaling, it would work the same way as it does in linear scaling, just divide the total area by the number or ratings to get the width of the unit-rating.