Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Like to dislike bar appearing misaligned #809

Closed
shamshitty opened this issue Nov 5, 2022 · 32 comments · May be fixed by #835
Closed

Like to dislike bar appearing misaligned #809

shamshitty opened this issue Nov 5, 2022 · 32 comments · May be fixed by #835
Labels
bug Something isn't working

Comments

@shamshitty
Copy link

Browser

Firefox

Browser Version

106.0.5

Extension or Userscript?

Extension

Extension/Userscript Version

v3.0.0.6

Video link where you see the problem

https://youtu.be/8vOAMh3NIeg

What happened?

The ike to dislike ratio bar appears completely misaligned under the like and dislike buttons due to (i assume) the new UI redesign. I expected the bar to be either under the buttons or not there at all
image

How to reproduce/recreate?

Go to any youtube video with the latest version of the extension installed

Will you be available for follow-up questions to help developers diagnose & fix the issue?

Yes

@shamshitty shamshitty added the bug Something isn't working label Nov 5, 2022
@nsde
Copy link

nsde commented Nov 9, 2022

image

Same

@ghost
Copy link

ghost commented Nov 9, 2022

also like that on Chrome

@aceilort
Copy link

aceilort commented Nov 9, 2022

Same thing using Userscript

@TheTrashCrafter
Copy link

as a workaround you can block the bar using ublock origin or so.

@nsde
Copy link

nsde commented Nov 10, 2022

as a workaround you can block the bar using ublock origin or so.

how did you do it?

@TheTrashCrafter
Copy link

@nsde I right clicked the bar, selected Block Element and selected the create button.

@nsde
Copy link

nsde commented Nov 10, 2022

ok

@meisme-dev
Copy link

image
Not as misaligned for me but it still looks weird

@ErykDarnowski
Copy link
Contributor

Hey, this was fixed in this PR!
Let me know if the issue still persists (I couldn't re-create it on my end).

@vikdean
Copy link

vikdean commented Nov 14, 2022

Same in Brave; also the ratio is off quite a bit
image

@ErykDarnowski
Copy link
Contributor

ErykDarnowski commented Nov 14, 2022

Wrong ratio

Ohhh yeah, I saw this bug too but couldn't replicate it 😅 (it's a separate thing to what I've worked on though).

Misalignment

Please install the extension from the repo (NOT the Chrome Web Store) and check again as I can't replicate anything similar to your screenshot. Although I have noticed that something's up with the centering (it's only a couple px though, nothing close to what the screenshot shows).


Would you mind specifying Brave's version and the YouTube video link?

@vikdean
Copy link

vikdean commented Nov 15, 2022

Wrong ratio

Ohhh yeah, I saw this bug too but couldn't replicate it 😅 (it's a separate thing to what I've worked on though).

Misalignment

Please install the extension from the repo (NOT the Chrome Web Store) and check again as I can't replicate anything similar to your screenshot. Although I have noticed that something's up with the centering (it's only a couple px though, nothing close to what the screenshot shows).

Would you mind specifying Brave's version and the YouTube video link?

Brave [Version 1.45.123 Chromium: 107.0.5304.110 (Official Build) (64-bit)])
Video: https://www.youtube.com/watch?v=x4CqnTF0lkc

But now it looks fine, seems to be intermittent, or just happening when there are 0 dislikes.
image

@ErykDarnowski
Copy link
Contributor

Okay, it looks like we're both on the same Brave version.
After testing this on ~30 videos, besides the really small misalignment I've talked about earlier (only a couple px) I just can't seem to get something as bad as on the screenshots even with:

  • reloading multiple times
  • clearing cookies
  • logging in
  • logging out

It's important to keep in mind that this testing was of course done using the GitHub version.

image


Here are a couple videos that have 0 dislikes:

@vikdean
Copy link

vikdean commented Nov 15, 2022

I'm on v3.0.0.6, and yes, the issue appears when there are no dislikes.
image
image
image
The ratio issue was the bigger problem in my opinion, but that hasn't resurfaced.

@ErykDarnowski
Copy link
Contributor

Wow... Now I'm really confused. I've tried to replicate this on both the main repo, my fork and the Chrome Web version and the only way I could get that misalignment was of course with the Chrome Web Store version.

I'm wondering what else could contribute to that. Have you tried the things I did?

  • reloading multiple times
  • clearing cookies
  • logging in
  • logging out

Ohh and are you absolutely sure you're not using the Chrome Web Store version?

@vikdean
Copy link

vikdean commented Nov 15, 2022

3.0.0.6 for me is the Google Web Store version, yes, thats what I’m using.
Havent really spent much time on this to be honest, since its purely cosmetic…

@ErykDarnowski
Copy link
Contributor

Ok, so that's the issue. If you'd switch to the repo version you wouldn't encounter the issue anymore.

@Ansh4011
Copy link

Ansh4011 commented Nov 15, 2022

@ErykDarnowski Hey Bro! I got a quick and probably easy solution to fix the whole dislike counter misalignment.

Use Halfwidth Hangul Filler Unicode Character (U+FFA0) before the dislike counter text (no spaces in between) which basically shifts the dislike text a bit towards the right and the whole issue gets resolved, and no issue while zooming in and out either. Halfwidth Hangul Filler is basically a transparent yet selectable via cursor character. The thing is between these emojis 👉👈.
Website for more details about the character- https://www.compart.com/en/unicode/U+FFA0
[PS- you can even troll people with this character 😂.]

Sample-
(Before)

(After)

@ErykDarnowski
Copy link
Contributor

ErykDarnowski commented Nov 15, 2022

Hey @Ansh4011 that's a great solution. Thing is this issue is referring to the missalignment of the ratio bar! 😅

There are however a couple issues that would greatly benefit from your fix though. They ones that caught my eye are these 2 (but I haven't looked through every issue so there may be more):

@Ansh4011
Copy link

Hey @Ansh4011 that's a great solution. Thing is this issue is referring to the missalignment of the ratio bar! 😅

There are however a couple issues that would greatly benefit from your fix though. They ones that caught my eye are these 2 (but I haven't looked through every issue so there may be more):

Lol nvm for posting in the wrong place.😂
Thanks!

@ToothyDev
Copy link

Still a problem after the update...
image

@ghost
Copy link

ghost commented Nov 22, 2022

now it's not even there for me
Screen Shot 2022-11-21 at 9 26 32 PM

@vortaj
Copy link

vortaj commented Nov 22, 2022

Still misaligned, but now only slightly
dsl

@ErykDarnowski
Copy link
Contributor

Yes, I've recently also noticed this!
I'll try to resolve it as soon as I can.

@ErykDarnowski
Copy link
Contributor

Okay, I think I've found what's wrong.

The main coulprit seems to be left: -4 CSS in the .ryd-tooltip-new-design class!
I'll work on a PR for this soon.

@ErykDarnowski
Copy link
Contributor

ErykDarnowski commented Nov 24, 2022

Okay I've decided to take the approach of making the bar width, the same as the like + dislike buttons container (the same the extension did back in the times of the old YT design).


This will be done by:

  1. Removing left: -4 CSS from the .ryd-tooltip-new-design class.
  2. Using a different approach to calculate the bar's width (one that doesn't round):
// New:
parseFloat(window.getComputedStyle(getLikeButton()).width); // e.g. `150.55`

// Old:
getLikeButton().clientWidth // e.g. `151`

This new approach will be implemented because I've noticed that the bar was protruding a little too much on the right side, compared to the like + dislike button container:

screen

@ToothyDev
Copy link

For some reason, the dislike bar is in the right spot again without an extension update, but for me its slightly offcentered to the left now

@ErykDarnowski
Copy link
Contributor

Yes, I'm aware of that I fixed it in this PR!

@ToothyDev
Copy link

Alright, just wasnt sure why the bar suddenly appeared (at all) in the right spot again without any extension update

@ErykDarnowski
Copy link
Contributor

There must've been an update (maybe an automatic one) as I've implemented that fix (just didn't notice the 4px shift to the left, which I'm fixing with the PR I've linked in my previous comment).

What version of the extension are you running @ToothyDev?

@ToothyDev
Copy link

3.0.0.7

@ErykDarnowski
Copy link
Contributor

Yup! Must have auto updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.