GeopJr / Tuba

Browse the Fediverse
https://tuba.geopjr.dev/
GNU General Public License v3.0
504 stars 55 forks source link

[Bug]: The margin of the popover when clicking on an avatar is odd #1042

Closed Kekun closed 4 days ago

Kekun commented 5 days ago

Describe the bug

In messages, when clicking on the avatar of its author there's a popover that gives information about this author's account. This popover has some odd looking margin between its border and its content, it breaks the look of the scrolled window, its shadows, its scrollbar is oddly in the middle, etc.

Steps To Reproduce

  1. Go to some message
  2. Click the author's avatar to reveal the popover

Logs and/or Screenshots

Capture d’écran du 2024-06-26 10-19-47 Capture d’écran du 2024-06-26 10-19-20

Instance Backend

Mastodon

Operating System

Fedora Linux 40.20240617.0 (Silverblue)

Package

Flatpak

Troubleshooting information

os: GNOME 46 (Flatpak runtime) prefix: /app flatpak: true version: 0.8.1 (production) gtk: 4.14.4 (4.14.4) libadwaita: 1.5.1 (1.5.1) libsoup: 3.4.4 (3.4.4) libgtksourceview: 5.12.0 (5.12.0)

Additional Context

No response

GeopJr commented 5 days ago

The padding is the default style for all popovers, could you point me on the exact issues / what should change and how?

For example, in your screenshot, I see these borders looking out of place image

And these don't really match image

Border radius should probably be dropped or set it to a more appropriate value, like the account switcher popover image

Kekun commented 5 days ago

Yeah I tried to quickly hack a thing in the inspector when writing this report, but I didn't manage to do a thing because I couldn't get the popover to stay there while I was browsing the inspector. I'll have to build the app and all, which is more involved and will take me more time, so that'll be when I'll be able to find the time for it.

GeopJr commented 5 days ago

You can still hack on it, if you want to give it a try (will probably require using many wildcard selectors):

popover > * {
 padding: 0;
}

popover .ttl-profile-cover content {
 border-radius: 0px;
}

image

Kekun commented 5 days ago

This is enough in my tests:

popover > contents {
    padding: 0;
}

Except of course it should be turned into a class to have it applied only on the relevant popovers.

Capture d’écran du 2024-06-26 19-02-32 Capture d’écran du 2024-06-26 19-03-05

Kekun commented 5 days ago

That being said there's a difference between the main branch and 0.8.1: the covers aren't rounded in main.

Kekun commented 5 days ago

Alright, expect a PR really soon.

GeopJr commented 4 days ago

That being said there's a difference between the main branch and 0.8.1: the covers aren't rounded in main.

Nothing has changed https://github.com/GeopJr/Tuba/compare/v0.8.1...main :thinking:

Alright, expect a PR really soon.

Thanks!

Overall, while it does look better, I don't know if the padding was there for an accessibility reason, for example differentiating popovers from the background

Kekun commented 4 days ago

Nothing has changed https://github.com/GeopJr/Tuba/compare/v0.8.1...main 🤔

Yeah IDK why but I had some weird behavior I haven't been able to reproduce. :shrug:

Overall, while it does look better, I don't know if the padding was there for an accessibility reason, for example differentiating popovers from the background

Frankly I doubt it'd help in any way regarding a11y, I think they were it only because it makes sense in most cases to have some padding so the devs don't have to add it, and it helps keeping it consistent across apps, but the mini profile popover is one of these cases where you want to drop it and bake the padding yourself.