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 617234 - chats stay left
chats stay left
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: message-tray
unspecified
Other Linux
: High normal
: ---
Assigned To: Marina Zhurakhinskaya
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2010-04-29 23:06 UTC by William Jon McCann
Modified: 2011-02-01 20:54 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Should I insert the elements in summaryItems[] grouped reflecting how the tray appears as well? (2.41 KB, patch)
2010-12-30 21:14 UTC, Hellyna Ng
reviewed Details | Review
Hope this is final (2.55 KB, patch)
2011-02-01 18:57 UTC, Hellyna Ng
none Details | Review
Fixes a variable name error w/ ref to the prev patch. (2.55 KB, patch)
2011-02-01 19:36 UTC, Hellyna Ng
committed Details | Review

Description William Jon McCann 2010-04-29 23:06:03 UTC
One idea is that it might be useful if chat conversations stay toward the left of the summary area.  And of course grouped together.
Comment 1 Hellyna Ng 2010-12-30 21:14:02 UTC
Created attachment 177280 [details] [review]
Should I insert the elements in summaryItems[] grouped reflecting how the tray appears as well?

Tell me if this is complete. :)
Comment 2 Marina Zhurakhinskaya 2011-01-28 05:06:31 UTC
Review of attachment 177280 [details] [review]:

The patch looks good and works as expected. Just a few cosmetic changes suggested below.

Commit message suggestion:
-------------------------------------------
Group chat sources on the left in the message tray

This will make it easier for users to get back to their chats.
-------------------------------------------

It doesn't appear to be important to preserve the same order when adding the elements to this._summaryItems , but it's great that you thought of that :).

::: js/ui/messageTray.js
@@ +990,3 @@
         this._newSummaryItems = [];
         this._longestSummaryItem = null;
+        this._chatSummaryItemCount = 0;

should be named this._chatSummaryItemsCount

@@ +1025,3 @@
         let summaryItem = new SummaryItem(source);
 
+        if(source.isChat) {

Need a space after if.

@@ +1029,3 @@
+            this._chatSummaryItemCount++;
+        } else
+            this._summary.insert_actor(summaryItem.actor, this._chatSummaryItemCount);

Use curly braces here too since we use them in the if clause.

@@ +1127,3 @@
+
+        if (source.isChat)
+            this._chatSummaryItemCount--;

I'd move this right under this._summaryItems.splice(index, 1);

::: js/ui/telepathyClient.js
@@ +490,2 @@
         this._setSummaryIcon(this.createNotificationIcon());
+        this.isChat = true;

It would make sense to move it up to be right under MessageTray.Source.prototype._init.call() since it is a base class field.
Comment 3 Hellyna Ng 2011-02-01 18:57:38 UTC
Created attachment 179820 [details] [review]
Hope this is final
Comment 4 Hellyna Ng 2011-02-01 19:36:33 UTC
Created attachment 179823 [details] [review]
Fixes a variable name error w/ ref to the prev patch.