GNOME Bugzilla – Bug 636838
separate banner and summary modes
Last modified: 2012-08-23 12:29:37 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.
> * 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?
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.
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.
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.
::: 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...
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.
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).
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)?
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.
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 on attachment 184116 [details] [review] MessageTray: never show summary and a new notification at the same time yeah, this all makes sense
will fixes for this bug resolve 649325 as well?
*** Bug 661267 has been marked as a duplicate of this bug. ***
I think that the relevant parts of this bug have now been fixed. Please reopen if I'm wrong.