Tuba
                                
                                 Tuba copied to clipboard
                                
                                    Tuba copied to clipboard
                            
                            
                            
                        [Bug]: Strip out `:blahblah:` custom emojis from desktop notifications when possible
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
- 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 :
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
: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
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?
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
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...
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).
: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?
Bumping
- 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- I see people with the same display name but different suffix custom emojis Luna :neocat:vsLuna :neofox:. So checking if there's text available after removing custom emojis, can still lead to confusion :x:
- 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