BDX-town / Mangane

Alternative frontend for Akkoma
https://bdx.town
GNU Affero General Public License v3.0
148 stars 26 forks source link

Hovering the like button on a post shift the like number #303

Open R3laxAti0n opened 6 months ago

R3laxAti0n commented 6 months ago

Hello, I was consulting a public post on the BDX Town instance and I discovered that hovering over the like button make the like number shift a bit.
Screen for better comprehension :
Without hover
image With hover
image

I was on Vivaldi (latest update at the time - 6.6.3271.53).

I'm not sure it's expected behavior so I raised this issue.

Dehelssey commented 6 months ago

https://github.com/BDX-town/Mangane/assets/20315413/9cf58c34-66b9-4d3d-954b-db0636426ca4

I checked the code and a counter is hidden on hover just for another one to be displayed...

.emoji-reacts-container:hover .emoji-reacts__count {
    display: none;
}

.emoji-reacts-container:hover .emoji-react__count {
    display: inline;
}

Based on the class names i realized one div is a counter for all the reactions, the other is a counter for one kind of reaction i added another reaction to show the behaviour

https://github.com/BDX-town/Mangane/assets/20315413/0f0a4e9a-129f-480d-b4c5-b04d7c6c0bfa

nevertheless, number shouldn't "move" when only one type of reaction exists