-
Notifications
You must be signed in to change notification settings - Fork 807
GWL: add notification badges to panel icons #12569
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
Yes, new features don't go in past BETA. |
|
I don't know if I like the two numbers side by side (it excludes a big portion of the top of the icon and presents two conflicting pieces of information side by side, requiring more effort than necessary to interpret the values since they are very close, despite having different colors). We could try to think of a better way to present that information until the next merge period for the next release. |
Why? I'm not using a phone OS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds new notification badges for panel icons by introducing a separate badge for notifications along with the existing window count badge and removes the "Show window count numbers" configuration. Key changes include:
- Passing a new desktopEntry hint to notifications in both notificationDaemon.js and messageTray.js.
- Adding event handling for notification updates in workspace.js.
- Overhauling the appGroup.js code to support separate badges for windows and notifications.
Reviewed Changes
Copilot reviewed 5 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| js/ui/notificationDaemon.js | Updated notification creation to include the desktopEntry hint. |
| js/ui/messageTray.js | Extended Notification class and documentation to support desktopEntry. |
| files/usr/share/cinnamon/applets/[email protected]/workspace.js | Added connection to notify-applet-update and a new notificationReceived handler. |
| files/usr/share/cinnamon/applets/[email protected]/applet.js | Removed the obsolete updateWindowNumberState function. |
| files/usr/share/cinnamon/applets/[email protected]/appGroup.js | Modified badge layout and introduced methods for updating notification and window count badges. |
Files not reviewed (3)
- data/theme/cinnamon-sass/_colors.scss: Language not supported
- data/theme/cinnamon-sass/widgets/_windowlist.scss: Language not supported
- files/usr/share/cinnamon/applets/[email protected]/settings-schema.json: Language not supported
|
@anaximeno How about in opposite corners. I can't think of anything else that will work with all themes except badges. |
It looks better this way you did it now, in my opinion. Good choice.
Yeah, the options are limited thanks to that. |
1235bc4 to
b33185a
Compare
5a21309 to
55d292a
Compare
543b7bf to
74f74ea
Compare
|
Is there an option to disable it completely? |
|
@leigh123linux Not atm. Perhaps I should add that? |
It would match the option to disable window count.
|
|
@leigh123linux Ah, I removed that as well. :P |
850faf7 to
4907aa0
Compare
|
@leigh123linux I've added the option to hide notification badges. Do you think the option to show window number should be added back? I don't have a strong opinion on this myself. |
|
@clefebvre Why is there a thumbsdown on this PR by a member of your github team? Are my contributions no longer welcome? |
I'd say so...! The more options for customization, the better ✨ Initially, you had both at the top, then you decided to move the window count to the bottom left and the notification count to the top right - I personally might prefer the window count in the top left and the notification count in the bottom right, while yet another person might prefer to have only the window count, only the badge number, or neither number showing up at all. For my two cents, ideally both numbers should be optional, and the user should have a choice of which corner belongs to which number. How would you feel about having a dropdown for each corner in the settings, with the choices of "Window Count", "Notification Count", and "None"? That'd leave room for more corner options in the future, too. |
62de34f to
4c43b1a
Compare
GWL: add notification badges to top right of panel icons and add config option to disable notification badges GWL: move window count badge from top left to bottom left of panel icon. Remove 'notifications' extension role as it only allows for one extension. Use extensionsHandlingNotifications variable in messageTray.js for applets to increment/decrement when added/removed from panel instead. Ensure notificationDaemon can identify source of notifications from flatpak apps. Increase max notifications per source from 10 to 20.
4c43b1a to
c173f8c
Compare
|
Added back show window count config option. |
Of course they are. I don't know why @leigh123linux thumbed it down, but even if someone in the team or even if most of the team didn't like a particular PR, it wouldn't mean your contributions are not appreciated. |
|
This is wonderful! Thank you for your work on this feature, I've been excited to see it implemented for a long time now (and so have others, judging by issue #10124)
Is this the only thing this PR is waiting on, now? I'll confess I'm not sure how all the release timing stuff works, exactly... is it possible to merge now, or if not, around when could it be merged? |
Yes, we're hoping to merge this. |
|
@fredcw I think this is great and it's working well. Here's my feedback on what still requires change. I don't like the use of In the default theme, I'd like to keep the badges small, with their original color and original position (top-left). These numbers are only there as hints, they're not supposed to catch your attention.
There's plenty of space top-right for the notification badge if it's the same size. It has a noticeable color, and it complements the notification applet and the notification itself, so same thing here, there's no need for this number to be big. It's a pity we store the notifications in an array and not just the number since that's all we need, but I understand it's more reliable that way. If we were to concurrently increase/decrease, we could run into bugs. |
|
Small detail, I noticed we're doing maths on the same childBox actor to allocate multiple things (icon and the 2 badges). We're modifying it as we go along so the math is relative to the changes made before.. it's a bit messy :) It might cleaner to declare child boxes for the two badges and let them make their own maths from scratch, they'd look more similar that way in the code. It doesn't really matter but I saw it so I thought I'd mention it. |
|
@clefebvre In notificationDaemon.js, I've found that the only reliable way to determine the source app of a notification from a flatpak app is the desktop-entry hint. While this is set correctly for most flatpak apps, some set it incorrectly, hence the list of "exceptions". While I tested quite a few, I expect there to be some that are not listed. My thinking is that some of these will be found during the beta and can be added to the list. An alternative is to try to guess the app from the appName using a subString search of installed apps' names and ids. I can implement that if you think it's better. |
Let's go with that imo. As you said we can always improve it when we get feedback. |



Continuing on from the great work by @romario-07 in #12561 this adds a different color notification badge on the right of the icon and both badge sizes are adjusted automatically to the size of the icon. The "Show window count numbers" config option is removed as it seems fairly pointless.
@clefebvre @mtwebster Is this too late for the beta?
28px panel:40px panel (Mint default):48px panel:The issue mentioned in this comment is fixed.
In Mint-Y, 40 px:closes #10124
Edit: Changed window count badge to bottom left and adjusted notification color:
Known issue: If config option "Group windows by application" is changed, current notification counts in applet are reset to zero.