MessagingMenu

Differences between revisions 51 and 52
Revision 51 as of 2010-02-11 17:02:02
Size: 26811
Editor: eth0
Comment: revisions from sabdfl's review
Revision 52 as of 2010-02-11 17:32:53
Size: 27068
Editor: eth0
Comment: fixes alignment
Deletions are marked like this. Additions are marked like this.
Line 3: Line 3:
||<tablestyle="float: right; margin: 0 0 1em 1em;" style="border: none;">{{attachment:messaging-menu-initial.jpg}}{{attachment:messaging-menu-lucid.jpg}}|| ||<tablestyle="float:right;margin:0 0 1em 1em;" style="border:none;vertical-align:top;">{{attachment:messaging-menu-initial.jpg}}||<style="border:none;vertical-align:top;">{{attachment:messaging-menu-lucid.jpg}}||
Line 301: Line 301:
 * Should the number of subitems be limited to prevent abuse? How many? And how should the excess case be displayed?
 * How to distinguish visually between applications that are running and not?

Designed by MarkShuttleworth, specified in detail by MatthewPaulThomas

messaging-menu-initial.jpg

messaging-menu-lucid.jpg

For Ubuntu Lucid, the messaging menu should by default contain a section for each messaging application you have set up. Each section should have an item for the application as a whole (unless it is a default application without an application-wide new-messages count), then any custom commands specified by the application, then any items for individual message sources within that application. An application may provide a new-messages count or a time-since-last-message for each message source as appropriate, or alternatively provide a new-messages count for the application as a whole. Your default mail application, and Ubuntu’s non-mail default messaging applications (Empathy and Gwibber for Lucid), should be placed first in the menu if you are using them. All other application sections should have an item for the application itself, highlighted with a triangle if the application is currently running. Compliant applications should offer an option to hide themselves from the messaging menu altogether. This specification covers the menu itself, as well as desired changes to messaging programs in Ubuntu’s Main and Universe archives.

Canonical Ltd’s Desktop Experience team are developing the messaging menu for Gnome and KDE. The messaging menu is hosted on Launchpad.

Rationale

The messaging menu provides quick access to messages concerning you that you may not have seen. The exact definition of “concerning you” is application-dependent. For example, e-mail programs often let you distinguish between messages that are important enough to notify you about, and messages that are not. Similarly, IRC clients typically let you specify terms that you should be notified about.

User stories

  • Tillie uses a Telstra BigPond e-mail account in Thunderbird. She is subscribed to the AUS-Scottish mailing list, which receives about five messages per month. Any other messages are usually from her nieces and nephews and their children, so receiving one is the highlight of Tillie’s day. When a message arrives she hears the “ding-dong!” from the computer, and stops whatever she’s doing to read it. Her nephew has taught her to look for the “Inbox” item under the envelope menu at the top of the screen.

  • Claude uses Gmail through Prism (with the prism-google-mail package), with cGmail to notify him of new messages. He receives about 80 messages a day, most of which are from mailing lists and get tagged automatically. The new message count appears in the messaging menu, along with status updates from his friends on Identica. He goes through e-mail daily at 9.15 a.m., except for messages from his girlfriend, which he reads as soon as they arrive.

API

A messaging application is registered with the messaging menu if $HOME/.config/indicators/messages/applications-blacklist/ does not contain a text file that contains the pathname of the application’s .desktop file, and either:

  • $HOME/.config/indicators/messages/applications/ contains a text file that contains the pathname of the application’s .desktop file, that .desktop file exists, and the program the .desktop file refers to also exists.

  • The application is Evolution, Evolution is installed, and it is your default mail client in “Preferred Applications”.

Except for Evolution, an application should register itself only if, and as long as, you have an account or analogous configuration set up in that application (for example, an e-mail account or a feed subscription). This avoids the problem where you cannot remove an application installed by another user from your own messaging menu without having to learn its configuration interface (when in the worst case, the application might not even be available in a language you can read).

Test case: Without Pidgin installed, open the menu. Pidgin should not be present. Install Pidgin, and open the menu again: Pidgin still should not be present. Launch Pidgin, but quit before setting up an account, and open the menu again: Pidgin still should not be present. Relaunch Pidgin, set up an account, and (without closing Pidgin) open the menu: Pidgin should be present. Uninstall Pidgin, then open the menu again: Pidgin should not be present. Reinstall Pidgin, then open the menu again: Pidgin should be present.

In the .desktop file itself, an application may specify shortcut actions that can be invoked regardless of whether the program is running. The syntax of these actions is defined in ApplicationShortcuts.

While running, a registered application can also provide either a single count of new messages, or a set of separate message sources (for example, mail folders or syndicated feeds) with their own counts or times. For example, a Laconica client may provide only the single count, because it presents its updates in a single list and not as separately navigable items. A Usenet newsreader, on the other hand, may provide an item for each newsgroup that has new messages.

When an application provides separate message sources, each source item should have up to six components.

  1. name: The name of the source. For example, a person’s name, a feed title, or a discussion group name. If a single application has multiple sources with the same name, it should disambiguate them if practical.

  2. icon: A vector or bitmap image representing the message source. Ideally, it should be exactly the same icon as the program uses for the same source in the rest of its interface. We request that the icon be provided only where it represents the person who sent the message, for example, the avatar of a person sending an instant message, with other types of client omitting the icon. Applications should specifically not provide "generic" icons, like "mail" or "IM" or "FedEX".

  3. count: The number of new messages concerning you from this source. (Currently count is mutually exclusive with time, though this may change in future.)

  4. time: A timestamp for the most recent instant message from that source, in ISO 8601 format. The messaging menu takes care of presenting this time in an easy-to-read and locale-sensitive format. A string not in ISO 8601 format (e.g. “connected”) will be accepted, but not rendered as a time. (Currently time is mutually exclusive with count, though this may change in future.)

  5. draw-attention: A request that the messaging menu communicate to the user that something important has arrived in the menu. Currently this is displayed as a green dot in the menu title.

  6. signal: A signal that the messaging menu should return to the application when the menu item is selected. When it receives this signal, the application should immediately display the message source represented by the item, and ideally also the first relevant message in that source.

For an application to appear in the menu while running it should use libindicate and set the type of the application to messaging.

All indicators will get a signal when they are represented visually. That signal will not occur for indicators that are either over the limitations of the applet or if the applet is not functioning in some way.

Treatment of the API

Because the messaging menu contains “Set Up…” items for messaging programs, it will almost always appear, even on a computer that is not being used for messaging. The only situations in which it should not appear is if none of your preferred mail client, Empathy, or Gwibber are installed; or if you have specified in your preferred mail client, in Empathy, and in Gwibber that you do not want each of them to appear in the menu.

Title

The title should be the indicator-messages icon (in the default theme, an envelope). If any registered applications have set draw-attention and have not been focused since it was set, the icon should be set to the indicator-messages-new icon (in the default theme, an envelope overlaid by a green dot).

Application sections

The menu should have these sections:

  • a Mail section for your preferred mail application (regardless of whether it is registered), unless it is blacklisted;
  • a Chat section for Empathy (regardless of whether it is registered), unless it is blacklisted;
  • a Microblogging section for Gwibber (regardless of whether it is registered), unless it is blacklisted;
  • all other applications that are registered and not blacklisted, sorted alphabetically by .desktop Name.

There should be separators between sections, but not at the top or bottom of the menu.

Within each section, first should be an application item representing the application as a whole.

  • For the Mail section, it should be labelled “Mail” and use a black-and-white generic mail icon if the application is registered, or “Set Up Mail…” with no icon if the application is not registered.
  • For the Chat section, it should be labelled “Chat” and use a black-and-white generic chat icon if Empathy is registered, or “Set Up Chat…” with no icon if Empathy is not registered.
  • For the Microblogging section, it should be labelled “Microblogging” and use a black-and-white generic microblogging icon if Gwibber is registered, or “Set Up Microblogging…” if Gwibber is not registered.
  • For all other sections, it should use the actual icon and Name of the application.

If the application is currently running, this should be indicated by an inward-pointing triangle at the leading edge of the application item. If the application has not provided message source items, its count should be shown as part of the application item. Activating the menu item should (re-)launch the application; the application can then decide whether it is most appropriate to open a new window, focus an existing window, or do something else. (For example, if the only Evolution window currently open is a Calendar window, choosing “Evolution” from the messaging menu should open and focus an Evolution Mail window.)

Next should be presented the shortcut items for the application, if any, up to a limit of the six first items. Activating any of these menu items should (re-)launch the application with the appropriate options; the application can then decide whether it is most appropriate to open a new window, focus an existing window, or do something else.

If the application has provided message source sub-items, any count for the application as a whole should be ignored. Up to six of the sub-items should be presented in the menu, in the same order the application provided them, below the item for the application as a whole. They should use name as their text, and icon (if any) as their icon. The count or time for each item should be presented as part of the menu item. If it has neither count nor time, the time at which the item was registered should be presented as its time.

Selecting an item from the menu should send the associated signal, and also remove the item from the menu.

Neither the menu nor any of its items should have a tooltip.

Presentation of count

A count should be presented at the trailing end of the menu item.

To do: Visual design of exact presentation.

Presentation of time

The time for an item should be presented only if that item does not also have a count.

A time should be displayed in small print, with its baseline aligned with the baseline of the main menu text, and with its trailing edge horizontally aligned with the trailing edge of the menu contents area.

A time less than an hour ago should be presented as relative minutes. For example, “4 m” or “58 m”.

A time greater than or equal to an hour ago, but from today, should be presented as absolute hours and minutes, using 12-hour format, without date or seconds; for example, “4:11 AM”.

A time both great than or equal to an hour ago, and from before today, but from less than six days before the most recent midnight, should be presented the same way, but preceded by the day in abbreviated form. For example, “Thu 4:11 AM” or “Sat 20:07”.

A time from more than six days before the most recent midnight should be preceded by the date instead of the day. For example, “Aug 8 4:11 AM” or “Oct 11 20:07”.

Ideally we would use the same 12- or 24-hour format as used by the panel clock, but the Gnome panel applet system makes this infeasible. This section should be revisited once it becomes possible to customize date presentation in Ubuntu, and/or customize time presentation in a reusable way.

A time that is not a timestamp, e.g. “connected”, should be presented verbatim.

How applications should integrate with the messaging menu

A mail client should register itself when you set up any mail accounts, and unregister itself when you remove the last account. It should also provide a “Show {Name of Program} in the messaging menu” checkbox in its settings.

For the purpose of the messaging menu, a new message is an unread message that the program discovered since the last time you (a) performed any action in that mailbox or (b) selected the corresponding item in the messaging menu. Whether a new message concerns you may be configurable within the program, perhaps by folder or by mail filters.

A mail program should provide one message source item for each mailbox that contains new messages concerning you. (It should do this for all mailboxes even though a maximum of six will be shown, because that maximum may change in the future.)

name should be set to to the name of the mailbox. If (and only if) there is more than one mailbox with the same name, the mail program should disambiguate them using the account name if possible, e.g. “Inbox (Home)” vs. “Inbox (Yoyodyne)”.

signal should be set such that selecting an item from the menu focuses the most relevant window to display that mailbox (for example a window that is already displaying that mailbox, if one is open), and switches to the mailbox if necessary.

An IM client should register itself when you set up any IM accounts, and unregister itself when you remove the last account. It should also provide a “Show {Name of Program} in the messaging menu” checkbox in its settings.

For the purpose of the messaging menu, a new message is a message concerning you that was posted at a time when the tab or window in which it appeared was not focused. “Concerning you” for a private chat means every message, and for a public chat means every message that the program highlights (for example, because it mentions your name).

An IM client should provide one message source item for each person who, or group chat containing someone, who, has sent you new messages. (It should do this for all relevant people or chats even though a maximum of six will be shown, because that maximum may change in the future.)

Optionally, it may also provide a message source item for each person in your contact list who has not sent you new messages, but who has connected in the past minute and is still online. It should not do this unless it displayed a notification bubble notifying you that the person has connected.

For a group conversation, name should be set to the name of the channel or chat room. If only one person has sent highlighted messages, this should be followed by the name of that person in brackets. Otherwise, it should be followed by the number of people who have sent highlighted messages in brackets.

For an individual conversation, name should be set to the name of the person if known, otherwise their instant messaging ID or IRC nickname.

time should be set to the time of the earliest unseen message from that group or individual, if there is one. For someone who has connected in the past minute but not sent you new messages, time should be set to “connected”.

signal should be set such that selecting an item from the menu brings the relevant window to the front, and switches to the relevant tab in that window if necessary.

A feed reader or microblogging client should register itself when you add any feeds or accounts, and unregister itself when you remove the last feed or account. It should also provide a “Show {Name of Program} in the messaging menu” checkbox in its settings.

For the purpose of the messaging menu, a new message is an unread item that the program discovered since the last time you (a) performed any action in the program or (b) selected the corresponding item in the messaging menu. Whether an item is important enough to include in the messaging menu may be configurable within the program.

  • (It should do this for all relevant feeds or accounts even though a maximum of six will be shown, because that maximum may change in the future.)

Changes to default applications

Evolution

Initial setup

Evolution’s initial setup screen should be altered to include a “Remove From Messaging Menu” button. Activating the button should quit Evolution and blacklist it, thereby removing it from the menu.

evolution-setup-old.png

Settings

How you are notified of new mail is one of the most important settings for a mail program. So it should be presented prominently in Evolution’s Mail Preferences, instead of being hidden in a plug-in as it is now.

Therefore, the “General” tab of the “Mail” panel of Evolution’s Preferences should be altered:
evolution-preferences-old.pngevolution-new.png

Specifically:

  • A “When new mail arrives in” menu should be added to the top of the “General” panel, containing “Inbox” and “any folder” items. If you have more than one e-mail account, the text of the “Inbox” option should read “any Inbox” rather than just “Inbox”. A colon should be shown after the menu, not before.
  • A “Play a sound” checkbox should be added.
  • A “Show a notification bubble” checkbox should be added.
  • A “Show in the messaging menu” checkbox should be added.

The “General” tab is the densest tab in Evolution’s Preferences, so to make room for these new settings, other settings should be rearranged or removed:

  • The “Message Display” section should be renamed to “When displaying messages:”.
  • The “Message Fonts” section heading should be removed, and its contents moved to the top of the “When displaying messages:” section.
  • The “Use the same font as other applications” checkbox should be removed, and Evolution should assume you always want to use the custom font setting. (Having an interface to share font settings between Yelp, Evolution, and nothing else, is more cluttersome than useful.)
  • To make their purpose clearer in the absence of a font-specific introductory heading or checkbox, “Standard Font:” should be changed to “Use proportional font:”.
  • The “Highlight quotations with [XX] color” checkbox should be moved immediately below the font settings.
  • The “Shrink To/Cc/Bcc headers to x addresses” checkbox should be dropped. (These headers can be expanded by clicking a button in the individual message, and how many addresses are shown by default isn’t nearly interesting enough to be a visible setting.)

  • The “Enable Search Folders” checkbox should be removed, and Evolution should run as if it is always on. (If you don’t want any search folders, don’t create any.)
  • The “Help” button should be moved inside the tab, and the redundant “Close” button should be removed.

(These are only minimal changes to make the Evolution Preferences window, with its extra options, compact enough to fit on standard displays. They should not be confused with design work for making Evolution netbook-compatible.)

evolution-plugin.png

Upgrading to a version of Evolution that implements this specification should uninstall the “Mail Notification” plug-in, if it is installed, while migrating its settings. Specifically:

  • The selection of the “Notify new messages for Inbox only” setting should be mapped to whether the “When new mail arrives in” menu is set to “Inbox” or “any folder”.
  • The “Generate a D-Bus message” setting should be ignored.
  • The “Show icon in notification area” setting should be mapped to the “Indicate unread messages in the panel” setting.
  • The “Blink icon in notification area” setting should be ignored.
  • The “Popup message sound together with the icon” setting should be mapped to the “Display a notification bubble” setting.

Empathy

Whenever Empathy is launched directly (e.g. from the Applications menu), it should display the contact list, instead of hiding itself inside the messaging menu or a notification area icon.

People who have sent new instant messages (or IRC channels in which people have mentioned you) should appear as individual items in the messaging menu. Selecting an item should switch to that window, switching to the relevant tab inside that window if necessary.

Contacts who have just come online should appear as individual items in the menu (without a time) for 30 seconds, and should then be removed.

Empathy needs to handle "real-time" events differently, perhaps using morphing windows that close automatically if the caller hangs up without the receiver answering.

Need to specify changes to settings (bug 516168).

Gwibber

Settings

gwibber-preferences-old.png gwibber-preferences-new.png

The “Window Behavior” settings for Gwibber should be removed.

Behavior

Gwibber should have an application item only, with the count being the number of updates received since Gwibber was last focused.

Changes to other applications

Akregator

aMSN

Balsa

Blam

cGmail

CheckGmail

choqoK

Claws Mail

Emesene

Empathy

Eva

Gajim

Gmail Notify

Gossip

Grr Feed Reader

iptux

KCheckGMail

KGmailNotifier

KMail

KMess

KNode

Kadu

Kita2

Konversation

Kopete

Kphone

Licq x 2

Liferea

LostIRC

LuserNET

Mailody x 2

Mumble

Pan Newsreader

Pidgin

Settings

When the messaging menu is being used, the “System Tray Icon” section of Pidgin’s Preferences should be hidden completely, and Pidgin should always behave as if the “Show system tray icon” setting was set to “Never”.

pidgin-preferences-old.pngpidgin-preferences-new.png

Behavior

When you receive an instant message in Pidgin, in a window that is not active, or in a tab that is not frontmost regardless of whether the window is active, a notification bubble should appear. The icon of the bubble should be the icon of the person, a generic person icon for people with or group icon for people.

Psi

Quassel IRC

qutIM

Sage

Sim-IM

Smuxi

Straw

Sylpheed

TalkSoup

Twitux

XChat

XChat-Gnome

Xpn

Yarssr

Risks

  • Omitting application items for default applications, but not for non-default ones, may confuse users.

Unresolved issues

  • We need to survey messaging applications for (a) what custom items they'd want when not running (ApplicationShortcuts), and (b) what custom items they’d want when running. That way we can work out whether it is necessary to provide a separate API for custom items while running.

  • [from Brian Curtis] How to run programs in the background so they're accessible only from the messaging menu?
  • How to configure appearance, length of display, etc ??
  • Should there limitations enforced in the Messaging Menu on how draw-attention is used?
  • Should the number of subitems be limited to prevent abuse? How many? And how should the excess case be displayed?
  • How to distinguish visually between applications that are running and not?

MessagingMenu (last edited 2014-01-07 16:35:50 by mpt)