Bug 460760 - Notification badges for most applications using built-in notifications system
Summary: Notification badges for most applications using built-in notifications system
Status: RESOLVED NOT A BUG
Alias: None
Product: plasmashell
Classification: Plasma
Component: Task Manager and Icons-Only Task Manager (show other bugs)
Version: git-stable-Plasma/5.26
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-10-20 12:51 UTC by Yevhen Popok
Modified: 2022-10-20 19:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yevhen Popok 2022-10-20 12:51:21 UTC
SUMMARY
***
Plasma 5.20 switched to "Icons-Only Task Manager" by default. It brought overall better presentation but also exposed issue with Chat and Email applications.
In a days of a "classic taskbar" (icon + text) programs used to blink or print some text to bring user attention that there's a new chat or e-mail message etc. Since "classic taskbar" is considered obsolete now, both OS/DE and application devs drop such things.
Nowadays users should rely on notifications, tray indicators, shaking effects and "unread badges". Unfortunately Linux Desktop Environments still doesn't have a stable universal API for notification badges. For now there still exist Unity API which KDE Plasma supports. But it's not something application developers would target & distros pre-install. Among messaging apps which supports libunity I know  "Telegram Desktop" and "Ferdium".  Most other apps (e.g. "Viber", "Skype", "Thunderbird", "Google Chat" PWA etc) doesn't. Situation is even worse with new packaging formats (Snap, Flatpak) which could potentially "burn bridges" to Unity API, even for Electron apps.
Recently I've discovered that GNOME extension developers figured out how to get notification counters/badges even without Unity API (references bellow). Basically they get information about unread notifications from the message tray and place number as a badge/indicator on "taskbar icon". When user opens program window, notification is considered as "read" and "badge" disappears. It works fairly well.
Looking at the Notification applet "unread messages", I presume that Plasmashell knows/remembers which programs generated notifications, how many etc. So theoretically this feature could be implemented in KDE Plasma as well.
Again, since we still don't even have a stable API, lots of legacy & proprietary applications, I just don't see a better resolution for this problem (which won't take years to implement and adopt).

Additional option to workaround this issue is a "notification counter" instead/beside a "bell" icon but that's probably should be a separate issue.

---

Aforementioned GNOME extensions:
- RocketBar (https://github.com/linux-is-awesome/gnome_extension_rocketbar)
- Dash to Panel with unofficial modification (https://github.com/home-sweet-gnome/dash-to-panel/issues/1695#issuecomment-1160077515)
- Notification Counter (https://github.com/vkrizan/NotificationCounter)
- new-mail-indicator (https://github.com/fthx/new-mail-indicator)
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Receive a notification about new message at any messaging application that doesn't support UnityAPI ("Thunderbird", "Google Chat", Viber, Skype, Electron chat apps etc) 
2. Check if application icon at "Icons-only Taskbar has an "unread notification" badge

OBSERVED RESULT
Application icon doesn't inform about new messages

EXPECTED RESULT
Application icon has a badge with an unread messages counter

SOFTWARE/OS VERSIONS
Linux/KDE Plasma:  KDE Neon User Edition
KDE Plasma Version: 5.26.0
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Comment 1 Nate Graham 2022-10-20 19:49:53 UTC
I'm frustrated by this situation too, and what you've found for GNOME is a cool hack, but it's very much that: a hack. If we did that, we'd be chasing down weird bugs in apps for years, and taking the responsibility to do so in a way that would stretch our resources. This is why formal APIs exist. So the better solution is for the Unity Launcher API to be standardized and upstreamed, but even than that doesn't *need* to happen for apps to adopt it anyway. As you pointed out, a variety of apps already implement it. The ones that don't could.