GNOME Bugzilla – Bug 686738
empty message tray may be confusing to new users
Last modified: 2012-11-20 11:31:09 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.
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.
(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
Created attachment 227837 [details] mockup As discussed with Jon and Jimmac the other day: when the tray is empty, show a "No Messages" label.
Currently working in this fix!
Allan, the tray is more than just messages though.
(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).
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.
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.
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;
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.
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.
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.
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.
Looks good to me!
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.
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.
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.
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.
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.
Review of attachment 229123 [details] [review]: Looks good.
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.
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 :)