After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 611611 - combined notifications
combined notifications
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Dan Winship
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-03-02 15:28 UTC by Dan Winship
Modified: 2011-03-22 22:50 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Work-in-progress stacked notifications (17.90 KB, patch)
2011-03-11 16:09 UTC, Marina Zhurakhinskaya
needs-work Details | Review
MessageTray: show multiple notifications per source (22.34 KB, patch)
2011-03-21 21:41 UTC, Marina Zhurakhinskaya
none Details | Review
MessageTray: show multiple notifications per source (22.33 KB, patch)
2011-03-21 21:44 UTC, Marina Zhurakhinskaya
none Details | Review
MessageTray: show multiple notifications per source (22.42 KB, patch)
2011-03-22 04:44 UTC, Marina Zhurakhinskaya
none Details | Review
MessageTray: show multiple notifications per source (23.13 KB, patch)
2011-03-22 05:33 UTC, Marina Zhurakhinskaya
reviewed Details | Review
MessageTray: use single scrollbar for summary notification stacks (8.36 KB, patch)
2011-03-22 07:45 UTC, Marina Zhurakhinskaya
none Details | Review
MessageTray: show multiple notifications per source (22.94 KB, patch)
2011-03-22 19:51 UTC, Marina Zhurakhinskaya
none Details | Review
MessageTray: show multiple notifications per source (23.03 KB, patch)
2011-03-22 20:11 UTC, Marina Zhurakhinskaya
committed Details | Review
MessageTray: use single scrollbar for summary notification stacks (8.31 KB, patch)
2011-03-22 21:18 UTC, Marina Zhurakhinskaya
reviewed Details | Review
MessageTray: use single scrollbar for summary notification stacks (7.92 KB, patch)
2011-03-22 21:44 UTC, Marina Zhurakhinskaya
committed Details | Review

Description Dan Winship 2010-03-02 15:28:01 UTC
if you have multiple un-acknowledged notifications from a given source, they should merge together as seen in

http://www.gnome.org/~mccann/screenshots/clips/20100122204135/shell-mockup-mail-expanded.png

and

http://www.gnome.org/~mccann/screenshots/clips/20100122204135/shell-mockup-mail-banner.png

In particular, the icon (in both summary and notification banner view) should get a numeric badge showing how many un-acknowledged notifications there are, and when you expand a new notification, it should show the stack of previous notifications.


It is possible that this behavior only happens for certain notification types. We have not figured that out in detail.
Comment 1 Marina Zhurakhinskaya 2011-03-11 16:09:22 UTC
Created attachment 183163 [details] [review]
Work-in-progress stacked notifications

I'm attaching this now as several people have asked me about it. This is
rebased to latest and somewhat works in that it stacks notifications, but
then there are errors I didn't have time to debug yet. It should be pretty
close though. Unfortunately, I'm going away for the weekend and there are
other things I need to do by Tuesday (like conference proposals submissions,
OPW program announcement if we are doing the next round), so I will only
likely be able to work on this next on Tuesday.
Comment 2 Marina Zhurakhinskaya 2011-03-11 16:17:46 UTC
The two other things that this feature needs that I discussed with Jon, but that are not addressed in the patch are:
1) hiding icons in all notifications in the stack other than the first one
2) removing individual scrollbars in all notifications, and using a single scrollbar for the stack (e.g. try libnotify/tests/test-basic.c)
Comment 3 Marina Zhurakhinskaya 2011-03-21 21:41:34 UTC
Created attachment 184010 [details] [review]
MessageTray: show multiple notifications per source

Add an ability to show multple notifications per source, so that
the user doesn't miss seeing any notifications.

This patch is ready for review. I'll work on the remaining two features
(hiding all but first notification icons and using a single scrollbar)
and attach them as separate patches.
Comment 4 Marina Zhurakhinskaya 2011-03-21 21:44:43 UTC
Created attachment 184012 [details] [review]
MessageTray: show multiple notifications per source

Fixed trailing whitespaces.
Comment 5 Marina Zhurakhinskaya 2011-03-22 04:44:15 UTC
Created attachment 184037 [details] [review]
MessageTray: show multiple notifications per source

Updated to apply to master.
Comment 6 Marina Zhurakhinskaya 2011-03-22 05:33:19 UTC
Created attachment 184038 [details] [review]
MessageTray: show multiple notifications per source

Fix the loop that destroys notifications to make sure it destroys all of them.
Only show the icon for the first notification in the stack.
Comment 7 Marina Zhurakhinskaya 2011-03-22 07:45:16 UTC
Created attachment 184039 [details] [review]
MessageTray: use single scrollbar for summary notification stacks

We want to allow the user to scroll through all notifications from
source by using a single scrollbar. We suppress the individual
scrollbars inside the notifications.

As one exception, we keep the original scrollbar for chat notifications
because it has a distinct look, ending above the text entry box.
Comment 8 Dan Winship 2011-03-22 17:00:28 UTC
Comment on attachment 184038 [details] [review]
MessageTray: show multiple notifications per source

The mockups have a faint outline around each notification, which makes it clear where the boundaries between individual notifications are. It would be nice to have that here.

When you click to dispose a stack, some of the individual notifications disappear before the boxpointer does.

>+    showIcon: function(showIcon) {

call it setIconVisible or something. It's confusing to have a boolean that means "do the opposite of the function name".

(And for that matter, you can just do "this._icon.visible = visible;" which ClutterActor will turn into a show or hide for you.)

>-    _notificationRemoved: function() {
>+     _lastNotificationRemoved: function() {

extra space before the function name there

>+    doneShowingNotificationStack: function() {
>+        let notificationActors = this.notificationStack.get_children();
>+        for (let i = 0; i < notificationActors.length; i++) {
>+            notificationActors[i]._delegate.collapseCompleted();
>+            notificationActors[i]._delegate.disconnect(this._notificationExpandedIds[i]);
>+            notificationActors[i]._delegate.disconnect(this._notificationDoneDisplayingIds[i]);
>+            notificationActors[i]._delegate.disconnect(this._notificationDestroyedIds[i]);
>+            this.notificationStack.remove_actor(notificationActors[i]);
>+            notificationActors[i]._delegate.showIcon(true);
>+        }

This is pretty messy. It would be cleaner to have the summaryitem keep an array of objects, with fields for the notification, its actor, and each signal id.

>+        // this._summaryBoxPointer.actor.disconnect(this._summaryBoxPointerAllocationChangedId);
>+        // this._summaryBoxPointerAllocationChangedId = 0;

?



Other than the bug mentioned at the beginning, I don't see anything obviously wrong with the patch, but I'm dubious about changing this much of the notification code at the last minute... Not my call though.
Comment 9 Marina Zhurakhinskaya 2011-03-22 19:51:16 UTC
Created attachment 184120 [details] [review]
MessageTray: show multiple notifications per source

Addresses simpler comments from Dan and removes a bug in filter() call.
Comment 10 Marina Zhurakhinskaya 2011-03-22 20:11:33 UTC
Created attachment 184123 [details] [review]
MessageTray: show multiple notifications per source

Destroy all non-resident notifications on a clicked source without
waiting for the application to get focused and destroy them so that
all notifcations are removed at the same time.

Just adds this.destroyNonResidentNotifications() call to open() in
notificationDaemon.js .
Comment 11 Marina Zhurakhinskaya 2011-03-22 21:18:34 UTC
Created attachment 184126 [details] [review]
MessageTray: use single scrollbar for summary notification stacks

Updated to apply on top of the previous patch.
Comment 12 Dan Winship 2011-03-22 21:20:32 UTC
Comment on attachment 184126 [details] [review]
MessageTray: use single scrollbar for summary notification stacks


this:

>+        this.notificationStackView.vscroll.adjustment.connect('changed', Lang.bind(this, function(adjustment) {
>+            let currentValue = adjustment.value + adjustment.page_size;
>+            if (currentValue == this._oldMaxScrollAdjustment)
>+                this.scrollTo(St.Side.BOTTOM);
>+            this._oldMaxScrollAdjustment = adjustment.upper;
>+        }));

should make this:

>     _notificationAddedToSource: function(source, notification) {
>-        if (this.notificationStack.mapped)
>+        if (this.notificationStack.mapped) {
>             this._appendNotificationToStack(notification);
>+            this.scrollTo(St.Side.BOTTOM);
>+        }
>     },

unnecesary, right?

Otherwise looks good.
Comment 13 Dan Winship 2011-03-22 21:22:49 UTC
Comment on attachment 184123 [details] [review]
MessageTray: show multiple notifications per source

yup, only minor differences from previously-reviewed version
Comment 14 Marina Zhurakhinskaya 2011-03-22 21:44:22 UTC
Created attachment 184131 [details] [review]
MessageTray: use single scrollbar for summary notification stacks

Remove unnecessary code per Dan's comment.