iampueroo / rComments

Chrome and Firefox extension for quickly exploring Reddit comments and replies without having to click through to the post!
http://iampueroo.github.io/rComments/
37 stars 3 forks source link

nth child background color weirdness on dark mode old reddit #25

Open iampueroo opened 3 years ago

iampueroo commented 3 years ago

Summary

To recreate, go to https://old.reddit.com/r/soccer/ with RES dark mode. After hovering on a comment, clicking "next reply" seems to trigger a swap of background color. Plus, the background color of each comment seems to be applied on the wrong element.

iampueroo commented 3 years ago

Upon more investigation, it seems that this is an :active-type behavior added by RES

iampueroo commented 3 years ago

Root cause seems to be that RES is listening to click events that bubble up to the entry class. I cannot simply stop the event propagation since there is only one event handler on rComments added directly to the parent popup, which is a parent of entry.

Possible Solutions:

  1. Move the event handler of "Next Reply" directly on the element and stop its propagation after handling
  2. Undo the stylings added by the RES class only on the popup
  3. Remove the entry class, "manually" add all the stylings from the Reddit stylesheets (this seems to be the least desired).

In general, I'd leave this as a low priority, as it only affects users on the old Reddit with RES.

iampueroo commented 3 years ago

Note: this affects both light and dark mode on RES, so it's quite annoying.

iampueroo commented 3 years ago

@azizLight - Pinging you since you've been helpful and curious if you've seen this (I know you use quite a bit of extensions). Do you use rComments w/ RES on old reddit? and if so, does the "active" stylings on "Next Reply" click annoy you? I'm assuming the "active" class is important since RES allows traversing comments via keys, so I'm curious if you have an opinion.

Again, my hopeful fix is to still allow the highlighting to continue, but just not automatically highlight the comment when you click the "Next Reply".

azizLIGHT commented 3 years ago

This is what I see on old reddit with RES dark mode:

https://user-images.githubusercontent.com/8013867/122597641-a848f900-d039-11eb-8026-3c14416b8a3e.mp4

Honestly its not a bother to me, its sort of useful maybe? Though I can get it to highlight multiple comments after I click the body of a subcomment and load a new parent comment and click it's next reply link. Either way I'm not that concerned with it but maybe it bothers other people?

https://user-images.githubusercontent.com/8013867/122598323-ad5a7800-d03a-11eb-869d-1a45375b00ce.mp4

It's upto you how you want to handle it!