NotifyOSD

Differences between revisions 2 and 214 (spanning 212 versions)
Revision 2 as of 2009-02-20 11:56:26
Size: 54940
Editor: yttrium
Comment: now 90% opacity
Revision 214 as of 2014-04-02 11:35:47
Size: 83282
Editor: mpt
Comment: Volume changes now covered in the Sound specification
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
<<Include(Ayatana/PageTemplate/Header)>>
''This is the design specification for Notify OSD. If you are a software developer looking for advice on making your software compatible with Notify OSD, see NotificationDevelopmentGuidelines.''
Line 3: Line 6:
To improve the user experience for notifications in Ubuntu, the [[http://www.galago-project.org/specs/notification/0.9/|Desktop Notifications Specification]] and later the [[http://api.kde.org/4.0-api/kdelibs-apidocs/kdeui/html/classKNotification.html|KNotification]] API should be implemented in a consistent way, with non-interactive, non-directional, non-overlapping notification bubbles that can be clicked through and look beautiful. For compatibility with this new system, high-profile programs should be patched so that they do not rely on notifications being interactive or pointing to notification area icons, and when an unpatched program incorrectly requests a notification with actions it should be shown as an alert box. Any notification configuration should be handled by individual applications. Visual confirmation of hotkey changes to volume, screen brightness, and backlight brightness should also be presented in bubbles the same way as notifications.

Canonical Ltd’s Design team and Desktop Experience team are the upstream developers for this work. Notify OSD is [[https://edge.launchpad.net/notify-osd|hosted on Launchpad]].
To improve the user experience for notifications in Ubuntu and Kubuntu, the [[http://www.galago-project.org/specs/notification/0.9/|Desktop Notifications Specification]] and the [[http://api.kde.org/4.0-api/kdelibs-apidocs/kdeui/html/classKNotification.html|KNotification]] API should be implemented in a consistent way, with non-interactive, non-directional, non-overlapping notification bubbles that can be clicked through and look beautiful. For compatibility with this system, Ubuntu and Kubuntu software should be patched so that it does not rely on notifications being interactive or pointing to notification area icons, and when an unpatched program incorrectly requests a notification with actions it should be shown as an alert box. Any notification configuration should be handled by individual applications. Visual confirmation of hotkey changes to volume, screen brightness, and backlight brightness should also be presented in bubbles the same way as notifications.

Canonical Ltd’s Design team and Desktop Experience team are the upstream developers for this work. Notify OSD is [[https://launchpad.net/notify-osd|hosted on Launchpad]].
Line 9: Line 12:
== Work for Lucid ==

 * [[#knotification|Extend the KDE notification API]] so that applications can tell whether the notification server allows actions.
 * Modify KDE [[#compatibility|applications in Main and Universe]] to be compliant with this new API.
 * Have [[#do-not-disturb|a “do-not-disturb” mode]] that individual applications can trigger. Popular applications that have a full-screen mode (Firefox, [[#totem|Totem]], [[#openoffice.org-impress|OpenOffice.org]], Vino) should have a visible option for whether/when to inhibit non-critical notifications when a window of that application is full-screen and focused. We should decide the appropriate default for those applications, and we should provide guidelines on implementing this preference in other applications.
  * As a trial during the Lucid development cycle, when an application inhibits notifications, we should display a notification: “Further notifications have been disabled.”
  * When an application that requested notification inhibition exits, notifications should always be uninhibited.
 * During the Lucid developer cycle, notification bubbles should use color and label to show priority.
 * Change in [[#position|position]]: We should experiment with three positioning schemes.
 * There will be a new [[#bubble|visual style]], yet to be decided.
 * Application review and [[#compatibility|compatibility fixes]].
 * Implement missing details, such as [[#Sound|sound]], and [[#duration|duration based on text length]].
 * Update and complete the [[NotificationDevelopmentGuidelines|notification development guidelines]].
 * Implement [[NotificationDesignGuidelines#morphing|morphing windows]], with `gnome-power-manager`’s “Battery Critically Low” message as an example.
Line 13: Line 31:
Ubuntu currently uses `notification-daemon`, which presents notification bubbles as interactive and therefore risks accidental clicks. The current bubbles are also rather unattractive, so replacing the notification system also gives us the opportunity to make them beautiful. And presenting volume, brightness, and similar changes in the same way as notifications decreases visual variety, and introduces a consistent appearance for non-interactive things. Ubuntu previously used `notification-daemon`, which presented notification bubbles as interactive and therefore risked accidental clicks. The previous bubbles were also rather unattractive, so replacing the notification system gave us the opportunity to make them beautiful. And presenting volume, brightness, and similar changes in the same way as notifications decreases visual variety, and introduces a consistent appearance for non-interactive things.
Line 21: Line 39:
 * You begin giving your presentation to the management team. Five minutes in, Camila sends you another instant message: “Hope it's going well! ;-)”. Fortunately, this time no notification bubble appears to disrupt your presentation. The bubble does appear once you’ve finished the presentation and closed it.  * You begin giving your presentation to the management team. Five minutes in, Camila sends you another instant message: “Hope it's going well! ;-)”. Fortunately, this time no notification bubble appears to disrupt your presentation.
Line 44: Line 62:
Line 49: Line 66:
For the purpose of this specification, the term '''leading''' means “left” whenever the system is using a left-to-right language, and “right” whenever the system is using a right-to-left language. The term '''trailing''' means “right” whenever the system is using a left-to-right language, and “left” whenever the system is using a right-to-left language. All mockups in this specification are of LTR layouts.
Line 53: Line 72:
Regardless of type, a bubble should appear as a rectangle of color #131313 (regardless of theme) with opacity 90%, corner roundness 0.375 em, and a drop shadow of #000000 color and 0.5 em spread. The bubble should blur whatever is behind it with a Gaussian blur of 0.125 em.

A bubble should be 18 ems wide (not including the drop shadow). Its height depends on the contents, but should be a minimum of 5 ems, and a maximum just tall enough to display 10 lines of [[#body|body text]] (which means the maximum height of a bubble with a [[#title|title]] is greater than of a bubble without a title). Furthermore, the ''bottom limit'' is 6 ems from the top of the bottom panel, if there is one, or otherwise 6 ems from the bottom of the screen (as if there was a 5-em bubble at the bottom plus 0.5 em margin on each side). Regardless of font and screen size, a bubble must not be so tall that it extends beyond the bottom limit.

Bubbles feature an [[#icon|icon]], and/or some [[#text|text]] or a [[#gauge|gauge]]. All text elements should have a drop shadow of #000000 color and 0.125 em spread.    
Regardless of type, a bubble should appear as a rectangle of color #131313 (regardless of theme) with opacity 80%, corner roundness 0.375 em, and a drop shadow of #000000 color and 0.5 em spread. The bubble should blur whatever is behind it with a Gaussian blur of 0.125 em.

A bubble should be 24 ems wide (not including the drop shadow). Its height depends on the contents, but should be a minimum of 5 ems, and a maximum just tall enough to display 10 lines of [[#body|body text]] (which means the maximum height of a bubble with a [[#title|title]] is greater than of a bubble without a title). Furthermore, the ''bottom limit'' is 6 ems from the top of the bottom panel, if there is one, or otherwise 6 ems from the bottom of the screen (as if there was a 5-em bubble at the bottom plus 0.5 em margin on each side). Regardless of font and screen size, a bubble must not be so tall that it extends beyond the bottom limit.

Bubbles feature an [[#icon|icon]], and/or some [[#text|text]] or a [[#gauge|gauge]]. All text elements should have a drop shadow of #000000 color and 0.125 em spread.

{{attachment:notification-bubble-layout-internal-1.png}}
Line 60: Line 81:
Line 63: Line 83:
Any icon should be scaled so that its largest dimension is 3 ems. This means that vector and bitmap icons should be simple, without fine detail or thin strokes, and all icons should be square or nearly square whenever possible. If the icon is a bitmap, Sinc/Lanczos scaling should be used to minimize jagginess. Any icon should be scaled so that its largest dimension is 3 ems, while retaining the icon’s original aspect ratio. This means that vector and bitmap icons should be simple, without fine detail or thin strokes, and all icons should be square or nearly square whenever possible. If the icon is a bitmap, Sinc/Lanczos scaling should be used to minimize jagginess.
Line 66: Line 86:
If the bubble has no text, the icon should be horizontally centered within the window. Otherwise, the icon should be left-aligned, with 1 em margin to the right.

Icons representing alerts, warnings or errors should use an ''x'' or ''?'' symbol with smooth gradient ranging from light red (#ff6363) at the top to dark red (#cc0000) at the bottom. Other than that, all icons and gauges should use one color theme: a smooth gradient ranging from light gray (#ececec) at the top to medium gray (#9b9b9b) at the bottom. Every icon should also use a black 2px outline with 30% opacity. There should also be a 1px white highlight with 40% opacity on the top and left edges to improve the definition. Different opacity values of this scheme (excluding the black outline) are allowed, for example to depict an inactive/disabled state or different levels of intensity (e.g. brightness). All icons and gauges should use gently rounded corners with the recommended roundness of 0.1 em radius and the roundness should not exceed 0.25 em radius.  

{{attachment:notify-osd-default-icon-set.png}} 
<<Anchor(icon-only)>>
If the bubble has no text, the icon should be horizontally centered within the window. Otherwise, the icon should be horizontally and vertically centered within a 3-em square that is flush with the leading side, with 1 em margin to the trailing side.

Icons representing alerts, warnings or errors should use an ''x'' or ''?'' symbol with smooth gradient ranging from light red (#ff6363) at the top to dark red (#cc0000) at the bottom. Other than that, all icons and gauges should use one color theme: a smooth gradient ranging from light gray (#ececec) at the top to medium gray (#9b9b9b) at the bottom. Every icon should also use a black 2px outline with 30% opacity. There should also be a 1px white highlight with 40% opacity on the top and left edges to improve the definition. Different opacity values of this scheme (excluding the black outline) are allowed, for example to depict an inactive/disabled state or different levels of intensity (e.g. brightness). All icons and gauges should use gently rounded corners with the recommended roundness of 0.1 em radius and the roundness should not exceed 0.25 em radius.

{{attachment:notify-osd-default-icon-set.png}}
Line 78: Line 99:
<<Anchor(title)>><<Anchor(body)>>If there is text, it consists of a '''title''' and/or a '''body'''. Both of these should use the standard application typeface, left-aligned, and should wrap to multiple lines if necessary. If a word is wider than the line, it should wrap following usual Pango rules for the current interface language.

Both title and body text should appear to the right of the icon. If there is no body text, the title text should be vertically centered with the center of the icon. If there is body text, the title text should be top-aligned with the top of the icon, and the body text should begin immediately underneath. This applies even if body text is added to a bubble that previously had only a title: the title text should move from its centered alignment to top alignment as the body text appears.
<<Anchor(title)>><<Anchor(body)>>If there is text, it consists of a '''title''' and/or a '''body'''. Both of these should use the standard application typeface, aligned to the leading side, and should wrap to multiple lines if necessary. If a word is wider than the line, it should wrap following usual Pango rules for the current interface language.

Both title and body text should appear to the trailing side of the icon. If there is no body text, the title text should be vertically centered with the center of the icon. If there is body text, the title text should be top-aligned with the top of the icon, and the body text should begin immediately underneath. This applies even if body text is added to a bubble that previously had only a title: the title text should move from its centered alignment to top alignment as the body text appears.
Line 92: Line 113:
The body should be 0.8 × the standard application font size, of color #eaeaea, standard weight, and should not contain any extra formatting. The body should be 0.9 × the standard application font size, of color #eaeaea, standard weight, and should not contain any extra formatting.
Line 105: Line 126:
<<Anchor(mouseover)>>Whenever the pointer moves into a bubble, whatever is behind the bubble should instantly become no longer blurred, and the bubble itself should instead receive a 2-pixel Gaussian blur and reduce to 40% opacity. When the pointer leaves the bubble, it should instantly return to its normal appearance. <<Anchor(mouseover)>>Whenever a pointer moves into a bubble, whatever is behind the bubble should instantly become no longer blurred, and the bubble itself should instead receive a 2-pixel Gaussian blur and reduce to 40% opacity. (The bubble should not blur from the pointer being in the bubble area when it first appears, because you are unlikely to be aware of where the pointer is — it may not even be visible. And once you become aware, it is simple to move out then in again.) When the pointer leaves the bubble, the bubble should instantly return to its normal appearance.
Line 109: Line 130:
||<tablestyle="clear: right; margin: 0;" style="border: none;">||

<<Anchor(position)>>
Line 111: Line 135:
||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;"> {{attachment:notification-bubbles-margins.png}} ||

Bubbles should appear on whichever display the pointer is on, since that is the display you are most likely paying attention to. (A touch-only display has an invisible pointer, so whenever it is touched it becomes the display the pointer is on.)

Each display should show a maximum of two bubbles: one confirmation bubble and one notification bubble. The first bubble on a display should be positioned 0.5 em from the bottom of whichever panels are the top of the display, and the second bubble should be positioned 0.5 em from the bottom of the first bubble. Each bubble should be 0.5 em from the right edge of the display.
If any windows are open, a bubble should appear on whichever display contains the largest fraction of the area of the focused window at the moment the bubble starts appearing. If no windows are open, a bubble should appear on whichever display the pointer is on at the moment the bubble starts appearing. (Except with [[X/MPX|MPX]], a display has only one pointer. A touch-only display has an invisible pointer, so whenever it is touched it becomes the display that the pointer is on.)

Each display should show up to one confirmation bubble, plus up to one notification bubble, at a time. There should be a `gconf` key determining which of three positioning schemes are used. In all three schemes, the right edge of any bubble should be 0.5 em from the trailing edge of the display.

 1. A notification bubble should be positioned near the bottom right corner, such that if the bubble grows to its maximum height, it is 0.5em from the bottom of the display (or from the top of any panels at the bottom of the display). A confirmation bubble should use a slot immediately above that notification bubble slot.

 2. The bottom of a confirmation bubble should be 0.25 em above the vertical center of the display. The top of a notification bubble should be 0.25 em below the vertical center of the display. (So if a confirmation bubble and a notification bubble are visible simultaneously, there should 0.5 em gap between them.)

 3. Notification bubbles should use the top right corner: the top of a notification bubble should be 0.5 em from the top of the display (or from the bottom of any panels at the top of the display). Confirmation bubbles should use the bottom right corner: the bottom of a confirmation bubble should be 0.5 em from the bottom of the display (or from the top of any panels at the bottom of the display).

{{attachment:position-options.jpg}}

||<tablestyle="clear: right; margin: 0;" style="border: none;">||
Line 119: Line 150:
<<Anchor(animations)>>
Line 126: Line 158:
||'''Standard duration'''||10000 ms + 250 ms/(line of body text) ||5000 ms + 250 ms/(line of body text) ||2000 ms || ||<<Anchor(duration)>>'''Standard duration'''||10000 ms + 250 ms/(line of body text) ||5000 ms + 250 ms/(line of body text) ||2000 ms ||
Line 129: Line 161:
||'''Visible [[#concatenating|concatenation]] with enough room to show all body text''' ||<-2>Over 250 ms, bubble grows initially linearly but decelerates as it reaches its new size; and title fades out if there was no body text. Then over another 250 ms, the new text fades in, regardless of how much there is. ||n/a ||
||'''Visible [[#concatenating|concatenation]] with overflow''' ||<-2>Old text displays for bubble’s normal duration. Then over 250 ms ''(really?)'', text that will no longer appear in its current position scrolls up, with oldest text scrolling off the top and new text scrolling onto the bottom. ||n/a ||
||'''Extended by visible concatenation'''||<-2>+ 500 ms + 250 ms/(line of body text) ||n/a ||
||'''Visible [[#merging|merging]] with enough room to show all body text''' ||<-2>Over 250 ms, bubble grows initially linearly but decelerates as it reaches its new size; at the same time, if there was no body text previously, the title fades out (because it is about to appear in a new position). Then over another 250 ms (regardless of how much text is involved), the new text fades in; at the same time, the new icon (if any) cross-fades in. ||n/a ||
||'''Visible [[#merging|merging]] with overflow''' ||<-2>Old text displays for bubble’s normal duration. Then over 250 ms (regardless of how much text is involved), text that will no longer appear in its current position scrolls up, with oldest text scrolling off the top and new text scrolling onto the bottom; at the same time, the new icon (if any) cross-fades in. ||n/a ||
||'''Extended by visible merging'''||<-2>+ 500 ms + 250 ms/(line of body text) ||n/a ||
Line 134: Line 166:
||'''Maximum duration'''||<-3>15000 ms (overriding all the above) || ||<<Anchor(maximum-duration)>>'''Maximum duration'''||<-3>15000 ms (overriding all the above) ||
Line 137: Line 169:
If a bubble is replaced with one that has the same icon and the same title text, and the new body text is an extension of the old body text, this should not be presented as a normal replacement; instead the bubble should be presented as if the extra text was being concatenated.

If the pointer is over the area where a bubble is about to appear, it should appear as normal, ignoring the pointer unless it leaves and then re-enters the area. In all other cases where the pointer is over a bubble, however, the bubble’s duration should pause until the pointer leaves. For example, if a notification bubble has been fully visible for 2000 ms when the pointer enters, it should switch to its [[#mouseover|mouseover]] appearance until the pointer leaves, then switch back to its normal appearance and display for a further 3000 ms.

If the only bubble on a display is fading out when another bubble would appear underneath it, the newer bubble must instead wait until the older one has completed fading out.

If two bubbles are on a display simultaneously, the first should never disappear before the second; instead it should disappear at its scheduled time or at the second bubble’s scheduled time, whichever is later. The first bubble, if it is a notification bubble, should also never change size while any confirmation bubble is also visible; instead, it should wait until all current confirmation bubbles have disappeared.

<<Anchor(critical)>>
=== Critical and non-critical queues and do-not-disturb mode ===

Up to one confirmation bubble, plus one notification bubble, should be displayed at a time.

Notification bubbles should be treated as if they are in two queues: '''critical''' and '''non-critical'''. All pending critical notification bubbles should be displayed before any pending non-critical notification bubbles are displayed.

Whenever a program is inhibiting the screensaver, Notify OSD should be in '''do-not-disturb mode'''. Critical notification bubbles and all confirmation bubbles should appear as normal, but the queue of non-critical notification bubbles should be paused indefinitely until your session leaves do-not-disturb mode.
If a bubble is replaced with one that has the same icon and the same title text, and the new body text is an extension of the old body text, this should not be presented as a normal replacement; instead the bubble should be presented as if the old and new bubbles were being merged.

If a pointer is over the area where a bubble is about to appear, it should appear as normal, ignoring the pointer unless it leaves and then re-enters the area. In all other cases where a pointer is over a bubble, however, the bubble’s duration should pause until the pointer leaves. For example, if a notification bubble has been fully visible for 2000 ms when a pointer enters, it should switch to its [[#mouseover|mouseover]] appearance until the pointer leaves, then switch back to its normal appearance and display for a further 3000 ms.

If the only bubble on a display is fading out when another bubble would appear below it, the newer bubble must instead wait until the older one has completed fading out.
Line 158: Line 179:
<<Anchor(concatenating)>>
=== Concatenating existing bubbles ===

Whenever there are two or more notification bubbles in the queue that have the same title and come from the same program (as identified by its D-Bus ID), and both of them have hinted that they allow concatenation, Notify OSD should merge them into a single bubble: the icon and sound (if any) of the latter should be used, and the body text of the latter should be appended to the body text of the former, with a line break inserted between them if there was none already. For example, if the bubble in queue position 4 has title “andrew_p” and body text “Hey Coral”, while the bubble in queue position 7 has the same icon and title “andrew_p” and body text “Are you still in Oregon?”, then the body text of the bubble at position 4 should be changed to <<BR>>` `Hey Coral<<BR>>` `Are you still in Oregon?<<BR>> and the bubble at position 7 should be deleted from the queue.

If the earlier bubble is already being displayed and not yet in the process of fading out, it should smoothly grow to make room for the new text, the new text should appear instantly, and the old icon should instantly be replaced by the new one.
<<Anchor(merging)>>
=== Merging notifications ===

Notify OSD should merge two notifications into a single notification if all of the following are true:
 * they come from the same program
 * they have the same title, or lack of title
 * they have the same actions, or lack of actions
 * the first is not already open as a fallback alert box
 * the first has not already been displayed as a bubble for so long that merging the second into it would cause the [[#animations|newly-calculated duration]] to be greater than the [[#maximum-duration|maximum duration]]
 * both of them have indicated that they allow merging
 * the second notification is not specified as a replacement of any other notification.

When merging notifications,
the icon and sound (if any) of the latter notification should be used. The body text of the latter should be appended to the body text of the former, with a line break inserted between them if there was none already. For example, if the notification in queue position 4 has title “andrew_p” and body text “Hey Coral”, while the notification in queue position 7 has the same icon and title “andrew_p” and body text “Are you still in Oregon?”, then the body text of the notification at position 4 should be changed to <<BR>>` `Hey Coral<<BR>>` `Are you still in Oregon?<<BR>> and the notification at position 7 should be deleted from the queue.

If the earlier bubble is already being displayed and not yet in the process of fading out, the bubble contents should be changed [[#animations|as described above]].
Line 169: Line 199:
If a bubble’s body text — either initial, ''or'' after [[#concatenating|concatenating]] — would take up more than ten lines inside the bubble, the body text should be presented as: If a bubble’s body text — either initial, ''or'' after [[#merging|merging]] — would take up more than ten lines inside the bubble, the body text should be presented as:
Line 181: Line 211:
=== Handling spam ===

If, after calculating any [[#concatenating|concatenation]], there are more than 20 notifications from the same program (as identified by its D-Bus ID), then … ''what?''

If there are more than 1000 notifications in the queue, any further notifications should be discarded, period.
<<Anchor(flood)>>
=== Flood prevention ===

A notification should be discarded from the queue if there are more than 50 notifications ahead of it in the queue.

Furthermore, a notification should be discarded from the queue if, after any [[#merging|merging]], there are more than ten notifications from the same program (as identified by its D-Bus ID) before it in the queue.

<<Anchor(do-not-disturb)>>
=== “Do not disturb” mode ===

Applications should be able to send a signal to `gnome-session` — in the same way that they can currently inhibit logout, account switching, suspending, or screensaver — to inhibit non-critical notifications.
{{{
<doc:item>
  <doc:term>16</doc:term>
  <doc:definition>Inhibit non-critical notifications.</doc:definition>
</doc:item>
}}}

As a trial during Lucid, whenever an application inhibits notifications, Notify OSD should display a notification: “Further notifications have been disabled.”

Whenever non-critical notifications are being inhibited, they should be queued as normal, so that (subject to [[#flood|flood prevention]]) they can be displayed when the inhibition ends.
Line 190: Line 236:
For cases where applications have expected the notification system to allow interactivity without checking whether it actually does, Notify OSD should show an alert box as a fallback. For cases where applications have expected the notification system to allow interactivity without checking whether it actually does, and cases where applications have expected the notification system to display a notification indefinitely, Notify OSD should show an alert box as a fallback. The alert box should appear centered on whichever display the first pointer is on at the moment it is due to appear. Because they require a response but should not block the [[#critical|queue]], multiple alert boxes may be open at once.
Line 196: Line 242:
The first button should be positioned in the bottom right corner of the alert. Immediately to its left should be a “Cancel” button that has no action. Any other buttons should be positioned from left to right, starting at the bottom left corner of the alert. None of the buttons should be set as the default (because the system can’t detect that any of them are safe as a default). The first button should be positioned in the bottom right corner of the alert. Immediately to its leading side should be a “Cancel” button that has no action. Any other buttons should be positioned from leading side to trailing side, starting at the bottom leading corner of the alert. None of the buttons should be set as the default (because the system can’t detect that any of them are safe as a default).
Line 200: Line 246:
== Treatment of the Desktop Notifications Specification 0.9 ==

Notify OSD should function as an implementation of [[http://www.galago-project.org/specs/notification/0.9/|the Desktop Notifications Specification 0.9]], as follows.
<<Anchor(logging)>>
== Logging notifications ==

For debugging and anorak purposes, each notification (but not each confirmation bubble) should be logged in the file “`$HOME/.cache/notify-osd.log`” ([[http://launchpad.net/bugs/332950|bug 332950]]). The log should take this form:{{{
[timestamp, process-name] title
body
body
body

[timestamp, process-name, appended] title
body
body
body

[timestamp, process-name, replaced] title
body
body
body}}}

The timestamp should be in the format defined by [[http://tools.ietf.org/html/rfc3339|RFC 3339]].

The log should be cleared whenever you log out or log in.

(Note: logging to this file is enabled when the LOG environment variable is set to 1.)

<<Anchor(critical)>>
== Critical and non-critical queues and do-not-disturb mode ==

Every notification, whether it is to be presented as a [[#bubble|bubble]] or as a [[#alert|fallback alert box]], should be treated as if it is in one of two queues: '''critical''' or '''non-critical'''. All pending critical notifications should appear before any pending non-critical notification bubbles appear; and within each queue, notifications should appear in chronological order. (This means, for example, that a fallback alert box should not appear until earlier notification bubbles have finished displaying. This prevents a later interactive notification from appearing inappropriately before an earlier non-interactive one from the same program.)

Whenever a program is inhibiting the screensaver, Notify OSD should be in '''do-not-disturb mode'''. While in this mode:
 * All notifications should be [[#logging|logged]] as normal.
 * Critical notifications, and all [[#bubble|confirmation bubbles]], should appear as normal.
 * Any non-critical notification bubble that was already being displayed, at the moment Notify OSD entered do-not-disturb mode, should remain for its scheduled duration.
 * Normal processing of the non-critical notification queue should stop, so that no further notification bubbles appear.
 * Once it has been in the queue for 30 seconds, any non-critical notification that would be rendered as a fallback alert box should (for compatibility) appear as normal, except that it should open explicitly [[http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--focus-on-map|unfocused]] and in the background.
 * Once it has been in the queue for 30 seconds, any non-critical notification that would be rendered as a bubble should be discarded from the queue and never displayed.

When Notify OSD leaves do-not-disturb mode, normal processing of the non-critical notification queue should resume.

== Treatment of the Desktop Notifications Specification 1.1 ==

Notify OSD should function as an implementation of [[http://people.canonical.com/~agateau/notifications-1.1/spec/index.html|the Desktop Notifications Specification 1.1]], as follows.
Line 206: Line 292:
The system should return the capabilities {"body", "body-markup", "icon-static", "image/svg+xml"}. (For why it should return "body-markup", see “[[#sanitizing|Sanitizing body text]]”.) The system should return the capabilities {"body", "body-markup", "icon-static", "x-canonical-append", "x-canonical-truncation"}. (For why it should return "body-markup", see “[[#sanitizing|Sanitizing body text]]”.)
Line 210: Line 296:
If `actions` is not supplied and `expire_timeout` is not set to “0”, the notification should be presented as a [[#bubble|notification bubble]]: If `actions` is supplied and/or `expire_timeout` is set to “0”, the notification should be presented as a [[#alert|fallback alert box]]:

 * If `body` is not supplied, `summary` should be used as the text of the alert.

 * If `body` is supplied, the system should [[#sanitizing|sanitize it]], concatenate it with the `summary` with a blank line between them, and use the combination as the text of the alert.

 * The `default` action should be given the label “OK”, and used as the first [[#alert-button|button]] for the alert. This action should be supplied regardless of whether the application requests it, because `notification-daemon` sends it even if it was not declared, and some applications rely on that behavior.

 * Any other `actions` should be supplied as buttons for the alert.

 {{attachment:fallback-alert-mixed.jpg}}

 * All hints, and all other parameters (including `replaces_id`), should be ignored.

In all other cases, the notification should be presented as a [[#bubble|bubble]]:

 * If the hint “`x-canonical-private-synchronous`” is supplied, it should be treated as a confirmation bubble; otherwise, it should be treated as a notification bubble.
Line 214: Line 316:
 * If `app_icon` is supplied, and it is a valid icon, the notification bubble should use that as its [[#icon|icon]]. Otherwise, if the `image_data` hint is set, the notification bubble should use ''that'' as its icon.

 * The system should assume `summary` to be raw plain text, and use it as the [[#title|title text]] of the bubble.

 * If `body` is supplied, the system should [[#sanitizing|sanitize it]], and then use it as the [[#body|body text]] of the bubble.

 * If the hint “`append`” is supplied with a string value “allowed”, the bubble should be treated as if it allows [[#concatenating|concatenation]].
 * If `app_icon` is supplied, and it is a valid icon, the notification bubble should use that as its [[#icon|icon]]. Otherwise, if the `icon_data` hint is set, the notification bubble should use ''that'' as its icon. ([[http://www.galago-project.org/specs/notification/0.9/x344.html|The reference to “image_data” in the Desktop Notifications Specification]] is an error.)

 * If the hint “`x-canonical-private-icon-only`” is supplied, the bubble should use [[#icon-only|the icon-only layout]]. Otherwise:

  *
The system should assume `summary` to be raw plain text, and use it as the [[#title|title text]] of the bubble.

  * If `body` is supplied, the system should [[#sanitizing|sanitize it]], and then use it as the [[#body|body text]] of the bubble.

  * If the hint “`x-canonical-append`” is supplied with a string value “allowed”, and `replaces_id` is ''not'' specified, the bubble should be treated as if it allows [[#merging|merging]].
Line 224: Line 328:
 * If the hint “[[http://www.galago-project.org/specs/notification/0.9/x320.html|urgency]]” is supplied with a value of 2, the bubble should be in the [[#critical|critical]] queue. Otherwise, it should be in the non-critical queue.  * If the hint “[[http://www.galago-project.org/specs/notification/0.9/x320.html|urgency]]” is supplied with a value of 2 (and the hint “`x-canonical-private-synchronous`” is ''not'' supplied), the bubble should be in the [[#critical|critical]] queue. Otherwise, it should be in the non-critical queue.
Line 227: Line 331:

If `actions` is supplied and/or `expire_timeout` is set to “0”, the notification should be presented as a [[#alert|fallback alert box]]:

 * If `body` is not supplied, `summary` should be used as the text of the alert.

 * If `body` is supplied, the system should [[#sanitizing|sanitize it]], concatenate it with the `summary` with a blank line between them, and use the combination as the text of the alert.

 * The `default` action should be given the label “OK”, and used as the first [[#alert-button|button]] for the alert.

 * Any other `actions` should be supplied as buttons for the alert.

 * All hints, and all other parameters, should be ignored.
 {{attachment:fallback-alert-mixed.jpg}}
Line 246: Line 337:
Unfortunately, the specification does not state explicitly that body text may not contain markup if the server does not return the capability "body-markup". And even if it did state that, notification-daemon supports markup, so many programs use it without first checking whether the server supports it. The specification also does not specify how clients should transmit `<` or `>` characters that are ''not'' intended to be interpreted as HTML tags. And if this is supposed to be done using character entities, the specification also does not specify whether entities should be used for all characters, or just for `<`, `>`, and `&`. This leaves us in a situation similar to [[http://diveintomark.org/archives/2004/02/04/incompatible-rss|RSS 2.0]]: “Here’s something that might be HTML. Or maybe not. I can’t tell you, and you can’t guess.” Unfortunately, the specification does not state explicitly whether body text may contain markup if the server does not return the capability body-markup. And even if that was not allowed, notification-daemon supports markup, so many programs use it without first checking whether the server supports it. The specification also does not specify how clients should transmit `<` or `>` characters that are ''not'' intended to be interpreted as HTML tags. And if this is supposed to be done using character references, the specification also does not specify whether character references should be recognized for all characters, or just for `<`, `>`, and `&`. This leaves us in a situation similar to [[http://diveintomark.org/archives/2004/02/04/incompatible-rss|RSS 2.0]]: “Here’s something that might be HTML. Or maybe not. I can’t tell you, and you can’t guess.”
Line 250: Line 341:
Because it would be extremely difficult to patch all programs to not use HTML markup (much more difficult than patching them to not use actions), Notify OSD must instead accept markup and ignore it. This in turn means that it must advertise that it accepts markup (`"body-markup"`), even though this markup has no effect on the bubble text. Because it would be extremely difficult to find and fix all programs that use markup without checking (much more difficult than finding and fixing those that use actions without checking), Notify OSD must instead accept markup and ignore it. This in turn means that it must advertise that it accepts markup (`"body-markup"`) — even though this markup has no effect on the bubble text — so that clients can deduce that they need to escape non-markup `<`, `>`, and `&` characters.
Line 254: Line 345:
 1. If the text contains a `<` character that is immediately followed by a letter or by a `/` character, ''and'' a `>` character occurs later in the string, the sequence from that `<` character to the soonest-following `>` character inclusive should be treated as an HTML tag and removed. Repeat for all such remaining sequences. All other `<` and `>` characters should be assumed to be literal.
 1. If the text contains a `&` character that is immediately followed by (a) a series of letters and then a `;` character, ''or'' (b) an `x` character and then a series of digits and then a `;` character, ''or'' (c) a `#` character and then a series of digits and then a `;` character, ''then'' the sequence from that `&` character to the soonest-following `;` character should be treated as an HTML character reference and converted to the equivalent character [[http://www.whatwg.org/specs/web-apps/current-work/multipage/tokenization.html#tokenizing-character-references|as specified in HTML 5]]. (This does ''not'' mean using the HTML 5 character reference tokenizing algorithm, which is designed for a different and saner situation. Refer to HTML 5 only to determine which character should be used for which reference.) Repeat for all such remaining sequences. All other `&` characters should be assumed to be literal.
 1. If the text contains a `<` character that is immediately followed by a letter or by a `/` character, ''and'' a `>` character occurs later in the string, the sequence from that `<` character to the soonest-following `>` character inclusive should be treated as an HTML tag and removed. Repeat for all such remaining sequences. All other `<` and `>` characters should be assumed to be literal. Then:
 1. If the text contains a “`&`” character, ''and'' a “`;`” character occurs later in the string, the sequence from that “`&`” character to the soonest-following “`;`” character should be presented as follows:
 ||'''String'''||'''Presented as'''||
 ||`&``amp;` ||&||
 ||`&``#38;` ||&||
 ||`&``#x26;` ||&||
 ||`&``lt;` ||<||
 ||`&``#60;` ||<||
 ||`&``#x3C;` ||<||
 ||`&``#x3c;` ||<||
 ||`&``gt;` ||>||
 ||`&``#62;` ||>||
 ||`&``#x3E;` ||>||
 ||`&``#x3e;` ||>||
 ||`&``apos;` ||'||
 ||`&``quot;` ||"||
 ||''anything else''||''unaltered''||
 Repeat for all such remaining sequences. All other `&` characters should be assumed to be literal.
Line 259: Line 366:
Applications should be highly encouraged to escape `<`, `>`, and `&` characters (''e.g.'' as `&lt;`, `&gt;`, and `&amp;` respectively) in text they receive from external sources, such as instant messages and IRC messages from Web developers that include HTML code intended to be read as plain text. Applications should be highly encouraged to escape `<`”, “`>`”, and “`&` characters (''e.g.'' as `&lt;`”, “`gt;`”, and “`&amp;` respectively) in text they receive from external sources (such as instant messages or song metadata).
Line 277: Line 384:
<<Anchor(knotification)>>
Line 281: Line 389:
''The precise behavior will be defined before the KNotification support is implemented.''

== Treatment of volume changes ==

||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;"> {{attachment:volume.jpg}} ||

When you change the system’s volume by any method that does not involve a pointing device (for example, by a keyboard hotkey), the change in volume should be shown in a confirmation bubble with a gauge. The icon should be of a muted speaker if volume is muted, or an unmuted speaker otherwise.

''should define flashing''

== Treatment of brightness and backlight changes ==
The API should let applications know whether the notification system allows actions.

== Treatment of hotkeys ==

<<Anchor(volume)>>
=== Volume changes ===

''Now covered [[Sound#notification|in the Sound specification]].''

<<Anchor(brightness)>>
=== Brightness and backlight changes ===
Line 295: Line 403:
When you change the display’s or keyboard backlight’s brightness by any method that does not involve a pointing device (for example, by a keyboard hotkey), the change in brightness should be shown in a confirmation bubble with a gauge.

''should define flashing''

== Treatment of disc ejection ==
When you change the display’s or keyboard backlight’s brightness using keyboard hotkeys, the change in brightness should be shown in a confirmation bubble with a gauge. To make clearer which key was pressed, if the bubble was not already open, the gauge should show the old value for half a second before switching to the new value. If you press the reduce-brightness key when the volume is already at zero, or the increase-brightness key when the volume is already at maximum, the icon and gauge should flash.

Visually, the bubble should not contain any text. But for accessibility purposes, the bubble should expose title text of the form “Brightness: 60 percent” or “Backlight brightness: 20 percent”, as appropriate.

=== Disc ejection ===
Line 303: Line 411:
When you eject a disc by any method that does not involve a pointing device (for example, by a keyboard hotkey), a confirmation bubble should appear containing the eject icon, horizontally and vertically centered, and no text.
When you press the `EJECT_KEY`, a confirmation bubble should appear containing only the eject icon. '''Implementation:''' Issue a notification using the “`x-canonical-private-icon-only`” and “`x-canonical-private-synchronous`” hints.

Visually, the bubble should not contain any text. But for accessibility purposes, the bubble should expose the title text “Eject”.

=== Play, Pause, Stop, Previous, and Next ===

When you press the `PLAY_KEY`, `PAUSE_KEY`, `STOP_KEY`, `PREVIOUS_KEY`, or `NEXT_KEY`, a confirmation bubble should appear containing only the icon for that function. '''Implementation:''' Issue a notification using the “`x-canonical-private-icon-only`” and “`x-canonical-private-synchronous`” hints.

Visually, the bubble should not contain any text. But for accessibility purposes, the bubble should expose the title text “Play”, “Pause”, “Stop”, “Previous”, or “Next” as appropriate.

<<Anchor(device-detection)>>
Line 307: Line 424:
||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;"> {{attachment:device.jpg}} ||

When a device is connected, a confirmation bubble should appear immediately, with a generic USB or Firewire device icon, title text “Device connected”, and no body text.
||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;"> {{attachment:device-connected.jpg}} ||

When a device is connected, a confirmation bubble should appear immediately, with a generic USB, Firewire, or miscellaneous (''e.g.'' eSATA) device icon, title text “Device connected”, and no body text.
Line 329: Line 446:
== Programs that should be modified before Ubuntu 9.04 ==

Many programs currently use notification bubbles with actions. These need changing to either remove the actions or communicate in some other way. The programs are listed most important first.

## http://people.ubuntu.com/~pitti/tmp/notifications/
## cat *.txt | cut -d/ -f1-2 | grep -v === | grep -v grep | cut -c3- | uniq

=== Update Manager ===

The availability of updates should no longer be shown using a notification area icon and notification bubble pointing to it. Instead, Update Manager should open [[http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--focus-on-map|unfocused]] directly. (When opened manually, Update Manager should still open focused as usual.)

This means that Update Manager will often be the first window people ever see on a newly-installed Ubuntu system. Therefore, the text at the top of the Update Manager window should also be altered to be more welcoming.
||<|2> ||<style="text-align: center;" |2>'''Old text'''||||<style="text-align: center;">'''New text'''||
||<style="text-align: center;">'''First run'''||<style="text-align: center;">'''All subsequent runs'''||
||'''Heading'''||You can install ''n'' updates.||Welcome to Ubuntu.||Software updates are available for this computer.||
||'''Body'''||Software updates correct errors, eliminate security vulnerabilities and provide new features.||These software updates have been issued since Ubuntu ''x''.''y'' was released. If you don’t want to install them now, choose “Update Manager” from the Administration menu later.||If you don’t want to install them now, choose “Update Manager” from the Administration menu later.||

To reduce the frequency with which the window appears, update-manager should check for security updates daily, but check for non-security updates only once a week. (If there are security updates, when the Update Manager window opens it should still show all available updates, not just the security ones.)

This will fix:
 * [[http://launchpad.net/bugs/175166|bug 175166]] ("click the icon" instruction dangerously confusing)
 * [[http://launchpad.net/bugs/33605|bug 33605]] ("Updates available" popup should hide when update-manager starts)

=== gnome-settings-daemon, kwin, metacity ===

Brightness and volume changes should be shown as confirmation bubbles instead of the existing overlays.

=== update-notifier ===

Post-update information should no longer be advertised using a notification area icon and a notification bubble pointing to it. Instead, the post-update information dialog should open [[http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--focus-on-map|unfocused]] directly.

This will fix:
 * [[http://launchpad.net/bugs/160362|bug 160362]] ("Ubuntu has some information for you.")
 * [[https://blueprints.launchpad.net/ubuntu/+spec/urgent-reboot-notification|Urgent Reboot Notification]]

=== Network Manager ===

Because Network Manager is a high-profile user of notification bubbles, it should be adjusted not just for compatibility with Notify OSD, but also to make its bubbles more elegant regardless of which notification system is in use.

 * When you are not connected but wireless networks are available, a “Wireless Networks Available” bubble appears, with text “Click on this icon to connect to a wireless network” and a "Don't show this message again" button. This bubble should be removed. Instead, the network manager icon should flash with a glow effect five times over five seconds. ''This clashes with the proposed appearance for when wireless is actually connecting.''

 * When the computer is connecting to a wireless network, the wireless Network Manager icon should appear in offline state but with its base blinking on and off. No notification bubble should appear.

||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;"> {{attachment:wireless-connected.jpg}} ||

 * Once you are connected to a wireless network, a notification bubble should appear with the connected wireless icon, title the name of the wireless network, and body “Connection established”.

 * When connection to a wireless network fails for a reason other than incorrect authentication, a notification bubble should appear with disconnected icon, title the name of the wireless network, and body “Connection failed”.

 * When the computer is disconnected from a wireless network via software, a notification bubble should appear with disconnected icon, title the name of the wireless network, and body “Disconnected”.

 * When the computer is disconnected from a wireless network via hardware switch, a notification bubble should appear with wireless-disabled icon, title “Wi-fi switched off”, and no body.

 * When the computer is connecting to a wired network, the wired Network Manager icon should appear in offline state but with its base blinking on and off. No notification bubble should appear.

 * Once you are connected to a wired network, a notification bubble should appear with the connected wired icon, title “Wired network”, and body “Connection established”.

 * When connection to a wired network fails, a notification bubble should appear with disconnected icon, title “Wired network”, and body “Connection failed”.

 * When the computer is disconnected from a wired network via software, a notification bubble should appear with disconnected icon, title “Wired network”, and body “Disconnected”.

||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;"> {{attachment:3g-detected.png}} ||

 * When a mobile broadband card is inserted or a 3G phone is connected in network mode, a “New Mobile Broadband Device Detected” bubble appears with text “''Model Name'': - Click here to configure the device…” and a “Configure” button. Clicking the button or anywhere else in the bubble, opens a setup assistant. Instead, the setup assistant should open [[http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--focus-on-map|unfocused]] directly ([[http://launchpad.net/bugs/327427|bug 327427]]).

||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;"> {{attachment:3g-finished.png}} ||

 * When mobile broadband configuration is complete, a “New Configuration Created” bubble appears with text “You can activate the connection by clicking this icon. Use connection editor to add new and to change settings if necessary” [sic]. This bubble has no actions, but has the problem that it refers to “this icon”. Instead, “Connect immediately when setup is complete” should be a checkbox horizontally centered at the bottom of the “Summary” page of the setup assistant.

 * When the computer is connecting to a mobile broadband network, the mobile broadband NetworkManager icon should appear in connecting state. No notification bubble should appear.

 * Once you are connected to a mobile broadband network, a notification bubble should appear with the relevant network type icon, title the name of the mobile network, and body “Connection established”.

 * When connection to a mobile broadband network fails, a notification bubble should appear with disconnected icon, title the name of the mobile broadband network, and body “Connection failed”.

 * When the computer is disconnected from a mobile broadband network via software, a notification bubble should appear with disconnected icon, title the name of the mobile broadband network, and body “Disconnected”.

=== Gnome Power Manager ===

Gnome Power Manager puts up notifications in [[http://library.gnome.org/users/gnome-power-manager/stable/notify.html.en|many situations]].
<<Anchor(compatibility)>>
== Compatibility fixes accepted upstream ==

Ubuntu and upstream developers have made fixes to several programs to make their notifications compatible with Notify OSD and the Desktop Notifications Specification. For designs of fixes that are now incorporated into the upstream projects, see [[/PreviousCompatibilityFixes|PreviousCompatibilityFixes]].

== Compatibility fixes still to be maintained ==

Other compatibility fixes have not yet been implemented, or have been implemented in Ubuntu packages but not yet merged upstream. These fixes are listed in this specification, alphabetically by package name, to assist in regression testing.

''If you’re the application developer or someone who can patch one of these programs, see NotificationDevelopmentGuidelines for guidelines and code samples.''

'''''Once a fix has been accepted upstream, please move its specification from this document to [[/PreviousCompatibilityFixes|PreviousCompatibilityFixes]].'''''

=== amsn ===

 * When someone sends you an instant message while you are online, a notification bubble appears that, when clicked, displays the message. The button should be made conditional on whether the notification server supports `actions`.

 * When someone sends you an instant message while you are offline, a notification bubble appears that, when clicked, opens the login page for your Hotmail in a Web browser. ''What’s the text?''

=== apport ===

 * When a system process crashes, an icon appears in the panel, and a “Crash report detected” bubble appears with the text “An application has crashed on your system (now or in the past). Click on the notification icon to display details.” The icon and bubble should not appear; instead an alert should appear [[http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--focus-on-map|unfocused]].

 {{attachment:apport.jpg}}

 '''Implementation:''' update-notifier `src/crash.c`

=== banshee ===

 * When a connection to Last.fm fails, a notification bubble appears with “Account Settings” and “Join Last.fm” buttons. This should be converted to an error alert box with the same wording and buttons.

=== bluez-gnome ===

||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;"> {{attachment:bluez-pairing-before.png}} ||

 * When from a Bluetooth device you try to connect to the computer, a “Bluetooth Device” bubble appears with the text “Pairing request for ''device name''” and an “Enter PIN code” button that, when clicked, opens an authentication alert for entering the PIN. Instead, the authentication alert should open [[http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--focus-on-map|unfocused]] directly, and request attention.

 * ''A bubble apparently appears when sending a file from a device to the computer, but this cannot be reproduced currently.''

=== bzr-gtk ===

 * When a merge or pull is complete, a notification bubble appears that never expires and contains an “Inspect” button that opens a visualizer and a “Branch” button that shows the branch in Nautilus. Instead, the main Olive window should request attention when a merge or pull is complete, and the “Inspect” and “Branch” actions should be available from that main window.

=== debian-bts-applet ===

 * When a bug report you’re interested in changes, a “Bug #%d's %s changed” notification bubble appears containing “More info” and “Hide” buttons, where the “More info” button opens the bug report in a Web browser. Instead …

=== decibel-audio-player ===

 * When a new track starts playing, a notification bubble appears giving the song details, and containing a “Skip track” button. The button should be made conditional on whether the notification server supports `actions`.

[[https://bugs.launchpad.net/bugs/328609|Launchpad #328609]]

=== emesene ===

 * When a new message arrives, a notification bubble appears that, when clicked, reveals the message. Instead, emesene should integrate with the [[MessagingMenu|messaging menu]]. ([[http://launchpad.net/bugs/345660|Bug 345660]] proposes instead making the action conditional on whether the notification server accepts `actions`.)

=== empathy ===

When you receive a message from someone:
 * The message should always appear in the MessagingMenu, if it is being used. (The “Use messaging indicators” preference is neither understandable nor useful, and should be abolished.)
 * If the chat window for that person is not open, it should always open, [[http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--focus-on-map|unfocused]] and in the background. (See for example [[http://arstechnica.com/open-source/reviews/2009/11/good-karma-ars-reviews-ubuntu-910.ars/3|the ''Ars Technica'' review]] of Ubuntu 9.10.)
 * Depending on your preferences, a notification bubble should also appear containing the text of the message.

No notification bubble should be added or changed because someone is typing.

=== evolution ===

 * When the “Mail Notification” plug-in is turned on and new messages arrive, Evolution puts up a "New email" notification bubble which, when clicked, hides the notification area icon. This should be replaced by the [[MessagingMenu|messaging menu]].

[[https://bugs.launchpad.net/ubuntu/+source/evolution/+bug/331571|Launchpad #331571]]

=== firefox ===

||<tablestyle="margin: 0 0 1em 1em; float: right;" style="border: none;"> {{attachment:firefox-current.png}} ||

Firefox uses custom notification boxes that do one thing when clicked. We are working with Mozilla on ways to present these without using a custom notification system.
 * When all current downloads have completed, Firefox displays a “Downloads Complete” notification box containing an “All files have finished downloading” link that opens and focuses the Downloads window.
  1. Our recommended replacement behavior is for the Downloads window to open [[http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--focus-on-map|unfocused]] if it is not open already, scroll to the bottom of its list (if it is not scrolled to the bottom already), and request attention.
  2. Alternatively, Firefox could have no special notification of completed downloads at all (just as Safari and Opera do not, for example).
  3. A last resort would be to continue showing the sliding XUL notification used in Firefox 3.0.

 * When add-on updates are available, Firefox displays a notification box containing a link that opens the Add-ons window. Instead, we recommend that the Add-ons window open in the background, with the new updates being advertised in a banner the same style as the existing “1 new add-on has been installed” banner.

* '''An experimental plugin for integrating Firefox with libnotify can be downloaded from here [[https://addons.mozilla.org/en-US/firefox/addon/9622]] or as an Ubuntu Package from here [[http://packages.ubuntu.com/karmic/firefox-notify]] (karmic)'''

=== gajim ===

 * When a new message arrives while gajim is in the background, a notification bubble appears that, when clicked, brings the relevant window to the front. The action should be made conditional on whether the notification server supports `actions`.

=== Giver ===

 * When someone offers you a file, a notification bubble appears containing “Accept” and “Decline” buttons. Instead, Giver should have a File Transfers window that morphs when necessary, [[NotificationDesignGuidelines#Morphing%20window|as shown in the notification development guidelines]] ([[http://launchpad.net/bugs/347081|bug 347081]]).

=== gmail-notify ===

 * When a new mail is received, a notification square appears in the bottom-right corner informing about it. If you click on it your inbox is shown in the web browser. When the user clicks on the panel indicator, the same square appears informing whether the inbox is empty or there are new messages. gmail-notify should instead be integrated with the [[MessagingMenu|messaging menu]].

=== gnome-disk-utility ===

 * `gnome-disk-utility` should implement the hardware device detection bubbles [[#device-detection|as specified]] ([[http://launchpad.net/bugs/345317|bug 345317]]).

||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;">{{attachment:gnome-mount-unmounting.png}}||

 * When the process of unmounting a volume is taking more than a few seconds (because previously cached data is being written to it first), gnome-mount puts up a persistent notification warning you not to “remove the media or disconnect the drive”. ''(What does `gnome-disk-utility` do currently?)''

 Instead, `gnome-disk-utility` should open a progress window frontmost ([[http://launchpad.net/bugs/332600|bug 332600]], [[http://launchpad.net/bugs/325315|bug 325315]]):

 {{attachment:unmount-progress.jpg}}<<BR>>

 The title and icon for the progress window should be the name and icon for the volume.

 The other text should vary depending on whether the volume is to be ejected or disconnected (as determined by whether `hal` regards it as “removable” or “hotpluggable”).

 || ||'''Removable volume'''||'''Hotpluggable volume'''||
 ||<)>'''Primary text while unmounting''' (standard application font)||Finishing up…||Finishing up…||
 ||<)>'''Secondary text while unmounting''' (Pango `<small>`)||To prevent data loss, wait until this has finished before ejecting.||To prevent data loss, wait until this has finished before disconnecting.||
 ||<)>'''Primary text after unmounting''' (standard application font)||It’s now safe to eject “Name Of Volume”.||It’s now safe to disconnect “Name Of Volume”.||

 The window should not change size when it switches to showing the post-unmount information.

 Once the window has shown the post-unmount information for four seconds, it should close automatically.

=== gnome-power-manager ===

Gnome Power Manager puts up interactive notifications in [[http://library.gnome.org/users/gnome-power-manager/stable/notify.html.en|many situations]] ([[http://launchpad.net/bugs/329296|bug 329296]]).
Line 418: Line 581:
'''Implementation:''' Tweak `gpm-notify.c` so that it uses the `#else` versions of the `#ifdef HAVE_LIBNOTIFY` functions. The design of these alerts could be improved, but we should not spend time on this now, because the code will soon be replaced by Device``Kit-power.

Another situation is fair
ly common, but any response involves the hardware rather than the software, so it should use a notification bubble:

 * “Battery
Discharging”, “The AC power has been unplugged. The system is now using battery power.” with a “Do not show me this again” button. This button should be made conditional on whether the notification server supports actions.
'''Implementation:''' Tweak `gpm-notify.c` so that it uses the `#else` versions of the `#ifdef HAVE_LIBNOTIFY` functions. The design of these alerts could be improved, but we should not spend time on this now, because the code will soon be replaced by Device``Kit-power. Once Device``Kit-power is being used, the “Power Critically Low” alert should be reimplemented as a [[NotificationDesignGuidelines#morphing|morphing alert box]].
Line 429: Line 588:
=== Evolution ===

 * When the “Mail Notification” plug-in is turned on and new messages arrive, Evolution puts up a "New email" notification bubble which, when clicked, hides the notification area icon. This should be replaced by the [[Ubuntu/MessageStatusMenu|message status menu]].

=== Pidgin ===

 * When a buddy signs on or a message is received, the pidgin-libnotify plug-in shows a notification bubble containing a “Show” button, which in both cases opens the chat window for that person. The [[Ubuntu/MessageStatusMenu|message status menu]] covers the latter case ''but in the former, should not show the button.''

No notification bubble should be added or changed because someone is typing.

=== gnome-mount ===
And one should be changed to be more useful ([[http://launchpad.net/bugs/399492|bug 399492]]):
 * “Battery Discharging”, “The AC power has been unplugged. The system is now using battery power.” should be changed to “Running on battery”, “2 hours 15 minutes remaining”, with the appropriate battery icon for the current charge level.

=== gnome-screensaver ===

||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;">{{attachment:while-you-were-out.jpg}}||

 * The screensaver’s “Leave a Message” function uses a persistent notification bubble to present the messages ([[http://launchpad.net/bugs/333269|bug 333269]]). Instead, all messages left during a single session should be presented in a scrolling text view in a single “While You Were Out” dialog in the center of the screen, with an “OK” button that clears the message list and closes the dialog.

||<tablestyle="margin: 0; clear: both;" style="border: none;">||
=== gnome-settings-daemon ===

 * [[#brightness|Brightness]] and [[#volume|volume]] changes should be shown as confirmation bubbles instead of the existing overlays ([[http://launchpad.net/bugs/333997|bug 333997]]).

 * New in Gnome 2.26, gnome-settings daemon [[http://bugzilla.gnome.org/show_bug.cgi?id=557647|warns about low disk space]] in a “Low Disk Space” critical notification bubble with text “%d%% of the disk space on `%s' is in use”). If Disk Usage Analyzer (`baobab`) is installed, the bubble contains an “Analyze” button that opens Disk Usage Analyzer. Instead, this should be an alert box ([[http://launchpad.net/bugs/337441|bug 337441]]):

 {{attachment:low-disk-partition.jpg}}
 {{attachment:low-disk-examine.jpg}}

 (This is a starting point for [[http://live.gnome.org/LowDiskSpaceWarning|a smarter low disk space warning]].)

<<Anchor(keyboard-accessibility)>>
 * When “Accessibility features can be toggled with keyboard shortcuts” is on, holding down the Shift key for 8 seconds uses a notification bubble to prompt to activate/deactivate Slow Keys, and pressing Shift five times consecutively uses a notification bubble to prompt to activate/deactivate Sticky Keys. Instead these should open alert boxes ([[http://launchpad.net/bugs/342567|bug 342567]]), frontmost because they are in direct response to user input:<<BR>>

 {{attachment:slow-keys-activate-after.jpg}}{{attachment:slow-keys-deactivate-after.jpg}}
 {{attachment:sticky-keys-activate-after.jpg}}{{attachment:sticky-keys-deactivate-after.jpg}}<<BR>><<BR>>

 Take care that the secondary text varies between the activate and deactivate cases, as shown in these mockups.<<BR>><<BR>>

 The previous bubble for deactivating Sticky Keys began by saying “You just pressed two keys at once, or pressed the Shift key five times in a row.” This sentence is dropped from the alert box design, because it is lame for the computer to feign ignorance about which of those two things happened. Alternatively, the primary text should correctly begin with either the sentence “You pressed two keys at once.”, or the sentence “You pressed the Shift key five times in a row.”.<<BR>><<BR>>

 In all four alerts, the “Settings…” button should open and focus the “Accessibility” tab of the “Keyboard Preferences” window, and close the alert.

=== gnome-user-share ===

||<tablestyle="clear: right; float: right; margin: 0 0 1em 1em;" style="border: none;"> {{attachment:gnome-user-share-after.jpg}}||

 * When you have received a file over a Bluetooth connection, a notification bubble appears, with “Open File” and “Reveal File” buttons. Instead, an alert box should appear unconditionally, [[http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--focus-on-map|unfocused]] and in the background — using the icon of the actual file, and with “Open” and “Reveal” buttons next to the default “OK” button ([[http://launchpad.net/bugs/337352|bug 337352]]).<<BR>><<BR>>

 (A more sophisticated design, to better handle multiple incoming files, would be a “Received Files” window — listing all recently-received files, with options to open or reveal any of them at your leisure. The window could request attention whenever a file transfer completes.)

=== gnoemoe ===

 * When you receive a message, a notification bubble appears that, when clicked, focuses the application. This program appears to be unmaintained and unused, so probably can be ignored.

=== goobox ===

 * When a music track starts playing, a notification bubble appears containing “Next” and “Stop” buttons. The button should be made conditional on whether the notification server supports `actions`. [[https://bugs.launchpad.net/ubuntu/+source/goobox/+bug/327714|Launchpad #327714]]

=== gossip ===

 * When a contact comes online, a notification bubble appears containing a “Chat” button, though clicking anywhere else in the bubble does the same as clicking the button. The actions should be made conditional on whether the notification server advertises that it accepts `actions`.

 * When someone adds you to their buddy list, a notification bubble appears that, when clicked, opens the subscription request dialog. Instead, the subscription request dialog should open directly, [[http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--focus-on-map|unfocused]] and in the background.

 * When a new message arrives, a notification bubble appears containing a “Show” button, though clicking anywhere else in the bubble does the same as clicking the button. The actions should be made conditional on whether the notification server advertises that it accepts `actions`.

[[https://bugs.launchpad.net/ubuntu/+source/gossip/+bug/32861|#328613]]

=== gshutdown ===

 * gshutdown produces a notification bubble warning you of impending shutdown, and containing a button “Show Main Window”. Instead …

=== kerneloops ===

 * When there is a kernel oops, a notification bubble appears asking if you want to send the error to the Kernel Oops Web site, containing five buttons: “Always”, “Yes”, “No”, or “Never”, and “Details”. Instead, this should be an alert box with four buttons, and an expandable section to show the error log ([[http://launchpad.net/bugs/344377|bug 344377]]).

 ||'''Before'''||'''After'''||
 ||<^>{{attachment:kerneloops-before.jpg}}||<^>{{attachment:kerneloops-after.jpg}}||

 * When the error report is successfully submitted, a notification bubble appears saying that “You can view your submitted oops here”, where “here” is a link in notification servers that accept hyperlinks ([[http://launchpad.net/bugs/347984|bug 347984]]). Instead, when “Always” or “Yes” is clicked in the initial alert, it should not disappear; rather it should smoothly resize vertically and become a progress window with an indeterminate progress bar. When the process is complete, the progress window should in turn morph into an alert notifying you that the report is complete and giving you the opportunity to view the report.

 ||'''Before'''||'''After'''||
 ||<^>{{attachment:kerneloops-reported-before.png}}||<^>{{attachment:kerneloops-sending.jpg}}<<BR>>{{attachment:kerneloops-complete.jpg}}||

 Even better would be for the progress window to use a determinate progress bar rather than an indeterminate one, and to include a “Cancel” button.

 {{attachment:kerneloops-sending-determinate.jpg}}

=== kopete ===

 * When a contact wants to add you to his contact list, a bubble application with the actions “Add”, “Authorize”, “Block”, and “Info...”. Instead, if the notification system does not allow actions, this should be shown as a dialog.

 * On connection errors, a bubble appears. This bubble may contain a “More Information...” button which shows a message box with a more detailed error message. Instead, a placard should appear inside the main Kopete window giving a summary of the error, with a “Details” button to show the message box. If the main Kopete window is not open at the time, a notification with no actions should also be sent.

 * When a chat message arrives, a bubble appears with “View” and “Ignore” buttons. The buttons should be made conditional on whether the notification system allows actions, and Kopete should be integrated with the MessagingMenu.

=== kpackagekit ===

 * When a distribution upgrade is detected, a bubble appears with a “Start upgrade now” button. Instead, a placard — with the text “A new version of Kubuntu is available”, and an “Upgrade” button — should appear near the top of the updates window whenever it is open for any other reason (as it does in Update Manager).

 * When updates are available, a bubble appears with the actions “Review and update”, “Not now”, and “Do not ask again”. Instead, the window that lists the updates should periodically open automatically, like Update Manager does (''see'' SoftwareUpdateHandling), with an option in KPackageKit’s “Settings” pane for controlling how often you are prompted about updates.

 * In case of error, a bubble appears with the actions “Details” and “Ignore”, where “Details” opens an error alert. Instead, the error alert should open directly.

 * If an update requires restarting the system, a bubble appears with actions “Restart” and “Not now”. Instead, this should be shown as a standard alert box with “Restart” and “Not Now” buttons.

 * If an update requires restarting the session, a bubble appears with actions “Logout” and “Not now”. Instead, this should be shown as a standard alert box with “Log Out” and “Not Now” buttons.

=== kwalletmanager ===

 * When an application is in the background and asks to open the wallet because it requests a password, kwallet shows a bubble to tell the user about this. The bubble contains two buttons: “Switch to <application>” and “Ignore”. Instead, the application’s window should just use the standard mechanism for requesting attention.

=== liferea ===

 * Liferea has a “Show a popup window with new headlines.” option that is on by default. As a result, when updating feeds, Liferea puts up a flood of notification bubbles with “Open Feed”, “Mark all as read”, and “Show details” buttons. These are annoying and unusable unless you are subscribed to very few feeds, but the presence of the option makes it difficult to remove. Instead, the buttons should be made conditional on whether the notification server supports `actions`.

[[https://bugs.launchpad.net/ubuntu/+source/liferea/+bug/328606|Launchpad #328606]]

=== network-manager ===

Because Network Manager is a high-profile user of notification bubbles, it should be adjusted not just for compatibility with Notify OSD, but also to make its bubbles more elegant regardless of which notification system is in use.

 * When you are not connected but wireless networks are available, a “Wireless Networks Available” bubble appears, with text “Click on this icon to connect to a wireless network” and a "Don't show this message again" button. This bubble should be removed. Instead, the network manager icon should flash with a glow effect five times over five seconds. ''This clashes with the proposed appearance for when wireless is actually connecting.''

 * When the computer is connecting to a wireless network, the wireless Network Manager icon should appear in offline state but with its base blinking on and off. No notification bubble should appear.

||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;"> {{attachment:wireless-connected.jpg}} ||

 * Once you are connected to a wireless network, a notification bubble should appear with the connected wireless icon, title the name of the wireless network, and body “Connection established”. ([[https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/330526|Launchpad #330526]])

 * When connection to a wireless network fails for a reason other than incorrect authentication, a notification bubble should appear with disconnected icon, title the name of the wireless network, and body “Connection failed”.

 * When the computer is disconnected from a wireless network via software, a notification bubble should appear with disconnected icon, title the name of the wireless network, and body “Disconnected”. If this disconnection leaves you with no active network connections, the body text should end with “- you are now offline”, and the bubble should use an `urgency` of `2` so as to be treated as [[#critical|critical]]. (This is so that, for example, you will be notified of losing connection promptly while playing an online game).

 * When the computer is disconnected from a wireless network via hardware switch, a notification bubble should appear with wireless-disabled icon, title “Wi-fi switched off”, and no body.

 * When the computer is connecting to a wired network, the wired Network Manager icon should appear in offline state but with its base blinking on and off. No notification bubble should appear.

 * Once you are connected to a wired network, a notification bubble should appear with the connected wired icon, title “Wired network”, and body “Connection established”. ([[https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/330571|Launchpad #330571]])

 * When connection to a wired network fails, a notification bubble should appear with disconnected icon, title “Wired network”, and body “Connection failed”.

 * When the computer is disconnected from a wired network via software, a notification bubble should appear with disconnected icon, title “Wired network”, and body “Disconnected”. If this disconnection leaves you with no active network connections, the body text should end with “- you are now offline”, and the bubble should use an `urgency` of `2` so as to be treated as [[#critical|critical]].

||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;"> {{attachment:3g-detected.png}}||

 * When a mobile broadband card is inserted or a 3G phone is connected in network mode, a “New Mobile Broadband Device Detected” bubble appears with text “''Model Name'': - Click here to configure the device…” and a “Configure” button. Clicking the button or anywhere else in the bubble, opens a setup assistant. Instead, the setup assistant should open [[http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--focus-on-map|unfocused]] directly ([[http://launchpad.net/bugs/327427|bug 327427]]).

||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;"> {{attachment:3g-finished.png}} ||

 * When mobile broadband configuration is complete, a “New Configuration Created” bubble appears with text “You can activate the connection by clicking this icon. Use connection editor to add new and to change settings if necessary” [sic]. This bubble has no actions, but has the problem that it refers to “this icon”. Instead, “Connect immediately when setup is complete” should be a checkbox horizontally centered at the bottom of the “Summary” page of the setup assistant.

 * When the computer is connecting to a mobile broadband network, the mobile broadband NetworkManager icon should appear in connecting state. No notification bubble should appear.

 * Once you are connected to a mobile broadband network, a notification bubble should appear with the relevant network type icon, title the name of the mobile network, and body “Connection established”. ([[https://bugs.launchpad.net/ubuntu/+source/network-manager-applet/+bug/330608|Launchpad #330608]])

 * When connection to a mobile broadband network fails, a notification bubble should appear with disconnected icon, title the name of the mobile broadband network, and body “Connection failed”.

 * When the computer is disconnected from a mobile broadband network via software, a notification bubble should appear with disconnected icon, title the name of the mobile broadband network, and body “Disconnected”. If this disconnection leaves you with no active network connections, the body text should end with “- you are now offline”, and the bubble should use an `urgency` of `2` so as to be treated as [[#critical|critical]].

=== ontv ===

 * When a new program matching your criteria is detected, a notification bubble appears that, when clicked, opens a dialog with more details of the program. Instead …

=== openoffice.org-impress ===

Impress should have a checkmark item in its “Slide Show” menu for whether non-critical notifications are suppressed during a slide show.

||<rowstyle="vertical-align:top;" style="border:none;">{{attachment:impress-before.png}}||<style="border:none;vertical-align:middle;">→||<style="border:none;">{{attachment:impress-after.jpg}}||


=== packagekit-gnome ===
Line 443: Line 754:
=== apport ===

 * When a system process crashes, an icon appears in the panel, and a “Crash report detected” bubble appears with the text “An application has crashed on your system (now or in the past). Click on the notification icon to display details.” The icon and bubble should not appear; instead an alert should appear [[http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--focus-on-map|unfocused]].

 {{attachment:apport.jpg}}

 As a temporary alternative, if there is not time to implement the alert, the icon should still appear but the bubble should not.

 '''Implementation:''' update-notifier `src/crash.c`

=== Banshee ===

 * When a connection to Last.fm fails, a notification bubble appears with “Account Settings” and “Join Last.fm” buttons. This should be converted to an error alert box with the same wording and buttons.

 * When a new track begins, a notification bubble appears with a “Skip this item” button. The bubble still makes sense without the button, so the button should be made conditional on whether the notification server supports `actions`.

=== bluez-gnome ===

||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;"> {{attachment:bluez-pairing-before.png}} ||

 * When from a Bluetooth device you try to connect to the computer, a “Bluetooth Device” bubble appears with the text “Pairing request for ''device name''” and an “Enter PIN code” button that, when clicked, opens an authentication alert for entering the PIN. Instead, the authentication alert should open [[http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--focus-on-map|unfocused]] directly, and request attention.

 * ''A bubble apparently appears when sending a file from a device to the computer, but this cannot be reproduced currently.''
=== pidgin ===

||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;">{{attachment:pidgin-libnotify-capture.png}}||

 * When a buddy signs on, or a message is received, the `pidgin-libnotify` plug-in shows a notification bubble containing a “Show” button, which in both cases opens the chat window for that person. Both of these buttons should be made conditional on whether the notification server advertises that it accepts `actions`. '''Implementation:''' an `if` block around the line `notify_notification_add_action (notification, "show", _("Show"), action_cb, NULL, NULL);`

In addition, Pidgin should be integrated with the [[MessagingMenu|messaging menu]].

=== powerdevil ===

 * When powerdevil is about to suspend or shut down the machine because battery level is critical, it shows a bubble to notify the user. The bubble contains a “Cancel” button to prevent powerdevil from continuing. As with `gnome-power-manager`, this should be shown as a dialog instead.

=== quassel ===

 * When an highlighted message arrives, a notification bubble appears with a “View” button that brings the application to front and switch to the correct tab. The “View” button should be made conditional on whether the notification system allows actions, chat windows containing new messages should request attention in the standard way, and Quassel should be integrated with the MessagingMenu.

=== software-sources ===

<<Anchor(update-settings)>>The “Updates” settings in Software Sources should be [[SoftwareUpdates#settings|modified to reflect the automatic-opening behavior]].

=== specto ===

 * When something being monitored changes, a notification bubble appears that, when clicked, opens the file/application/URI being monitored. Instead …

specto is fixed in 0.3 development branch http://code.google.com/p/specto/issues/detail?id=215
Line 475: Line 788:
 * When a print job gets stuck for some reason, a notification bubble appears containing text “There was a problem processing the document” or similar, containing no buttons but staying open until it is clicked. This should be converted to an error alert box with an “OK” button.

=== VLC ===
 * When a print job gets stuck for some reason (for example, when a printer is out of paper), a notification bubble appears containing text “There was a problem processing the document” or similar, containing no buttons but staying open until it is clicked. This should be converted to an error alert box with an “OK” button ([[http://launchpad.net/bugs/343904|bug 343904]]).

[[https://bugs.edge.launchpad.net/ubuntu/+source/system-config-printer/+bug/328604]] - patch submitted

=== system-install-packages ===

 * When you add a new printer and drivers or packages are missing, a critical “Install printer driver” notification bubble appears with the text “`%s' requires driver installation: %s.” and an “Install” button. This bubble should be converted into an alert box with “Cancel” and “Install” buttons.

=== thunderbird ===

 * Thunderbird’s “General” Preferences contain an option to “Show an alert” when new messages arrive. A secondary dialog lets you customize the alert to include “Message Preview Text”, “Subject”, and/or “Sender”.
 * Thunderbird third-party extensions updates may also use notifications.
 * An example implementation of tray notifications can be seen by installing the [[http://moztraybiff.mozdev.org/|MozTrayBiff]] extension or, closer to Gnome, the [[http://www.nongnu.org/mailnotify/|mail-notification]] package.

 * An experimental plugin for integrating Thunderbird with libnotify can be downloaded from here [[https://launchpad.net/libnotify-mozilla]]
 * Another effort is available here: [[http://ubuntuforums.org/showthread.php?p=7095038]]

=== timer-applet ===

 * When a timer expires, a notification bubble appears that, when closed, sets another timer to be displayed 60 seconds later. ''Does the bubble contain any buttons?'' Instead …

=== totem ===

In its “Display” preferences, Totem should have a checkbox for whether full-screen movies suppress non-urgent notifications.

||<rowstyle="vertical-align:top;" style="border:none;">{{attachment:totem-preferences-before.png}}||<style="border:none;vertical-align:middle;">→||<style="border:none;">{{attachment:totem-preferences-after.jpg}}||

=== tracker ===

([[http://launchpad.net/bugs/350415|bug 350415]])

 * When Tracker indexing fails, a notification appears...

||<tablestyle="float: right; clear: left;">{{attachment:tracker-before.png}}||

 * When indexing is about to begin, a notification appears with the title “Tracker” and body text including the sentence “You can pause indexing at any time and configure index settings by right clicking here”, which you can’t. Instead...

=== vlc ===
Line 481: Line 829:
=== Liferea ===

 * Liferea has a “Show a popup window with new headlines.” option that is on by default. As a result, when updating feeds, Liferea puts up a flood of notification bubbles with “Open Feed”, “Mark all as read”, and “Show details” buttons. These are annoying and unusable unless you are subscribed to very few feeds, but the presence of the option makes it difficult to remove. Instead, the buttons should be made conditional on whether the notification server supports `actions`.

=== amsn ===

 * When someone sends you an instant message while you are online, a notification bubble appears that, when clicked, displays the message. The button should be made conditional on whether the notification server supports `actions`.

 * When someone sends you an instant message while you are offline, a notification bubble appears that, when clicked, opens the login page for your Hotmail in a Web browser. ''What’s the text?''

=== decibel-audio-player ===

 * When a new track starts playing, a notification bubble appears giving the song details, and containing a “Skip track” button. The button should be made conditional on whether the notification server supports `actions`.

=== goobox ===

 * When a music track starts playing, a notification bubble appears containing “Next” and “Stop” buttons. The button should be made conditional on whether the notification server supports `actions`.

=== bzr-gtk ===

 * When a merge or pull is complete, a notification bubble appears that never expires and contains an “Inspect” button that opens a visualizer and a “Branch” button that shows the branch in Nautilus. Instead, the main Olive window should request attention when a merge or pull is complete, and the “Inspect” and “Branch” actions should be available from that main window.

=== Gossip ===

 * When a contact comes online, a notification bubble appears containing a “Chat” button, though clicking anywhere else in the bubble does the same as clicking the button. The actions should be made conditional on whether the notification server supports `actions`.

 * When someone adds you to their buddy list, a notification bubble appears that, when clicked, brings up the subscription request dialog.

 * When a new message arrives, a notification bubble appears containing a “Show” button, though clicking anywhere else in the bubble does the same as clicking the button. The actions should be made conditional on whether the notification server supports `actions`.

=== gajim ===

 * When a new message arrives while gajim is in the background, a notification bubble appears that, when clicked, brings the relevant window to the front. The action should be made conditional on whether the notification server supports `actions`.

== Programs that should be modified sometime ==

=== Firefox ===

||<tablestyle="margin: 0 0 1em 1em; float: right;" style="border: none;"> {{attachment:firefox-current.png}} ||

 * When all current downloads have completed, Firefox displays a custom “Downloads Complete” notification box containing an “All files have finished downloading” link that opens and focuses the Downloads window.
 We are working with Mozilla on ways to provided access to completed downloads without using a custom notification system. One possibility is for the Downloads window to open [[http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--focus-on-map|unfocused]] (if it is not open already), scroll to the bottom of its list (if it is not scrolled to the bottom already), and request attention.

Firefox upstream also uses a notification box for updates, but this does not appear in the Ubuntu version.

=== Thunderbird ===

 * Thunderbird’s “General” Preferences contain an option to “Show an alert” when new messages arrive. A secondary dialog lets you customize the alert to include “Message Preview Text”, “Subject”, and/or “Sender”.

=== Empathy ===

''?''

No notification bubble should be added or changed because someone is typing.

=== XChat ===

''?''

=== Konversation ===

''?''

=== Gnome Do ===

 * When updates are available for Gnome Do plug-ins, a notification bubble appears that says “Updated plugins are available. Click here to update.”. This should be converted to an alert box:
 {{attachment:gnome-do-updates.jpg}}

 * When Gnome Do cannot run a command, or cannot enter text mode, it displays a notification bubble appears that, when clicked, closes and takes a notification area icon with it.

=== Kopete ===

''?''

=== KMail ===

''?''

=== system-install-packages ===

 * When you add a new printer and drivers or packages are missing, a critical “Install printer driver” notification bubble appears with the text “`%s' requires driver installation: %s.” and an “Install” button. This bubble should be converted into an alert box with “Cancel” and “Install” buttons.

=== Transmission ===

When a download finishes, a notification bubble appears with an “Open Folder” button, and an “Open File” button if only one file was downloaded.

Transmission should instead follow the same approach as for [[#Firefox|Firefox]]. That is, a notification bubble should not appear, the main window should open [[http://library.gnome.org/devel/gtk/stable/GtkWindow.html#GtkWindow--focus-on-map|unfocused]] (if it is not open already), the completed download should be selected in the list, and the window should request attention.

=== Giver ===

 * When someone offers you a file, a notification bubble appears containing “Accept” and “Decline” buttons. ''needs morphing windows''

=== XFCE ===

When software updates are available, a bubble appears containing an “Upgrade Now” button.
[[https://bugs.launchpad.net/ubuntu/+source/vlc/+bug/328605|Launchpad #328605]]

=== zeroinstall ===

Zero Install uses a notification with a download button when updates are available. Debian/testing has a fixed version - please sync from there. See https://bugs.launchpad.net/ubuntu/+source/zeroinstall-injector/+bug/336317
Line 579: Line 837:
 * When an event is due to happen, a notification bubble appears containing “Open” and “Silence” buttons.  * When an event is due to happen, a notification bubble appears containing “Open” and “Silence” buttons. Instead …
Line 583: Line 841:
 * Mail Notification’s settings include four options for what the notification bubble should do when clicked: “Launch the mail reader”, “Open the latest message”, “Consider new mail as read”, or “Update the mail status”.
 Mail Notification is obsolete with the [[Ubuntu/MessageStatusMenu|message status menu]].

=== kernel-oops ===

 * When there is a kernel oops, a notification bubble appears asking if you want to send the error to the Kernel Oops Web site: “Always”, “Yes”, “No”, or “Never”. This should totally be an alert box instead.

=== gshutdown ===

 * gshutdown produces a notification bubble warning you of impending shutdown, and containing a button “Show Main Window”.

=== gnome-user-share ===

 * When you have received a file over a Bluetooth connection, a notification bubble appears, and clicking the bubble either opens or reveals the file.

=== debian-bts-applet ===

 * When a bug report you’re interested in changes, a “Bug #%d's %s changed” notification bubble appears containing “More info” and “Hide” buttons, where the “More info” button opens the bug report in a Web browser.

=== gnoemoe ===

 * When you receive a message, a notification bubble appears that, when clicked, focuses the application. This program appears to be unmaintained and unused, so probably can be ignored.

=== timer-applet ===

 * When a timer expires, a notification bubble appears that, when closed, sets another timer to be displayed 60 seconds later. ''Does the bubble contain any buttons?''
||<tablestyle="margin: 0 0 1em 1em; clear: right; float: right;" style="border: none;">{{attachment:mail-notification.png}}||

When new mail arrives, [[http://www.nongnu.org/mailnotify/|Mail Notification]] notifies you in a variety of ways, some of which are not relevant to or appropriate for Notify OSD ([[http://launchpad.net/bugs/332767|bug 332767]]):

 * It has a setting for whether “message popups” should be “Attached to the status icon” or “In the popup stack”. Notify OSD treats these identically, so when Notify OSD is being used, these settings should not be visible. (Currently, the only way to detect whether positioning is available is to use `GetServerInformation` to specifically include “notification-daemon” or exclude “Notify OSD”.)

 * It has a setting for whether “Expiration” should happen “Desktop default”, “Never”, or “After:” a specified time. With Notify OSD, “Desktop default” and all values of “After:” are treated identically, and “Never” produces an annoying alert box. Therefore, when Notify OSD is being used, Mail Notification notifications should not specify a duration at all, and none of these settings should be visible.

=== cGmail ===

([[http://launchpad.net/bugs/335197|bug 335197]])
Line 612: Line 855:
 * When your avatar is updated, a notification bubble appears notifying you of this, containing an “Undo” button.

=== ontv ===

 * When a new program matching your criteria is detected, a notification bubble appears that, when clicked, opens a dialog with more details of the program.

=== specto ===

 * When something being monitored changes, a notification bubble appears that, when clicked, opens the file/application/URI being monitored.

=== emesene ===

 * When a new message arrives, a notification bubble appears that, when clicked, reveals the message.

=== packagekit-gnome ===

''?''
 * When your avatar is updated, a notification bubble appears notifying you of this, containing an “Undo” button. Instead …

=== pastebin plasma widget ===

 * When user drops a text or an image on the widget, it uploads it to pastebin and show a bubble telling the pastebin url has been copied to the clipboard. This bubble also has an “Open Browser” button. Instead, there should be a extender openable from the pastebin applet (like there is for `powerdevil`), that lists previously pasted items. The list should have columns for “Clipping” (showing an icon representing the clipping type, and the first few words of the text or something like “Image (46 KB)”), “Pasted” (showing the time or date the item was pasted, or “Pasting...” if the paste has not completed), “Copy URL” (an icon-only button, or a spinner if the pasting has not yet completed), and “Open” (an icon-only button for opening the URL in a browser, or a blank space if the pasting has not yet completed).

=== Lancelot ===

''"Lancelot is a program launcher menu for KDE 4 designed to provide a place from which all your jobs begin. It provides quick access to applications, places, documents, contacts and system information."'' -- from the project web site

 * When user enables “usage logging”, a bubble appears to confirm logging is activated. It contains a “Configure” button (it seems broken at the moment). The button should be either removed, or made dependent on whether the notification system allows actions.

=== Phonon ===

''How you can help: Write here what package this is.''

 * When an audio playback device becomes available and has a higher preference than the current playback device, a bubble appears notifying the user Phonon is switching to this new device. This bubble contains a button to revert back to the old device. ''We haven't seen this ourselves, so we will leave it until we have more information about when and how it happens.''
Line 638: Line 881:
 * [[http://www.markshuttleworth.com/archives/265#comment-316761|From “frustphil”]]: What if you use the keyboard to focus a control that is underneath a currently-open bubble? For example, Ctrl K to focus Firefox’s search field.
 * Should there be a manual way of entering "do-not-disturb" mode? E.g. by setting IM status (though going online to get fewer notifications could be a bit counter-productive).
 * [[http://launchpad.net/bugs/336950|bug 336950]]: Notify OSD should expire notifications when app goes off DBus
 * [From djsiegel] Should bubbles be wider by default? That would make longer messages easier to read, but could make confirmation bubbles look a wee bit weird.
 * The Play/Pause/Next/Previous confirmation bubbles are not included in Ubuntu 9.04, because they resulted in either two notifications of an event, or one notification of nothing happening ([[http://launchpad.net/bugs/343261|bug 343261]], [[http://launchpad.net/bugs/345363|bug 345363]], [[http://launchpad.net/bugs/351986|bug 351986]]). Should the idea be retired permanently?
 * The constraints of (a) bubbles can expand, (b) two bubbles can be on the screen at once, (c) bubbles may not move, and (d) bubbles may not collide, cannot be satisfied simultaneously.
 * The changes made to update-notifier have spawned a series of serious discussions with multiple bug reports which are combined in [[https://bugs.launchpad.net/bugs/332945|#332945]].
 * Windows has an API for the "old" behavior of popping up persistent bubbles (with actions). When Wine attempts to properly implement this API, they'll have to make a decision about how to handle applications expecting the old-style persistent bubbles. Unlike distribution packages, these applications can't be changed, and some require the user to interact through their notification bubbles. We need to make sure a user running these Windows apps through Wine doesn't suffer breakages (eg overlapping notifications).
 * If a pointer is left resting where notification bubbles would otherwise appear, perhaps future bubbles should appear in a different place until the pointer moves elsewhere. [Cody Somerville]
 * Some notifications are communications you need to react upon fx. chatmessages. It seems odd that it is not possible to do so via the notification. It like saying "Talk to the hand, because the ear's not listening" (Hand = the program hidden behind other programs; Ear = the notification

This is the design specification for Notify OSD. If you are a software developer looking for advice on making your software compatible with Notify OSD, see NotificationDevelopmentGuidelines.

This specification contains some issues not yet resolved. Your feedback is welcome at NotifyOSD/Comments.

To improve the user experience for notifications in Ubuntu and Kubuntu, the Desktop Notifications Specification and the KNotification API should be implemented in a consistent way, with non-interactive, non-directional, non-overlapping notification bubbles that can be clicked through and look beautiful. For compatibility with this system, Ubuntu and Kubuntu software should be patched so that it does not rely on notifications being interactive or pointing to notification area icons, and when an unpatched program incorrectly requests a notification with actions it should be shown as an alert box. Any notification configuration should be handled by individual applications. Visual confirmation of hotkey changes to volume, screen brightness, and backlight brightness should also be presented in bubbles the same way as notifications.

Canonical Ltd’s Design team and Desktop Experience team are the upstream developers for this work. Notify OSD is hosted on Launchpad.

Contents

  1. Work for Lucid
  2. Rationale
  3. Use cases
  4. Targeted environments
  5. System nomenclature
  6. Bubble appearance and layout
    1. Inside the bubble
      1. Icon
      2. Text layout
      3. Title text
      4. Body text
      5. Gauge
      6. Interaction
    2. Outside the bubble
  7. Bubble behavior
    1. Animations and durations
    2. Sound
    3. Merging notifications
    4. Overflow of long messages
    5. Flood prevention
    6. “Do not disturb” mode
  8. Fallback alert boxes
  9. Logging notifications
  10. Critical and non-critical queues and do-not-disturb mode
  11. Treatment of the Desktop Notifications Specification 1.1
    1. org.freedesktop.Notifications.GetCapabilities
    2. org.freedesktop.Notifications.Notify
      1. Sanitizing body text
    3. org.freedesktop.Notifications.CloseNotification
    4. org.freedesktop.Notifications.GetServerInformation
    5. org.freedesktop.Notifications.NotificationClosed
    6. org.freedesktop.Notifications.ActionInvoked
  12. Treatment of the KNotification API
  13. Treatment of hotkeys
    1. Volume changes
    2. Brightness and backlight changes
    3. Disc ejection
    4. Play, Pause, Stop, Previous, and Next
  14. Treatment of hardware device detection
  15. Architecture
  16. Compatibility fixes accepted upstream
  17. Compatibility fixes still to be maintained
    1. amsn
    2. apport
    3. banshee
    4. bluez-gnome
    5. bzr-gtk
    6. debian-bts-applet
    7. decibel-audio-player
    8. emesene
    9. empathy
    10. evolution
    11. firefox
    12. gajim
    13. Giver
    14. gmail-notify
    15. gnome-disk-utility
    16. gnome-power-manager
    17. gnome-screensaver
    18. gnome-settings-daemon
    19. gnome-user-share
    20. gnoemoe
    21. goobox
    22. gossip
    23. gshutdown
    24. kerneloops
    25. kopete
    26. kpackagekit
    27. kwalletmanager
    28. liferea
    29. network-manager
    30. ontv
    31. openoffice.org-impress
    32. packagekit-gnome
    33. pidgin
    34. powerdevil
    35. quassel
    36. software-sources
    37. specto
    38. system-config-printer
    39. system-install-packages
    40. thunderbird
    41. timer-applet
    42. totem
    43. tracker
    44. vlc
    45. zeroinstall
    46. Orage
    47. Mail Notification
    48. cGmail
    49. MeMaker
    50. pastebin plasma widget
    51. Lancelot
    52. Phonon
  18. Release notes
  19. Unresolved issues

Work for Lucid

  • Extend the KDE notification API so that applications can tell whether the notification server allows actions.

  • Modify KDE applications in Main and Universe to be compliant with this new API.

  • Have a “do-not-disturb” mode that individual applications can trigger. Popular applications that have a full-screen mode (Firefox, Totem, OpenOffice.org, Vino) should have a visible option for whether/when to inhibit non-critical notifications when a window of that application is full-screen and focused. We should decide the appropriate default for those applications, and we should provide guidelines on implementing this preference in other applications.

    • As a trial during the Lucid development cycle, when an application inhibits notifications, we should display a notification: “Further notifications have been disabled.”
    • When an application that requested notification inhibition exits, notifications should always be uninhibited.
  • During the Lucid developer cycle, notification bubbles should use color and label to show priority.
  • Change in position: We should experiment with three positioning schemes.

  • There will be a new visual style, yet to be decided.

  • Application review and compatibility fixes.

  • Implement missing details, such as sound, and duration based on text length.

  • Update and complete the notification development guidelines.

  • Implement morphing windows, with gnome-power-manager’s “Battery Critically Low” message as an example.

Rationale

There are many reasons that a computer may want to notify you of things not directly related to what you are doing right now. Software updates may be available; you may have received a new instant message; your 300-page print job may have finally finished; you may have only ten minutes of battery left. Sometimes these events need a response or at least acknowledgement, or don’t need to be read immediately, in which case they should be presented in an alert box or some other window. For cases where a notification is best read immediately but there is no applicable response, however, the most appropriate mechanism is a non-interactive notification bubble. (For more details on the various notification mechanisms and when to use each one, see NotificationDesignGuidelines.)

Ubuntu previously used notification-daemon, which presented notification bubbles as interactive and therefore risked accidental clicks. The previous bubbles were also rather unattractive, so replacing the notification system gave us the opportunity to make them beautiful. And presenting volume, brightness, and similar changes in the same way as notifications decreases visual variety, and introduces a consistent appearance for non-interactive things.

Use cases

Examples of notification bubbles and other forms of notification:

  • Ten seconds after waking from sleep, your notebook successfully connects to your company’s wireless network. A notification bubble appears, with a wireless icon and the text “Connected to Yoyodyne”.
  • You and your colleague Camila are collaborating on a presentation over instant messaging. Whenever Camila says something while the presentation window is in front, what she says appears in a notification bubble with her buddy icon. If she says something else within a few seconds of the bubble appearing, the bubble grows smoothly to accommodate the new text, and its disappearance is delayed. As soon as you switch back to Camila’s chat window, her notification bubble disappears.
  • You begin giving your presentation to the management team. Five minutes in, Camila sends you another instant message: “Hope it's going well! ;-)”. Fortunately, this time no notification bubble appears to disrupt your presentation.
  • Twenty minutes into your presentation, while you are answering a question and not looking at the screen, your battery reaches a critically low level. An alert box appears, floating over the presentation, warning you of this fact.
  • You quickly connect the notebook to a colleague’s power supply. The alert box disappears by itself.
  • With the presentation over, you disconnect from the power supply and return to your office. A notification bubble appears showing that the notebook has switched to battery power.
  • You browse the company intranet while waiting for your e-mail program to launch. This being a Monday, you have over 100 new messages, and because your e-mail program is in the background it notifies you of this using a bubble. At the same time, the envelope icon in the top panel darkens to indicate the new messages. You open the envelope menu to switch back to your Inbox.

Examples of confirmation bubbles:

  • Your secondary display is a little too bright, so you want to dim it without affecting your primary display. Looking at the secondary display, you press the Reduce Brightness key on your keyboard. An overlay appears on that display, showing the brightness reducing.
  • Immediately after changing the brightness, you increase the sound volume, also with the keyboard. The brightness overlay is replaced instantly by a volume overlay. After a few seconds, the overlay fades away.
  • You change the volume again, this time using the volume menu in the top panel. No overlay appears, because visual feedback is provided by the menu itself.

Targeted environments

It is most important for Notify OSD to work correctly with Compiz in either Ubuntu or Kubuntu, Metacity composited in Ubuntu, and kwin composited in Kubuntu.

Other targets are Metacity non-composited, kwin non-composited, xfwm4 non-composited, and xfwm4 composited.

System nomenclature

Notify OSD should be packaged under the name notify-osd. When running, its process should also be called notify-osd.

Bubble appearance and layout

Notify OSD should display two types of bubbles, which this specification calls confirmation bubbles (confirmation of e.g. change in sound volume, change in display brightness, or ejecting a CD) and notification bubbles (e.g. instant message, unrequested change in Internet connectivity).

For the purpose of this specification, the term leading means “left” whenever the system is using a left-to-right language, and “right” whenever the system is using a right-to-left language. The term trailing means “right” whenever the system is using a left-to-right language, and “left” whenever the system is using a right-to-left language. All mockups in this specification are of LTR layouts.

Inside the bubble

notification-bubble.jpg

Regardless of type, a bubble should appear as a rectangle of color #131313 (regardless of theme) with opacity 80%, corner roundness 0.375 em, and a drop shadow of #000000 color and 0.5 em spread. The bubble should blur whatever is behind it with a Gaussian blur of 0.125 em.

A bubble should be 24 ems wide (not including the drop shadow). Its height depends on the contents, but should be a minimum of 5 ems, and a maximum just tall enough to display 10 lines of body text (which means the maximum height of a bubble with a title is greater than of a bubble without a title). Furthermore, the bottom limit is 6 ems from the top of the bottom panel, if there is one, or otherwise 6 ems from the bottom of the screen (as if there was a 5-em bubble at the bottom plus 0.5 em margin on each side). Regardless of font and screen size, a bubble must not be so tall that it extends beyond the bottom limit.

Bubbles feature an icon, and/or some text or a gauge. All text elements should have a drop shadow of #000000 color and 0.125 em spread.

notification-bubble-layout-internal-1.png

Icon

Any icon should be scaled so that its largest dimension is 3 ems, while retaining the icon’s original aspect ratio. This means that vector and bitmap icons should be simple, without fine detail or thin strokes, and all icons should be square or nearly square whenever possible. If the icon is a bitmap, Sinc/Lanczos scaling should be used to minimize jagginess.

eject.jpg

If the bubble has no text, the icon should be horizontally centered within the window. Otherwise, the icon should be horizontally and vertically centered within a 3-em square that is flush with the leading side, with 1 em margin to the trailing side.

Icons representing alerts, warnings or errors should use an x or ? symbol with smooth gradient ranging from light red (#ff6363) at the top to dark red (#cc0000) at the bottom. Other than that, all icons and gauges should use one color theme: a smooth gradient ranging from light gray (#ececec) at the top to medium gray (#9b9b9b) at the bottom. Every icon should also use a black 2px outline with 30% opacity. There should also be a 1px white highlight with 40% opacity on the top and left edges to improve the definition. Different opacity values of this scheme (excluding the black outline) are allowed, for example to depict an inactive/disabled state or different levels of intensity (e.g. brightness). All icons and gauges should use gently rounded corners with the recommended roundness of 0.1 em radius and the roundness should not exceed 0.25 em radius.

notify-osd-default-icon-set.png

This set is subject to change.

Text layout

If there is text, it consists of a title and/or a body. Both of these should use the standard application typeface, aligned to the leading side, and should wrap to multiple lines if necessary. If a word is wider than the line, it should wrap following usual Pango rules for the current interface language.

Both title and body text should appear to the trailing side of the icon. If there is no body text, the title text should be vertically centered with the center of the icon. If there is body text, the title text should be top-aligned with the top of the icon, and the body text should begin immediately underneath. This applies even if body text is added to a bubble that previously had only a title: the title text should move from its centered alignment to top alignment as the body text appears.

Title text

The title should be the standard application font size, of color #ffffff, and bold weight.

In the title text, any string of one or more consecutive whitespace characters (U+0020 SPACE, U+0009 CHARACTER TABULATION, U+000A LINE FEED (LF), U+000C FORM FEED (FF), or U+000D CARRIAGE RETURN (CR)), even if a mixture of those, should be treated as a single space. Leading and trailing whitespace should not be presented.

If the title would take up longer than three lines, it should be truncated at just enough characters to fit an ellipsis character “…” at the end of the third line.

Body text

The body should be 0.9 × the standard application font size, of color #eaeaea, standard weight, and should not contain any extra formatting.

In the body text, any string of one or more consecutive whitespace characters that contains at least one newline (U+000D CARRIAGE RETURN (CR), U+000A LINE FEED (LF), or U+000D CARRIAGE RETURN (CR) immediately followed by U+000A LINE FEED (LF)), even if a mixture of those, should be treated as a single newline. Then for each line in the text, any string of one or more consecutive (non-newline) whitespace characters, even if a mixture of them, should be treated as a single space, and leading and trailing whitespace should not be presented.

Gauge

If a notification bubble has a gauge, the gauge should display the old value for 500 ms before switching to the new value for the remainder of the time, as a visual indication of what the change was.

Interaction

notification-mouseout.png notification-mouseover.png

Whenever a pointer moves into a bubble, whatever is behind the bubble should instantly become no longer blurred, and the bubble itself should instead receive a 2-pixel Gaussian blur and reduce to 40% opacity. (The bubble should not blur from the pointer being in the bubble area when it first appears, because you are unlikely to be aware of where the pointer is — it may not even be visible. And once you become aware, it is simple to move out then in again.) When the pointer leaves the bubble, the bubble should instantly return to its normal appearance.

Other than that hover effect, bubbles should not directly respond to input devices in any way.

Outside the bubble

If any windows are open, a bubble should appear on whichever display contains the largest fraction of the area of the focused window at the moment the bubble starts appearing. If no windows are open, a bubble should appear on whichever display the pointer is on at the moment the bubble starts appearing. (Except with MPX, a display has only one pointer. A touch-only display has an invisible pointer, so whenever it is touched it becomes the display that the pointer is on.)

Each display should show up to one confirmation bubble, plus up to one notification bubble, at a time. There should be a gconf key determining which of three positioning schemes are used. In all three schemes, the right edge of any bubble should be 0.5 em from the trailing edge of the display.

  1. A notification bubble should be positioned near the bottom right corner, such that if the bubble grows to its maximum height, it is 0.5em from the bottom of the display (or from the top of any panels at the bottom of the display). A confirmation bubble should use a slot immediately above that notification bubble slot.
  2. The bottom of a confirmation bubble should be 0.25 em above the vertical center of the display. The top of a notification bubble should be 0.25 em below the vertical center of the display. (So if a confirmation bubble and a notification bubble are visible simultaneously, there should 0.5 em gap between them.)
  3. Notification bubbles should use the top right corner: the top of a notification bubble should be 0.5 em from the top of the display (or from the bottom of any panels at the top of the display). Confirmation bubbles should use the bottom right corner: the bottom of a confirmation bubble should be 0.5 em from the bottom of the display (or from the top of any panels at the bottom of the display).

position-options.jpg

Bubble behavior

Animations and durations

Notification bubbles

Confirmation bubbles

Critical

Non-critical

When it appears

After all other pending critical notifications, before all non-critical ones.

After all other pending notification bubbles.

Replaces any earlier confirmation bubble immediately.

How it appears

Fades in over 200 ms if first in a series, or 300 ms if subsequent.

Fades in over 700 ms if first in a series, or 300 ms if subsequent.

Fades in over 100 ms.

Appears if screensaver inhibited

yes

no

yes

Standard duration

10000 ms + 250 ms/(line of body text)

5000 ms + 250 ms/(line of body text)

2000 ms

Extended by input

If between 1000 and 3000 ms there are any modifier keypresses or ≥10 non-modifier keypresses or ≥1 click, extend by 2000 ms. Very difficult to implement.

no

Extended by confirmation bubble appearing

Resets to previous duration, minus 1000 ms. This has no effect because it waits to leave at the same time as the confirmation bubble anyway.

n/a

Visible merging with enough room to show all body text

Over 250 ms, bubble grows initially linearly but decelerates as it reaches its new size; at the same time, if there was no body text previously, the title fades out (because it is about to appear in a new position). Then over another 250 ms (regardless of how much text is involved), the new text fades in; at the same time, the new icon (if any) cross-fades in.

n/a

Visible merging with overflow

Old text displays for bubble’s normal duration. Then over 250 ms (regardless of how much text is involved), text that will no longer appear in its current position scrolls up, with oldest text scrolling off the top and new text scrolling onto the bottom; at the same time, the new icon (if any) cross-fades in.

n/a

Extended by visible merging

+ 500 ms + 250 ms/(line of body text)

n/a

Visible replacement

Over 300 ms, the old contents fade out. Then over another 300 ms, the new contents fade in.

Changes instantly.

Extended by visible replacement

+ 2000 ms + 250 ms/(line of body text)

Resets.

Maximum duration

15000 ms (overriding all the above)

How it disappears

Over 300 ms, fades out.

If a bubble is replaced with one that has the same icon and the same title text, and the new body text is an extension of the old body text, this should not be presented as a normal replacement; instead the bubble should be presented as if the old and new bubbles were being merged.

If a pointer is over the area where a bubble is about to appear, it should appear as normal, ignoring the pointer unless it leaves and then re-enters the area. In all other cases where a pointer is over a bubble, however, the bubble’s duration should pause until the pointer leaves. For example, if a notification bubble has been fully visible for 2000 ms when a pointer enters, it should switch to its mouseover appearance until the pointer leaves, then switch back to its normal appearance and display for a further 3000 ms.

If the only bubble on a display is fading out when another bubble would appear below it, the newer bubble must instead wait until the older one has completed fading out.

Sound

If a notification bubble has a sound associated with it, that sound should be played starting from the moment the bubble has finished fading in.

Merging notifications

Notify OSD should merge two notifications into a single notification if all of the following are true:

  • they come from the same program
  • they have the same title, or lack of title
  • they have the same actions, or lack of actions
  • the first is not already open as a fallback alert box
  • the first has not already been displayed as a bubble for so long that merging the second into it would cause the newly-calculated duration to be greater than the maximum duration

  • both of them have indicated that they allow merging
  • the second notification is not specified as a replacement of any other notification.

When merging notifications, the icon and sound (if any) of the latter notification should be used. The body text of the latter should be appended to the body text of the former, with a line break inserted between them if there was none already. For example, if the notification in queue position 4 has title “andrew_p” and body text “Hey Coral”, while the notification in queue position 7 has the same icon and title “andrew_p” and body text “Are you still in Oregon?”, then the body text of the notification at position 4 should be changed to
  Hey Coral
  Are you still in Oregon?
and the notification at position 7 should be deleted from the queue.

If the earlier bubble is already being displayed and not yet in the process of fading out, the bubble contents should be changed as described above.

Overflow of long messages

notification-text-overflow.jpg

If a bubble’s body text — either initial, or after merging — would take up more than ten lines inside the bubble, the body text should be presented as:

  1. the first line of text;
  2. an ellipsis (…) on a line by itself;
  3. the last eight lines of text.

The transition from the non-overflow presentation to the overflow presentation, i.e. the arrival of an eleventh line of text, should be:

  • the first line should stay where it is;
  • the second line should cross-fade into the ellipsis that replaces it;
  • the third line should scroll up into oblivion, with following lines (including the new eleventh line) following the third line upward.

Flood prevention

A notification should be discarded from the queue if there are more than 50 notifications ahead of it in the queue.

Furthermore, a notification should be discarded from the queue if, after any merging, there are more than ten notifications from the same program (as identified by its D-Bus ID) before it in the queue.

“Do not disturb” mode

Applications should be able to send a signal to gnome-session — in the same way that they can currently inhibit logout, account switching, suspending, or screensaver — to inhibit non-critical notifications.

<doc:item>
  <doc:term>16</doc:term>
  <doc:definition>Inhibit non-critical notifications.</doc:definition>
</doc:item>

As a trial during Lucid, whenever an application inhibits notifications, Notify OSD should display a notification: “Further notifications have been disabled.”

Whenever non-critical notifications are being inhibited, they should be queued as normal, so that (subject to flood prevention) they can be displayed when the inhibition ends.

Fallback alert boxes

For cases where applications have expected the notification system to allow interactivity without checking whether it actually does, and cases where applications have expected the notification system to display a notification indefinitely, Notify OSD should show an alert box as a fallback. The alert box should appear centered on whichever display the first pointer is on at the moment it is due to appear. Because they require a response but should not block the queue, multiple alert boxes may be open at once.

An alert has custom text and buttons. The title of the alert should be the name of the process that is invoking the notification. The icon should always be the Warning /!\ dialog-warning icon. The text should be presented uniformly in the standard application font size.

fallback-alert.jpg

The first button should be positioned in the bottom right corner of the alert. Immediately to its leading side should be a “Cancel” button that has no action. Any other buttons should be positioned from leading side to trailing side, starting at the bottom leading corner of the alert. None of the buttons should be set as the default (because the system can’t detect that any of them are safe as a default).

Activating any button should close the alert, and then perform the associated action if any.

Logging notifications

For debugging and anorak purposes, each notification (but not each confirmation bubble) should be logged in the file “$HOME/.cache/notify-osd.log” (bug 332950). The log should take this form:

[timestamp, process-name] title
body
body
body

[timestamp, process-name, appended] title
body
body
body

[timestamp, process-name, replaced] title
body
body
body

The timestamp should be in the format defined by RFC 3339.

The log should be cleared whenever you log out or log in.

(Note: logging to this file is enabled when the LOG environment variable is set to 1.)

Critical and non-critical queues and do-not-disturb mode

Every notification, whether it is to be presented as a bubble or as a fallback alert box, should be treated as if it is in one of two queues: critical or non-critical. All pending critical notifications should appear before any pending non-critical notification bubbles appear; and within each queue, notifications should appear in chronological order. (This means, for example, that a fallback alert box should not appear until earlier notification bubbles have finished displaying. This prevents a later interactive notification from appearing inappropriately before an earlier non-interactive one from the same program.)

Whenever a program is inhibiting the screensaver, Notify OSD should be in do-not-disturb mode. While in this mode:

  • All notifications should be logged as normal.

  • Critical notifications, and all confirmation bubbles, should appear as normal.

  • Any non-critical notification bubble that was already being displayed, at the moment Notify OSD entered do-not-disturb mode, should remain for its scheduled duration.
  • Normal processing of the non-critical notification queue should stop, so that no further notification bubbles appear.
  • Once it has been in the queue for 30 seconds, any non-critical notification that would be rendered as a fallback alert box should (for compatibility) appear as normal, except that it should open explicitly unfocused and in the background.

  • Once it has been in the queue for 30 seconds, any non-critical notification that would be rendered as a bubble should be discarded from the queue and never displayed.

When Notify OSD leaves do-not-disturb mode, normal processing of the non-critical notification queue should resume.

Treatment of the Desktop Notifications Specification 1.1

Notify OSD should function as an implementation of the Desktop Notifications Specification 1.1, as follows.

org.freedesktop.Notifications.GetCapabilities

The system should return the capabilities {"body", "body-markup", "icon-static", "x-canonical-append", "x-canonical-truncation"}. (For why it should return "body-markup", see “Sanitizing body text”.)

org.freedesktop.Notifications.Notify

If actions is supplied and/or expire_timeout is set to “0”, the notification should be presented as a fallback alert box:

  • If body is not supplied, summary should be used as the text of the alert.

  • If body is supplied, the system should sanitize it, concatenate it with the summary with a blank line between them, and use the combination as the text of the alert.

  • The default action should be given the label “OK”, and used as the first button for the alert. This action should be supplied regardless of whether the application requests it, because notification-daemon sends it even if it was not declared, and some applications rely on that behavior.

  • Any other actions should be supplied as buttons for the alert.

    fallback-alert-mixed.jpg

  • All hints, and all other parameters (including replaces_id), should be ignored.

In all other cases, the notification should be presented as a bubble:

  • If the hint “x-canonical-private-synchronous” is supplied, it should be treated as a confirmation bubble; otherwise, it should be treated as a notification bubble.

  • If replaces_id is supplied, and it matches a bubble that is currently visible, it should be presented as a replacement of that existing bubble. If the matching bubble is in the queue and not yet visible, the new bubble should take the old bubble’s place in the queue.

  • If app_icon is supplied, and it is a valid icon, the notification bubble should use that as its icon. Otherwise, if the icon_data hint is set, the notification bubble should use that as its icon. (The reference to “image_data” in the Desktop Notifications Specification is an error.)

  • If the hint “x-canonical-private-icon-only” is supplied, the bubble should use the icon-only layout. Otherwise:

    • The system should assume summary to be raw plain text, and use it as the title text of the bubble.

    • If body is supplied, the system should sanitize it, and then use it as the body text of the bubble.

    • If the hint “x-canonical-append” is supplied with a string value “allowed”, and replaces_id is not specified, the bubble should be treated as if it allows merging.

  • If the hint “sound-themed” is supplied with a string value that is a valid sound name, that sound should be associated with that notification bubble.

  • If the hint “urgency” is supplied with a value of 2 (and the hint “x-canonical-private-synchronous” is not supplied), the bubble should be in the critical queue. Otherwise, it should be in the non-critical queue.

  • All other hints, and all other parameters (including expire_timeout) should be ignored.

Sanitizing body text

The Desktop Notification Specification states that “Body text may contain markup. The markup is XML-based, and consists of a small subset of HTML along with a few additional tags … Notification servers that do not support these tags should filter them out.”

Unfortunately, the specification does not state explicitly whether body text may contain markup if the server does not return the capability “body-markup”. And even if that was not allowed, notification-daemon supports markup, so many programs use it without first checking whether the server supports it. The specification also does not specify how clients should transmit < or > characters that are not intended to be interpreted as HTML tags. And if this is supposed to be done using character references, the specification also does not specify whether character references should be recognized for all characters, or just for <, >, and &. This leaves us in a situation similar to RSS 2.0: “Here’s something that might be HTML. Or maybe not. I can’t tell you, and you can’t guess.”

Meanwhile, notification-daemon uses Pango markup directly, which means it interprets not only the markup defined in the Desktop Notification Specification, but also the extra elements and attributes recognized by Pango.

Because it would be extremely difficult to find and fix all programs that use markup without checking (much more difficult than finding and fixing those that use actions without checking), Notify OSD must instead accept markup and ignore it. This in turn means that it must advertise that it accepts markup ("body-markup") — even though this markup has no effect on the bubble text — so that clients can deduce that they need to escape non-markup <, >, and & characters.

To provide a reasonable amount of compatibility until the Desktop Notification Specification is revised to be more precise, Notify OSD should try to guess whether < > and & characters are being used as plain text or HTML, as follows:

  1. If the text contains a < character that is immediately followed by a letter or by a / character, and a > character occurs later in the string, the sequence from that < character to the soonest-following > character inclusive should be treated as an HTML tag and removed. Repeat for all such remaining sequences. All other < and > characters should be assumed to be literal. Then:

  2. If the text contains a “&” character, and a “;” character occurs later in the string, the sequence from that “&” character to the soonest-following “;” character should be presented as follows:

    String

    Presented as

    &amp;

    &

    &#38;

    &

    &#x26;

    &

    &lt;

    <

    &#60;

    <

    &#x3C;

    <

    &#x3c;

    <

    &gt;

    >

    &#62;

    >

    &#x3E;

    >

    &#x3e;

    >

    &apos;

    '

    &quot;

    "

    anything else

    unaltered

    Repeat for all such remaining sequences. All other & characters should be assumed to be literal.

This Desktop-Notification-Specification-specific sanitizing should happen before the normal whitespace filtering for body text.

Applications should be highly encouraged to escape “<”, “>”, and “&” characters (e.g. as “&lt;”, “gt;”, and “&amp;” respectively) in text they receive from external sources (such as instant messages or song metadata).

org.freedesktop.Notifications.CloseNotification

The relevant notification should disappear immediately, without fading out.

org.freedesktop.Notifications.GetServerInformation

The system should return out_name = “Notify OSD”, out_vendor = “Canonical Ltd”, out_version = “1.0”, and out_spec_ver = “0.9”.

org.freedesktop.Notifications.NotificationClosed

Should be implemented as specified.

org.freedesktop.Notifications.ActionInvoked

This signal should never be emitted.

Treatment of the KNotification API

Notify OSD should function as an implementation of the KNotification class (but not the previous KNotify class).

The API should let applications know whether the notification system allows actions.

Treatment of hotkeys

Volume changes

Now covered in the Sound specification.

Brightness and backlight changes

brightness.jpg

When you change the display’s or keyboard backlight’s brightness using keyboard hotkeys, the change in brightness should be shown in a confirmation bubble with a gauge. To make clearer which key was pressed, if the bubble was not already open, the gauge should show the old value for half a second before switching to the new value. If you press the reduce-brightness key when the volume is already at zero, or the increase-brightness key when the volume is already at maximum, the icon and gauge should flash.

Visually, the bubble should not contain any text. But for accessibility purposes, the bubble should expose title text of the form “Brightness: 60 percent” or “Backlight brightness: 20 percent”, as appropriate.

Disc ejection

eject.jpg

When you press the EJECT_KEY, a confirmation bubble should appear containing only the eject icon. Implementation: Issue a notification using the “x-canonical-private-icon-only” and “x-canonical-private-synchronous” hints.

Visually, the bubble should not contain any text. But for accessibility purposes, the bubble should expose the title text “Eject”.

Play, Pause, Stop, Previous, and Next

When you press the PLAY_KEY, PAUSE_KEY, STOP_KEY, PREVIOUS_KEY, or NEXT_KEY, a confirmation bubble should appear containing only the icon for that function. Implementation: Issue a notification using the “x-canonical-private-icon-only” and “x-canonical-private-synchronous” hints.

Visually, the bubble should not contain any text. But for accessibility purposes, the bubble should expose the title text “Play”, “Pause”, “Stop”, “Previous”, or “Next” as appropriate.

Treatment of hardware device detection

device-connected.jpg

When a device is connected, a confirmation bubble should appear immediately, with a generic USB, Firewire, or miscellaneous (e.g. eSATA) device icon, title text “Device connected”, and no body text.

A further confirmation bubble should not appear when the device is fully identified.

Architecture

Relationships with external modules: (SVG source)

NotificationSystemCommunication.png

(See also a detailed description of components involved in hardware hotkeys.)

Overview of internal modules: (SVG source)

NotificationSystemLayers.png

Details of the visual layer: (SVG source)

NotificationManager-Design-2.png

Compatibility fixes accepted upstream

Ubuntu and upstream developers have made fixes to several programs to make their notifications compatible with Notify OSD and the Desktop Notifications Specification. For designs of fixes that are now incorporated into the upstream projects, see PreviousCompatibilityFixes.

Compatibility fixes still to be maintained

Other compatibility fixes have not yet been implemented, or have been implemented in Ubuntu packages but not yet merged upstream. These fixes are listed in this specification, alphabetically by package name, to assist in regression testing.

If you’re the application developer or someone who can patch one of these programs, see NotificationDevelopmentGuidelines for guidelines and code samples.

Once a fix has been accepted upstream, please move its specification from this document to PreviousCompatibilityFixes.

amsn

  • When someone sends you an instant message while you are online, a notification bubble appears that, when clicked, displays the message. The button should be made conditional on whether the notification server supports actions.

  • When someone sends you an instant message while you are offline, a notification bubble appears that, when clicked, opens the login page for your Hotmail in a Web browser. What’s the text?

apport

  • When a system process crashes, an icon appears in the panel, and a “Crash report detected” bubble appears with the text “An application has crashed on your system (now or in the past). Click on the notification icon to display details.” The icon and bubble should not appear; instead an alert should appear unfocused.

    Implementation: update-notifier src/crash.c

banshee

  • When a connection to Last.fm fails, a notification bubble appears with “Account Settings” and “Join Last.fm” buttons. This should be converted to an error alert box with the same wording and buttons.

bluez-gnome

bluez-pairing-before.png

  • When from a Bluetooth device you try to connect to the computer, a “Bluetooth Device” bubble appears with the text “Pairing request for device name” and an “Enter PIN code” button that, when clicked, opens an authentication alert for entering the PIN. Instead, the authentication alert should open unfocused directly, and request attention.

  • A bubble apparently appears when sending a file from a device to the computer, but this cannot be reproduced currently.

bzr-gtk

  • When a merge or pull is complete, a notification bubble appears that never expires and contains an “Inspect” button that opens a visualizer and a “Branch” button that shows the branch in Nautilus. Instead, the main Olive window should request attention when a merge or pull is complete, and the “Inspect” and “Branch” actions should be available from that main window.

debian-bts-applet

  • When a bug report you’re interested in changes, a “Bug #%d's %s changed” notification bubble appears containing “More info” and “Hide” buttons, where the “More info” button opens the bug report in a Web browser. Instead …

decibel-audio-player

  • When a new track starts playing, a notification bubble appears giving the song details, and containing a “Skip track” button. The button should be made conditional on whether the notification server supports actions.

Launchpad #328609

emesene

  • When a new message arrives, a notification bubble appears that, when clicked, reveals the message. Instead, emesene should integrate with the messaging menu. (Bug 345660 proposes instead making the action conditional on whether the notification server accepts actions.)

empathy

When you receive a message from someone:

  • The message should always appear in the MessagingMenu, if it is being used. (The “Use messaging indicators” preference is neither understandable nor useful, and should be abolished.)

  • If the chat window for that person is not open, it should always open, unfocused and in the background. (See for example the ''Ars Technica'' review of Ubuntu 9.10.)

  • Depending on your preferences, a notification bubble should also appear containing the text of the message.

No notification bubble should be added or changed because someone is typing.

evolution

  • When the “Mail Notification” plug-in is turned on and new messages arrive, Evolution puts up a "New email" notification bubble which, when clicked, hides the notification area icon. This should be replaced by the messaging menu.

Launchpad #331571

firefox

firefox-current.png

Firefox uses custom notification boxes that do one thing when clicked. We are working with Mozilla on ways to present these without using a custom notification system.

  • When all current downloads have completed, Firefox displays a “Downloads Complete” notification box containing an “All files have finished downloading” link that opens and focuses the Downloads window.
    1. Our recommended replacement behavior is for the Downloads window to open unfocused if it is not open already, scroll to the bottom of its list (if it is not scrolled to the bottom already), and request attention.

    2. Alternatively, Firefox could have no special notification of completed downloads at all (just as Safari and Opera do not, for example).
    3. A last resort would be to continue showing the sliding XUL notification used in Firefox 3.0.
  • When add-on updates are available, Firefox displays a notification box containing a link that opens the Add-ons window. Instead, we recommend that the Add-ons window open in the background, with the new updates being advertised in a banner the same style as the existing “1 new add-on has been installed” banner.

* An experimental plugin for integrating Firefox with libnotify can be downloaded from here https://addons.mozilla.org/en-US/firefox/addon/9622 or as an Ubuntu Package from here http://packages.ubuntu.com/karmic/firefox-notify (karmic)

gajim

  • When a new message arrives while gajim is in the background, a notification bubble appears that, when clicked, brings the relevant window to the front. The action should be made conditional on whether the notification server supports actions.

Giver

gmail-notify

  • When a new mail is received, a notification square appears in the bottom-right corner informing about it. If you click on it your inbox is shown in the web browser. When the user clicks on the panel indicator, the same square appears informing whether the inbox is empty or there are new messages. gmail-notify should instead be integrated with the messaging menu.

gnome-disk-utility

gnome-mount-unmounting.png

  • When the process of unmounting a volume is taking more than a few seconds (because previously cached data is being written to it first), gnome-mount puts up a persistent notification warning you not to “remove the media or disconnect the drive”. (What does gnome-disk-utility do currently?)

    Instead, gnome-disk-utility should open a progress window frontmost (bug 332600, bug 325315):

    unmount-progress.jpg
    The title and icon for the progress window should be the name and icon for the volume.

    The other text should vary depending on whether the volume is to be ejected or disconnected (as determined by whether hal regards it as “removable” or “hotpluggable”).

    Removable volume

    Hotpluggable volume

    Primary text while unmounting (standard application font)

    Finishing up…

    Finishing up…

    Secondary text while unmounting (Pango <small>)

    To prevent data loss, wait until this has finished before ejecting.

    To prevent data loss, wait until this has finished before disconnecting.

    Primary text after unmounting (standard application font)

    It’s now safe to eject “Name Of Volume”.

    It’s now safe to disconnect “Name Of Volume”.

    The window should not change size when it switches to showing the post-unmount information. Once the window has shown the post-unmount information for four seconds, it should close automatically.

gnome-power-manager

Gnome Power Manager puts up interactive notifications in many situations (bug 329296).

Five of these are unusual and important and should be acknowledged, so they should be presented as alert boxes instead:

  • “Battery may be recalled”, with text “The battery in your computer may have been recalled by %s and you may be at risk. For more information visit the %s battery recall website.”, and buttons labelled “Visit recall website” and “Do not show me this again".
  • “Battery may be broken”, with text “Your battery has a very low capacity (%i%%), which means that it may be old or broken.” and a button "Do not show me this again". (This will fix bug 155191 (Battery Broken message cut off).)

  • “UPS Discharging”, with text "The AC power has been unplugged. The system is now using backup power." and a button "Do not show me this again".
  • “Sleep Problem”, with text “Your computer failed to hibernate. Check the help file for common problems.” or “Your computer failed to suspend. Check the help file for common problems.” and containing a "Do not show me this again" button and a “Visit quirk website” button.

  • “Power Critically Low”, with text “You have approximately X minutes of remaining battery life (Y%). Plug in your AC Adapter to avoid losing data.”, or “The battery is below the critical level and this computer will power-off when the battery becomes completely empty.”.

Implementation: Tweak gpm-notify.c so that it uses the #else versions of the #ifdef HAVE_LIBNOTIFY functions. The design of these alerts could be improved, but we should not spend time on this now, because the code will soon be replaced by DeviceKit-power. Once DeviceKit-power is being used, the “Power Critically Low” alert should be reimplemented as a morphing alert box.

Two others should put up neither a notification bubble nor an alert, so their bubbles should be removed:

  • “Sleep warning”, “Your laptop will not sleep if you shut the lid as a running program has prevented this. Some laptops can overheat if they do not sleep when the lid is closed.”
  • “Battery Charged”, “Your laptop battery is now fully charged”.

And one should be changed to be more useful (bug 399492):

  • “Battery Discharging”, “The AC power has been unplugged. The system is now using battery power.” should be changed to “Running on battery”, “2 hours 15 minutes remaining”, with the appropriate battery icon for the current charge level.

gnome-screensaver

while-you-were-out.jpg

  • The screensaver’s “Leave a Message” function uses a persistent notification bubble to present the messages (bug 333269). Instead, all messages left during a single session should be presented in a scrolling text view in a single “While You Were Out” dialog in the center of the screen, with an “OK” button that clears the message list and closes the dialog.

gnome-settings-daemon

  • Brightness and volume changes should be shown as confirmation bubbles instead of the existing overlays (bug 333997).

  • New in Gnome 2.26, gnome-settings daemon warns about low disk space in a “Low Disk Space” critical notification bubble with text “%d%% of the disk space on %s' is in use”). If Disk Usage Analyzer (baobab`) is installed, the bubble contains an “Analyze” button that opens Disk Usage Analyzer. Instead, this should be an alert box (bug 337441):

    low-disk-partition.jpg low-disk-examine.jpg

    (This is a starting point for a smarter low disk space warning.)

  • When “Accessibility features can be toggled with keyboard shortcuts” is on, holding down the Shift key for 8 seconds uses a notification bubble to prompt to activate/deactivate Slow Keys, and pressing Shift five times consecutively uses a notification bubble to prompt to activate/deactivate Sticky Keys. Instead these should open alert boxes (bug 342567), frontmost because they are in direct response to user input:

    slow-keys-activate-after.jpgslow-keys-deactivate-after.jpg sticky-keys-activate-after.jpgsticky-keys-deactivate-after.jpg

    Take care that the secondary text varies between the activate and deactivate cases, as shown in these mockups.

    The previous bubble for deactivating Sticky Keys began by saying “You just pressed two keys at once, or pressed the Shift key five times in a row.” This sentence is dropped from the alert box design, because it is lame for the computer to feign ignorance about which of those two things happened. Alternatively, the primary text should correctly begin with either the sentence “You pressed two keys at once.”, or the sentence “You pressed the Shift key five times in a row.”.

    In all four alerts, the “Settings…” button should open and focus the “Accessibility” tab of the “Keyboard Preferences” window, and close the alert.

gnome-user-share

  • When you have received a file over a Bluetooth connection, a notification bubble appears, with “Open File” and “Reveal File” buttons. Instead, an alert box should appear unconditionally, unfocused and in the background — using the icon of the actual file, and with “Open” and “Reveal” buttons next to the default “OK” button (bug 337352).

    (A more sophisticated design, to better handle multiple incoming files, would be a “Received Files” window — listing all recently-received files, with options to open or reveal any of them at your leisure. The window could request attention whenever a file transfer completes.)

gnoemoe

  • When you receive a message, a notification bubble appears that, when clicked, focuses the application. This program appears to be unmaintained and unused, so probably can be ignored.

goobox

  • When a music track starts playing, a notification bubble appears containing “Next” and “Stop” buttons. The button should be made conditional on whether the notification server supports actions. Launchpad #327714

gossip

  • When a contact comes online, a notification bubble appears containing a “Chat” button, though clicking anywhere else in the bubble does the same as clicking the button. The actions should be made conditional on whether the notification server advertises that it accepts actions.

  • When someone adds you to their buddy list, a notification bubble appears that, when clicked, opens the subscription request dialog. Instead, the subscription request dialog should open directly, unfocused and in the background.

  • When a new message arrives, a notification bubble appears containing a “Show” button, though clicking anywhere else in the bubble does the same as clicking the button. The actions should be made conditional on whether the notification server advertises that it accepts actions.

#328613

gshutdown

  • gshutdown produces a notification bubble warning you of impending shutdown, and containing a button “Show Main Window”. Instead …

kerneloops

  • When there is a kernel oops, a notification bubble appears asking if you want to send the error to the Kernel Oops Web site, containing five buttons: “Always”, “Yes”, “No”, or “Never”, and “Details”. Instead, this should be an alert box with four buttons, and an expandable section to show the error log (bug 344377).

    Before

    After

    kerneloops-before.jpg

    kerneloops-after.jpg

  • When the error report is successfully submitted, a notification bubble appears saying that “You can view your submitted oops here”, where “here” is a link in notification servers that accept hyperlinks (bug 347984). Instead, when “Always” or “Yes” is clicked in the initial alert, it should not disappear; rather it should smoothly resize vertically and become a progress window with an indeterminate progress bar. When the process is complete, the progress window should in turn morph into an alert notifying you that the report is complete and giving you the opportunity to view the report.

    Before

    After

    kerneloops-reported-before.png

    kerneloops-sending.jpg
    kerneloops-complete.jpg

    Even better would be for the progress window to use a determinate progress bar rather than an indeterminate one, and to include a “Cancel” button.

    kerneloops-sending-determinate.jpg

kopete

  • When a contact wants to add you to his contact list, a bubble application with the actions “Add”, “Authorize”, “Block”, and “Info...”. Instead, if the notification system does not allow actions, this should be shown as a dialog.
  • On connection errors, a bubble appears. This bubble may contain a “More Information...” button which shows a message box with a more detailed error message. Instead, a placard should appear inside the main Kopete window giving a summary of the error, with a “Details” button to show the message box. If the main Kopete window is not open at the time, a notification with no actions should also be sent.
  • When a chat message arrives, a bubble appears with “View” and “Ignore” buttons. The buttons should be made conditional on whether the notification system allows actions, and Kopete should be integrated with the MessagingMenu.

kpackagekit

  • When a distribution upgrade is detected, a bubble appears with a “Start upgrade now” button. Instead, a placard — with the text “A new version of Kubuntu is available”, and an “Upgrade” button — should appear near the top of the updates window whenever it is open for any other reason (as it does in Update Manager).
  • When updates are available, a bubble appears with the actions “Review and update”, “Not now”, and “Do not ask again”. Instead, the window that lists the updates should periodically open automatically, like Update Manager does (see SoftwareUpdateHandling), with an option in KPackageKit’s “Settings” pane for controlling how often you are prompted about updates.

  • In case of error, a bubble appears with the actions “Details” and “Ignore”, where “Details” opens an error alert. Instead, the error alert should open directly.
  • If an update requires restarting the system, a bubble appears with actions “Restart” and “Not now”. Instead, this should be shown as a standard alert box with “Restart” and “Not Now” buttons.
  • If an update requires restarting the session, a bubble appears with actions “Logout” and “Not now”. Instead, this should be shown as a standard alert box with “Log Out” and “Not Now” buttons.

kwalletmanager

  • When an application is in the background and asks to open the wallet because it requests a password, kwallet shows a bubble to tell the user about this. The bubble contains two buttons: “Switch to <application>” and “Ignore”. Instead, the application’s window should just use the standard mechanism for requesting attention.

liferea

  • Liferea has a “Show a popup window with new headlines.” option that is on by default. As a result, when updating feeds, Liferea puts up a flood of notification bubbles with “Open Feed”, “Mark all as read”, and “Show details” buttons. These are annoying and unusable unless you are subscribed to very few feeds, but the presence of the option makes it difficult to remove. Instead, the buttons should be made conditional on whether the notification server supports actions.

Launchpad #328606

network-manager

Because Network Manager is a high-profile user of notification bubbles, it should be adjusted not just for compatibility with Notify OSD, but also to make its bubbles more elegant regardless of which notification system is in use.

  • When you are not connected but wireless networks are available, a “Wireless Networks Available” bubble appears, with text “Click on this icon to connect to a wireless network” and a "Don't show this message again" button. This bubble should be removed. Instead, the network manager icon should flash with a glow effect five times over five seconds. This clashes with the proposed appearance for when wireless is actually connecting.

  • When the computer is connecting to a wireless network, the wireless Network Manager icon should appear in offline state but with its base blinking on and off. No notification bubble should appear.

wireless-connected.jpg

  • Once you are connected to a wireless network, a notification bubble should appear with the connected wireless icon, title the name of the wireless network, and body “Connection established”. (Launchpad #330526)

  • When connection to a wireless network fails for a reason other than incorrect authentication, a notification bubble should appear with disconnected icon, title the name of the wireless network, and body “Connection failed”.
  • When the computer is disconnected from a wireless network via software, a notification bubble should appear with disconnected icon, title the name of the wireless network, and body “Disconnected”. If this disconnection leaves you with no active network connections, the body text should end with “- you are now offline”, and the bubble should use an urgency of 2 so as to be treated as critical. (This is so that, for example, you will be notified of losing connection promptly while playing an online game).

  • When the computer is disconnected from a wireless network via hardware switch, a notification bubble should appear with wireless-disabled icon, title “Wi-fi switched off”, and no body.
  • When the computer is connecting to a wired network, the wired Network Manager icon should appear in offline state but with its base blinking on and off. No notification bubble should appear.
  • Once you are connected to a wired network, a notification bubble should appear with the connected wired icon, title “Wired network”, and body “Connection established”. (Launchpad #330571)

  • When connection to a wired network fails, a notification bubble should appear with disconnected icon, title “Wired network”, and body “Connection failed”.
  • When the computer is disconnected from a wired network via software, a notification bubble should appear with disconnected icon, title “Wired network”, and body “Disconnected”. If this disconnection leaves you with no active network connections, the body text should end with “- you are now offline”, and the bubble should use an urgency of 2 so as to be treated as critical.

3g-detected.png

  • When a mobile broadband card is inserted or a 3G phone is connected in network mode, a “New Mobile Broadband Device Detected” bubble appears with text “Model Name: - Click here to configure the device…” and a “Configure” button. Clicking the button or anywhere else in the bubble, opens a setup assistant. Instead, the setup assistant should open unfocused directly (bug 327427).

3g-finished.png

  • When mobile broadband configuration is complete, a “New Configuration Created” bubble appears with text “You can activate the connection by clicking this icon. Use connection editor to add new and to change settings if necessary” [sic]. This bubble has no actions, but has the problem that it refers to “this icon”. Instead, “Connect immediately when setup is complete” should be a checkbox horizontally centered at the bottom of the “Summary” page of the setup assistant.
  • When the computer is connecting to a mobile broadband network, the mobile broadband NetworkManager icon should appear in connecting state. No notification bubble should appear.

  • Once you are connected to a mobile broadband network, a notification bubble should appear with the relevant network type icon, title the name of the mobile network, and body “Connection established”. (Launchpad #330608)

  • When connection to a mobile broadband network fails, a notification bubble should appear with disconnected icon, title the name of the mobile broadband network, and body “Connection failed”.
  • When the computer is disconnected from a mobile broadband network via software, a notification bubble should appear with disconnected icon, title the name of the mobile broadband network, and body “Disconnected”. If this disconnection leaves you with no active network connections, the body text should end with “- you are now offline”, and the bubble should use an urgency of 2 so as to be treated as critical.

ontv

  • When a new program matching your criteria is detected, a notification bubble appears that, when clicked, opens a dialog with more details of the program. Instead …

openoffice.org-impress

Impress should have a checkmark item in its “Slide Show” menu for whether non-critical notifications are suppressed during a slide show.

impress-before.png

impress-after.jpg

packagekit-gnome

?

pidgin

pidgin-libnotify-capture.png

  • When a buddy signs on, or a message is received, the pidgin-libnotify plug-in shows a notification bubble containing a “Show” button, which in both cases opens the chat window for that person. Both of these buttons should be made conditional on whether the notification server advertises that it accepts actions. Implementation: an if block around the line notify_notification_add_action (notification, "show", _("Show"), action_cb, NULL, NULL);

In addition, Pidgin should be integrated with the messaging menu.

powerdevil

  • When powerdevil is about to suspend or shut down the machine because battery level is critical, it shows a bubble to notify the user. The bubble contains a “Cancel” button to prevent powerdevil from continuing. As with gnome-power-manager, this should be shown as a dialog instead.

quassel

  • When an highlighted message arrives, a notification bubble appears with a “View” button that brings the application to front and switch to the correct tab. The “View” button should be made conditional on whether the notification system allows actions, chat windows containing new messages should request attention in the standard way, and Quassel should be integrated with the MessagingMenu.

software-sources

The “Updates” settings in Software Sources should be modified to reflect the automatic-opening behavior.

specto

  • When something being monitored changes, a notification bubble appears that, when clicked, opens the file/application/URI being monitored. Instead …

specto is fixed in 0.3 development branch http://code.google.com/p/specto/issues/detail?id=215

system-config-printer

  • When a printer is added successfully using a matching printer driver, a “Printer added” notification bubble appears containing the text “`%s' is ready for printing.” and a “Configure” button. Instead, the Properties window for that printer should open unfocused directly.

  • When a printer is added successfully using a non-matching printer driver, a “Printer added” notification bubble appears containing the text “%s' has been added, using the %s' driver.” and a “Find driver” button. (system-config-printer 1.1 will also include a “Print test page” button.) Instead, the Properties window for that printer should open unfocused.

  • When you try to view jobs on a printer that requires authentication, an “Authentication required” notification bubble appears containing the text “Job requires authentication to proceed” and an “Authenticate” button that brings up an alert box saying “Authentication required for printing document `%s' (job %d)”. The notification bubble should be abolished, and the alert box should be invoked directly instead.
  • When a print job gets stuck for some reason (for example, when a printer is out of paper), a notification bubble appears containing text “There was a problem processing the document” or similar, containing no buttons but staying open until it is clicked. This should be converted to an error alert box with an “OK” button (bug 343904).

https://bugs.edge.launchpad.net/ubuntu/+source/system-config-printer/+bug/328604 - patch submitted

system-install-packages

  • When you add a new printer and drivers or packages are missing, a critical “Install printer driver” notification bubble appears with the text “`%s' requires driver installation: %s.” and an “Install” button. This bubble should be converted into an alert box with “Cancel” and “Install” buttons.

thunderbird

  • Thunderbird’s “General” Preferences contain an option to “Show an alert” when new messages arrive. A secondary dialog lets you customize the alert to include “Message Preview Text”, “Subject”, and/or “Sender”.
  • Thunderbird third-party extensions updates may also use notifications.
  • An example implementation of tray notifications can be seen by installing the MozTrayBiff extension or, closer to Gnome, the mail-notification package.

  • An experimental plugin for integrating Thunderbird with libnotify can be downloaded from here https://launchpad.net/libnotify-mozilla

  • Another effort is available here: http://ubuntuforums.org/showthread.php?p=7095038

timer-applet

  • When a timer expires, a notification bubble appears that, when closed, sets another timer to be displayed 60 seconds later. Does the bubble contain any buttons? Instead …

totem

In its “Display” preferences, Totem should have a checkbox for whether full-screen movies suppress non-urgent notifications.

totem-preferences-before.png

totem-preferences-after.jpg

tracker

(bug 350415)

  • When Tracker indexing fails, a notification appears...

tracker-before.png

  • When indexing is about to begin, a notification appears with the title “Tracker” and body text including the sentence “You can pause indexing at any time and configure index settings by right clicking here”, which you can’t. Instead...

vlc

  • When something starts playing, a notification bubble appears naming it, and containing “Previous” and “Next” buttons. The bubble still makes sense without the buttons, so the buttons should be made conditional on whether the notification server supports actions.

Launchpad #328605

zeroinstall

Zero Install uses a notification with a download button when updates are available. Debian/testing has a fixed version - please sync from there. See https://bugs.launchpad.net/ubuntu/+source/zeroinstall-injector/+bug/336317

Orage

  • When an event is due to happen, a notification bubble appears containing “Open” and “Silence” buttons. Instead …

Mail Notification

mail-notification.png

When new mail arrives, Mail Notification notifies you in a variety of ways, some of which are not relevant to or appropriate for Notify OSD (bug 332767):

  • It has a setting for whether “message popups” should be “Attached to the status icon” or “In the popup stack”. Notify OSD treats these identically, so when Notify OSD is being used, these settings should not be visible. (Currently, the only way to detect whether positioning is available is to use GetServerInformation to specifically include “notification-daemon” or exclude “Notify OSD”.)

  • It has a setting for whether “Expiration” should happen “Desktop default”, “Never”, or “After:” a specified time. With Notify OSD, “Desktop default” and all values of “After:” are treated identically, and “Never” produces an annoying alert box. Therefore, when Notify OSD is being used, Mail Notification notifications should not specify a duration at all, and none of these settings should be visible.

cGmail

(bug 335197)

MeMaker

  • When your avatar is updated, a notification bubble appears notifying you of this, containing an “Undo” button. Instead …

pastebin plasma widget

  • When user drops a text or an image on the widget, it uploads it to pastebin and show a bubble telling the pastebin url has been copied to the clipboard. This bubble also has an “Open Browser” button. Instead, there should be a extender openable from the pastebin applet (like there is for powerdevil), that lists previously pasted items. The list should have columns for “Clipping” (showing an icon representing the clipping type, and the first few words of the text or something like “Image (46 KB)”), “Pasted” (showing the time or date the item was pasted, or “Pasting...” if the paste has not completed), “Copy URL” (an icon-only button, or a spinner if the pasting has not yet completed), and “Open” (an icon-only button for opening the URL in a browser, or a blank space if the pasting has not yet completed).

Lancelot

"Lancelot is a program launcher menu for KDE 4 designed to provide a place from which all your jobs begin. It provides quick access to applications, places, documents, contacts and system information." -- from the project web site

  • When user enables “usage logging”, a bubble appears to confirm logging is activated. It contains a “Configure” button (it seems broken at the moment). The button should be either removed, or made dependent on whether the notification system allows actions.

Phonon

How you can help: Write here what package this is.

  • When an audio playback device becomes available and has a higher preference than the current playback device, a bubble appears notifying the user Phonon is switching to this new device. This bubble contains a button to revert back to the old device. We haven't seen this ourselves, so we will leave it until we have more information about when and how it happens.

Release notes

  • If you have written programs that use libnotify notification bubbles (such as with ______ or ______), read the Notification compatibility guidelines for advice on how to ensure compatibility with Ubuntu 9.04.

Unresolved issues

  • Put notifications in a text log.
  • Because we have a queue, bringing a chat window to the front should remove from the queue all notifications from that person.
  • From “frustphil”: What if you use the keyboard to focus a control that is underneath a currently-open bubble? For example, Ctrl K to focus Firefox’s search field.

  • Should there be a manual way of entering "do-not-disturb" mode? E.g. by setting IM status (though going online to get fewer notifications could be a bit counter-productive).
  • bug 336950: Notify OSD should expire notifications when app goes off DBus

  • [From djsiegel] Should bubbles be wider by default? That would make longer messages easier to read, but could make confirmation bubbles look a wee bit weird.
  • The Play/Pause/Next/Previous confirmation bubbles are not included in Ubuntu 9.04, because they resulted in either two notifications of an event, or one notification of nothing happening (bug 343261, bug 345363, bug 351986). Should the idea be retired permanently?

  • The constraints of (a) bubbles can expand, (b) two bubbles can be on the screen at once, (c) bubbles may not move, and (d) bubbles may not collide, cannot be satisfied simultaneously.
  • The changes made to update-notifier have spawned a series of serious discussions with multiple bug reports which are combined in #332945.

  • Windows has an API for the "old" behavior of popping up persistent bubbles (with actions). When Wine attempts to properly implement this API, they'll have to make a decision about how to handle applications expecting the old-style persistent bubbles. Unlike distribution packages, these applications can't be changed, and some require the user to interact through their notification bubbles. We need to make sure a user running these Windows apps through Wine doesn't suffer breakages (eg overlapping notifications).
  • If a pointer is left resting where notification bubbles would otherwise appear, perhaps future bubbles should appear in a different place until the pointer moves elsewhere. [Cody Somerville]
  • Some notifications are communications you need to react upon fx. chatmessages. It seems odd that it is not possible to do so via the notification. It like saying "Talk to the hand, because the ear's not listening" (Hand = the program hidden behind other programs; Ear = the notification

NotifyOSD (last edited 2014-04-02 11:35:47 by mpt)