GeopJr / Tuba

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

[RFC]: Profile popup on hover #495

Closed GeopJr closed 6 months ago

GeopJr commented 1 year ago

Proposal

Most web clients show a mini profile when you hover over user avis, we could do that too. It allows for a quick preview of people's profiles (like their follower stats, pronouns, if they are automated, whether they are the official one (/ verified links)) plus relationship operations (status (follows you, mutuals) and follow/unfollow)

Screenshots

Screenshot from 2023-09-06 20-42-54

Technical

Showing a popover on hover is needlessly complex but can be done. Otherwise, right click or long tap are options but will probably not comply with the HIG as they are kind-of hidden.

Widget-wise, it's the same as the profile cover with some small changes like making the profile stats labels instead of buttons and avoiding binds.

The relationship status requires an additional request that shouldnt be cached but should be kept in memory for the duration of the popover's parent existence. Additionally, it should only be requested when the popover is first triggered to avoid spamming the instance.

LukaszH77 commented 1 year ago

The popover from your screenshot seems like a bit too much. Maybe skip the links section?

GeopJr commented 1 year ago

I think the fields are somewhat important: 1) You can see if the account is the official one through its verified links (for example on the screenshot, I know the CrystalLanguage account that posted that is the official one since it has verified crystal-lang.org) 2) Other info you'd need at a glance are probably in the fields too, like if you are replying to someone and want to quickly see their age, pronouns, languages they speak etc

But I agree that it's a bit too much and can get worse on servers that allow many more fields. We can maybe hide the fields behind a collapsable row (like the profile edit dialog), what do you think?

LukaszH77 commented 1 year ago

We can maybe hide the fields behind a collapsable row (like the profile edit dialog), what do you think?

It's a reasonable compromise.

GeopJr commented 6 months ago

RFC update:

I decided to make it open on secondary click and long press on touch. The reason being that popovers are 'locking'. They take focus and dismissing them outside of their default behavior is non-trivial