Tuba icon indicating copy to clipboard operation
Tuba copied to clipboard

[Bug]: Strip out `:blahblah:` custom emojis from desktop notifications when possible

Open nekohayo opened this issue 1 year ago • 7 comments

Describe the bug

Mastodon (and probably others?) has a notion of non-emoji smilies and badges that have a syntax like :gnome: or :blobcat: and whatnot. However, since desktop notifications can't render images in the middle of a notification's text, these should be stripped out, as they use precious space that could show more contents in the notification.

Steps To Reproduce

  1. Have fancy followers with fancy things in their user display name, or the contents of their replies

Logs and/or Screenshots

Example of such a fancy follower in action, feat. MC @cassidyjames :

image

Instance Backend

Mastodon

Operating System

Fedora 39

Package

Flatpak

Troubleshooting information

os: GNOME 45 (Flatpak runtime) prefix: /app flatpak: true version: 0.5.0 (production) gtk: 4.12.3 (4.12.1) libadwaita: 1.4.0 (1.4.0) libsoup: 3.4.3 (3.4.3) libgtksourceview: 5.10.0 (5.10.0)

Additional Context

No response

nekohayo avatar Dec 02 '23 19:12 nekohayo

:thinking: I have many people on my timeline that have their display name set to just custom emojis. Notifications from them would appear empty if we strip custom emojis out

We could do something like, stripping them out and if what's left is less than 4(?) characters, keep them in

GeopJr avatar Dec 02 '23 19:12 GeopJr

Even with relatively short display names, I find those :blahblah: to be problematic as they make the whole thing harder to read (especially quickly). Maybe what you could do is to have a check whether there is something other (and before) than those thingies, and in that case do the cleanup; if however there are only those thingies in the username (or message), then show those thingies as they are then the main content?

nekohayo avatar Dec 02 '23 19:12 nekohayo

Throwing another idea: ellipsizing all names to something like 20 characters? So it'd become "Cassidy James :gnome...", that would also prevent extremely large names from taking over the notification title

GeopJr avatar Dec 02 '23 19:12 GeopJr

Counter-counter idea: emoji-only-nicknamed users, or users with extremely long display names, could maybe be displayed with their the first part of their username instead, ex: just @bobbyprince (instead of "@[email protected]" or the full display name "Bobby Prince the :metal: composer who played the hapsichord in Doom II's Map 09 :imp:")... Together with avatars being shown as per #426, I'd think most users would still be recognizeable...

nekohayo avatar Dec 02 '23 19:12 nekohayo

I'd love if notifications showed the handle, rather than the display name. Many people I follow frequently change their display names to something wild, which I have trouble recognizing at a glance, so I usually recognize them by their handle or in some rare cases, their avatar.

If there would be an option to display the handle, that'd be fantastic, and would solve both my problem, and the many custom emojis too (which is another "problem" I have: the people who don't change their display names frequently, usually have emojis in their username. Fedi is delightfully weird. :D).

algernon avatar Feb 18 '24 08:02 algernon

:thinking: Handle-only does make sense however, one edge-case at the top of my head is instance admins or single instance users that usually give themselves a generic username @a, @admin, @me... Maybe it's not that big of an issue next to the avatar?

GeopJr avatar Feb 18 '24 15:02 GeopJr

Bumping

  1. I have a mutual whose display name is :sm64_h: :sm64_e: :sm64_r: :sm64_t: :sm64_o: :sm64_g:. Straight up removing custom emojis would turn it into :x:
  2. I see people with the same display name but different suffix custom emojis Luna :neocat: vs Luna :neofox:. So checking if there's text available after removing custom emojis, can still lead to confusion :x:
  3. Server admins use generic names for their admin accounts, [at]a [at]admin [at]me, so displaying just the handle is not really enough. Plus, handles being unique might lead to people trying to workaround their desired taken ones. So say, [at]GeoooopJr[at]faraway.town followed you, is it an impersonator? or was my usual handle taken? Lastly, handles can actually be a lot larger than display names. While display names have limits on most backends, handles use the full domain names which can be huge with subdomains... back to square 1 :x:

I'm mostly listing concerns to find the best solution out of all of these. Yes, pfp makes most of these null but we do have to be careful for impersonators somewhat.

The reality is that xdg notifications are just too limited :shrug:

I'm personally +1 for ellipsizing after ~30 chars without removing custom emojis

GeopJr avatar May 29 '24 20:05 GeopJr