After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 686738 - empty message tray may be confusing to new users
empty message tray may be confusing to new users
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-10-23 22:32 UTC by William Jon McCann
Modified: 2012-11-20 11:31 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
mockup (241.14 KB, image/png)
2012-11-01 18:30 UTC, Allan Day
  Details
tag: Added 'No Messages' label to Messages Tray (5.30 KB, patch)
2012-11-12 22:59 UTC, Victoria Martínez de la Cruz
reviewed Details | Review
screenshot (535.72 KB, image/png)
2012-11-12 23:15 UTC, Allan Day
  Details
tag: Added 'No Messages' label to Messages Tray - Corrected (7.41 KB, patch)
2012-11-13 00:23 UTC, Victoria Martínez de la Cruz
reviewed Details | Review
Added 'No Messages' label when messages tray is empty (2.62 KB, patch)
2012-11-13 01:51 UTC, Victoria Martínez de la Cruz
reviewed Details | Review
Added 'No Messages' label when messages tray is empty (2.73 KB, patch)
2012-11-13 12:16 UTC, Victoria Martínez de la Cruz
needs-work Details | Review
Added 'No Messages' label when messages tray is empty (2.71 KB, patch)
2012-11-16 12:39 UTC, Victoria Martínez de la Cruz
committed Details | Review

Description William Jon McCann 2012-10-23 22:32:36 UTC
Today I observed a user confused by the empty message tray appearing. It slid out and was just gray and they had no idea what that meant.

Perhaps an empty tray could be an opportunity to explain what it is for. We'd have to think about the best approach here but perhaps even saying something like "No new messages" or similar would help.
Comment 1 Jakub Steiner 2012-10-23 22:53:53 UTC
That is perhaps the best approach. Not allowing to expose the message tray when there's nothing is another, but then it breaks the behavior/shortcut.
Comment 2 Florian Müllner 2012-10-24 07:21:10 UTC
(In reply to comment #1)
> Not allowing to expose the message tray when there's nothing is another

I'm not sure whether that would be confusing to users that know that the tray is there and what it does
Comment 3 Allan Day 2012-11-01 18:30:14 UTC
Created attachment 227837 [details]
mockup

As discussed with Jon and Jimmac the other day: when the tray is empty, show a "No Messages" label.
Comment 4 Victoria Martínez de la Cruz 2012-11-01 21:41:16 UTC
Currently working in this fix!
Comment 5 Hashem Nasarat 2012-11-11 23:39:43 UTC
Allan, the tray is more than just messages though.
Comment 6 Allan Day 2012-11-12 15:51:04 UTC
(In reply to comment #5)
> Allan, the tray is more than just messages though.

I think we can use "messages" in a loose way... the meaning of "notification" and "message" is quite close already. "Messages" seems more appropriate than "notifications" to me (feel free to make the opposite case though).
Comment 7 Victoria Martínez de la Cruz 2012-11-12 16:03:48 UTC
Using the word "notification" is a bit stiff, "messages" sounds better.

Is true that the tray have other functions too, but the idea is to clarify the purpose of the tray to new users keeping the design simple.

We could also add a link to more info, but I think that would be a little annoying for users that already know what the message tray is for.

If we stick with the "No Messages" label, I've finished doing it and I'll attach it as soon as you tell me that it's ok.
Comment 8 Victoria Martínez de la Cruz 2012-11-12 22:59:35 UTC
Created attachment 228838 [details] [review]
tag: Added 'No Messages' label to Messages Tray

When the messages tray is empty it shows a 'No Messages' label to avoid confusion to new users.
Comment 9 Jasper St. Pierre (not reading bugmail) 2012-11-12 23:11:03 UTC
Review of attachment 228838 [details] [review]:

There seems to be some whitespace issues in this patch. Make sure you clear those out before attaching.

::: js/ui/messageTray.js
@@ +1541,3 @@
+    },
+
+    _emptyTray: function() {

A method name like "_emptyTray" sounds like it will empty the tray, not be called when the tray is empty.

I think having one function called "_updateNoMessagesLabel" that checks for the current state and does the correct thing by creating/destroying the indicator label would be more in line with our current coding style.

@@ +1542,3 @@
+
+    _emptyTray: function() {
+        this._noMessages = new St.Label({ text: 'No Messages',

I don't think it can happen, but we should guard against the case where _emptyTray is called twice in a row, and we drop the previous label actor on the floor, still inserted into the tray.

@@ +1549,3 @@
+                                        y_expand: true });            
+        this._summary.insert_child_at_index(this._noMessages, 0);        
+        this._noMessages.set_translation(-(this._notificationWidget.width+this._noMessages.width), 0, 0);                

This won't work in the case where we plug in a new monitor (notification widget size changes), or the user changes fonts or font sizes (Large Text in a11y).

I'd prefer to figure out a way to use Clutter's natural ClutterBinLayout for centering. Try inserting the item into to notificationWidget, not summary.

@@ +1553,3 @@
+
+    _nonEmptyTray: function() {        
+        this._noMessages.destroy();

This needs:

    this._noMessages = null;
Comment 10 Allan Day 2012-11-12 23:15:40 UTC
Created attachment 228842 [details]
screenshot

Thanks for the patch, Victoria! I just tried it and there seems to be an alignment issue with the positioning of the label - see the attached screenshot.
Comment 11 Victoria Martínez de la Cruz 2012-11-13 00:23:55 UTC
Created attachment 228847 [details] [review]
tag: Added 'No Messages' label to Messages Tray - Corrected

When the messages tray is empty it shows a 'No Messages' label to avoid confusion to new users.
Corrected some programming style and alignment.
Comment 12 Jasper St. Pierre (not reading bugmail) 2012-11-13 00:42:18 UTC
Review of attachment 228847 [details] [review]:

This seems to delete some other code, and it hasn't been squashed with the previous patch. Please squash it with the previous patch using interactive rebase.
Comment 13 Victoria Martínez de la Cruz 2012-11-13 01:51:36 UTC
Created attachment 228848 [details] [review]
Added 'No Messages' label when messages tray is empty

To avoid confusion in new users, a 'No Messages' label is shown when messages tray is empty.
Comment 14 Allan Day 2012-11-13 09:58:38 UTC
Looks good to me!
Comment 15 Jasper St. Pierre (not reading bugmail) 2012-11-13 10:03:36 UTC
Review of attachment 228848 [details] [review]:

::: js/ui/messageTray.js
@@ +1541,3 @@
+
+    _updateNoMessagesLabel: function() {
+        if(this._summaryItems.length == 0) {

What if this method gets called twice in a row with no summary items. This should be:

if (this._summaryItems.length == 0 && !this._noMessages) {
    // ...
} else if (this._summaryItems.length > 0 && this._noMessages) {
    // ...
}

@@ +1542,3 @@
+    _updateNoMessagesLabel: function() {
+        if(this._summaryItems.length == 0) {
+                this._noMessages = new St.Label({ text: 'No Messages',

You seem to have some whitespace and indentation issues.

@@ +1550,3 @@
+                this.actor.add_actor(this._noMessages);
+        } else {
+                this.actor.remove_actor(this._noMessages);

This should be this._noMessages.destroy(); as before.
Comment 16 Victoria Martínez de la Cruz 2012-11-13 12:16:13 UTC
Created attachment 228878 [details] [review]
Added 'No Messages' label when messages tray is empty

To avoid confusion in new users, a 'No Messages' label is shown when messages
tray is empty.

Fixed reviewed items.
Comment 17 drago01 2012-11-15 15:06:35 UTC
Review of attachment 228878 [details] [review]:

::: js/ui/messageTray.js
@@ +1542,3 @@
+    _updateNoMessagesLabel: function() {
+        if(this._summaryItems.length == 0 && !this._noMessages) {
+                this._noMessages = new St.Label({ text: 'No Messages',

This should be translateable i.e use _("No Messages") instead.
Comment 18 Jasper St. Pierre (not reading bugmail) 2012-11-15 15:15:22 UTC
Review of attachment 228878 [details] [review]:

::: js/ui/messageTray.js
@@ +1542,3 @@
+    _updateNoMessagesLabel: function() {
+        if(this._summaryItems.length == 0 && !this._noMessages) {
+                this._noMessages = new St.Label({ text: 'No Messages',

There also seem to be some indentation issues here.
Comment 19 Victoria Martínez de la Cruz 2012-11-16 12:39:51 UTC
Created attachment 229123 [details] [review]
Added 'No Messages' label when messages tray is empty

To avoid confusion in new users, a 'No Messages' label is shown when messages
tray is empty.

Fixed reviewed items.

https://bugzilla.gnome.org/show_bug.cgi?id=686738

tray is empty.
Comment 20 drago01 2012-11-16 17:21:51 UTC
Review of attachment 229123 [details] [review]:

Looks good.
Comment 21 Allan Day 2012-11-20 09:42:38 UTC
Comment on attachment 229123 [details] [review]
Added 'No Messages' label when messages tray is empty

Pushed with a few tweaks to tidy up the commit message and remove whitespace errors.

Thanks for the fix, Victoria! This is a great little improvement.
Comment 22 Victoria Martínez de la Cruz 2012-11-20 11:31:09 UTC
Thanks everyone for your reviews and patience. I feel I've learned a lot (although it was a little fix), and I think next time it won't take me so much to do it right :)