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 636838 - separate banner and summary modes
separate banner and summary modes
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Marina Zhurakhinskaya
gnome-shell-maint
[gnome3-important]
: 661267 (view as bug list)
Depends on:
Blocks: 641723 643014
 
 
Reported: 2010-12-09 00:37 UTC by William Jon McCann
Modified: 2012-08-23 12:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Incoming notifications will only be shown if there is no focused tray items (1.77 KB, patch)
2011-02-16 10:57 UTC, Hellyna Ng
none Details | Review
Incoming notifications will only be shown if there are no focused tray items (4.01 KB, patch)
2011-02-17 00:11 UTC, Hellyna Ng
needs-work Details | Review
Unread notifications(including updated summary notifications) are marked with a glow (4.27 KB, patch)
2011-03-01 19:29 UTC, Hellyna Ng
none Details | Review
Never show the summary AND/OR summary notification together with notifications. (6.12 KB, patch)
2011-03-12 22:48 UTC, Hellyna Ng
none Details | Review
MessageTray: never show summary and a new notification at the same time (4.28 KB, patch)
2011-03-22 19:26 UTC, Marina Zhurakhinskaya
committed Details | Review

Description William Jon McCann 2010-12-09 00:37:24 UTC
Something I think we've waffled on a bit in the past.  But I don't think mixing the interactions with the summary and banner works well.

I'd like to split banner and summary into two distinct modes of the tray.


 * when the tray isn't open and a new message comes in - display a banner
 * when a banner has the pointer - expand it
 * (something to consider for later) indicate that new messages have arrived while the banner is showing
 * when the banner is finished - either go back to the summary if it was shown last or hide the tray
 * if the tray is open and doesn't have the pointer when a new messages comes in - dissolve/fade into the banner
 * if the tray is open and has the pointer when a new message comes in - show a summary icon unless the message is "actually urgent"
 * If the message is "actually urgent" then we can find another way to display the message.  A likely candidate would be something mid-screen like a system modal dialog.  Perhaps that is a better solution for all "actually urgent" messages anyway...

The slight ugliness of temporarily adding a summary icon for transient (that don't already have a source) is a tradeoff here.

I'd like to be able to style each mode separately in css as well.
Comment 1 Jonathan Strander 2011-02-12 04:18:50 UTC
>  * if the tray is open and has the pointer when a new message comes in - show a
> summary icon unless the message is "actually urgent"


In this case it would be nice to have a visual bell of some kind. Maybe a nice friendly animation (eg: a fade in and out). Also if the user hasn't moused over and clicked on the notification in any way shouldn't we then show a banner when they leave the tray?
Comment 2 Hellyna Ng 2011-02-16 10:57:46 UTC
Created attachment 180976 [details] [review]
Incoming notifications will only be shown if there is no focused tray items

This is to prevent from distracting the user when the user is doing a particular thing.

Well this is a one line fix adding the this._locked condition. If the tray is lock we definitely not show any notifications until it is unlocked.
Comment 3 Hellyna Ng 2011-02-17 00:11:27 UTC
Created attachment 181092 [details] [review]
Incoming notifications will only be shown if there are no focused tray items

- This is to prevent distracting the user when the user is focusing on a particular tray item.

Unread summary items whose icons will glow

- This is to ensure users will have some indications of ignored/unread notifications

On the part where we should mark all notifications as read if the user is NOT away is not implemented yet as that depends on Bug 617225.
Comment 4 Marina Zhurakhinskaya 2011-02-17 02:55:22 UTC
Review of attachment 181092 [details] [review]:

This should be done as two separate patches, as there are independent of each other.

The first patch to never show the summary and the new notification at the same time will need to have a lot more in it. Your current check takes care of the case when we are showing the summary notification, but we also should make sure that
- we don't show the summary if you mouse to the bottom right corner that triggers it while showing a new notification (if you do, we should hide the notification, and only then show the summary)
- we don't show the new notification if you are hovering over the summary, but haven't clicked anything yet
- we hide the summary regardless of its state, and show the urgent notification if one comes in
- we hide the summary and show the new notification in the overview, unless you are hovering over the summary or have a summary notification showing; we go back to showing the summary when the new notification is done showing

So this should all be its own patch. You should use checks of this._notificationState and this._summaryState being State.SHOWING or State.SHOWN to make sure they are mutually exclusive.

For the second patch:
- something like _setSourceUpdated(source, isUpdated) would work better than the combination of functions _markNotificationUnread() and _markNotificationRead()
- you should actually move the glow to this._sourceIcon, making it a public variable if necessary; you'll need to add a style_class to this._iconBin in Source to be able to use this style_class in css. Otherwise the glow moves around to the center of the summary item when it expands :).
- you should call _setSourceUpdated() with true somewhere in _onNotify() as soon as the notification is received; in your code you set it in _showNotification(), but some notification might not be shown, while you are looking at the summary, and we want the sources for them to light up
- you should call _setSourceUpdated with false in _showSummaryNotification(), which is what you do now, but also if the new notification is hovered over (i.e. the user has seen it - it would be annoying if you interacted with the notification, but then when you go to the summary much later it is shown as updated)
- you should go through all the summary items and unset the glow for them when the summary is done hiding (we only want to highlight the newly updated items for the user, but not create a TODO list of items to click so that they stop glowing)

This might not be all :), but I think implementing it should get us a lot closer to having the message tray act according to the new design.

::: js/ui/messageTray.js
@@ +1449,3 @@
+                                  !(this._notification && this._notification.urgency == Urgency.CRITICAL) &&
+                                  !this._pointerInTray && !this._locked) ||
+                                  this._notificationRemoved);

I don't think you should rearrange this statement without actually changing any logic in it.
Comment 5 Hellyna Ng 2011-02-21 11:39:11 UTC
::: js/ui/messageTray.js
@@ +1449,3 @@
+                                  !(this._notification &&
this._notification.urgency == Urgency.CRITICAL) &&
+                                  !this._pointerInTray && !this._locked) ||
+                                  this._notificationRemoved);

I don't think you should rearrange this statement without actually changing any
logic in it.

(In reply to comment #4)

As for the rearrangement I remembered I forgot to format the lines properly in one of my earlier commits, and somehow you must've missed the mistake too through review...
Comment 6 Hellyna Ng 2011-03-01 19:29:10 UTC
Created attachment 182203 [details] [review]
Unread notifications(including updated summary notifications) are marked with a glow

This ensures users can have a better idea of which notifications are
unread.
Comment 7 Hellyna Ng 2011-03-12 22:48:08 UTC
Created attachment 183248 [details] [review]
Never show the summary AND/OR summary notification together with notifications.

This commit minimizes focus stealing from users:
- If summary is expanded and a notification comes in, summary is
  hidden and notification shows.

- If summary and summary notification is showing(ie tray locked) and
  a notification comes in, the notification is not shown until the
  tray is unlocked. The exception is when the notification is really
  urgent.

- If the tray was priorly locked(with ref to the previous point), and
  say a urgent notification interrupts and hides the previously shown
  summary notification, then this summary notification resumes showing
  after the mentioned critically urgent notification has gone away(not
  implemented).
Comment 8 Hellyna Ng 2011-03-14 01:49:43 UTC
So actually marina and me wanted to know if we should reexpand(and refocus) the previously expanded(and focused) summary-boxpointer(summary notification) because it's been interrupted by something like say, a notification with critical urgency; when the user has done dealing with it(the critical notification)?
Comment 9 William Jon McCann 2011-03-15 03:59:24 UTC
Hi Hellyna, sorry for the delay.  Thanks for working on this.

If I understand your question correctly, it sounds reasonable to me to try to resume what the user was doing before the shell preempted that activity.  So I think the simple answer is yes.
Comment 10 Marina Zhurakhinskaya 2011-03-22 19:26:53 UTC
Created attachment 184116 [details] [review]
MessageTray: never show summary and a new notification at the same time

We want to minimize focus stealing from the user. If a non-urgent notification
comes in while the user is interacting with the tray, we add it to the tray
and only show it after the user is done interacting with the tray. If an
urgent notification comes in while the user is interacting with the tray,
we hide the tray and show the urgent notification.

This is Hellyna's patch rabased to latest on master and my stacker patch.
I removed the attempts to pop up a notifiction that was interrrupted by
the urgent notification as it was not working out easily and is not a
crucial feature.
Comment 11 Dan Winship 2011-03-22 21:14:43 UTC
Comment on attachment 184116 [details] [review]
MessageTray: never show summary and a new notification at the same time

yeah, this all makes sense
Comment 12 wrobell 2011-05-05 10:36:40 UTC
will fixes for this bug resolve 649325 as well?
Comment 13 Allan Day 2011-10-14 20:12:33 UTC
*** Bug 661267 has been marked as a duplicate of this bug. ***
Comment 14 Allan Day 2012-08-23 11:10:44 UTC
I think that the relevant parts of this bug have now been fixed. Please reopen if I'm wrong.