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 659067 - user-menu: Indicate progress on status changes
user-menu: Indicate progress on status changes
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2011-09-14 15:55 UTC by Florian Müllner
Modified: 2012-06-01 23:55 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
user-menu: Indicate progress on status changes (10.49 KB, patch)
2011-09-14 15:55 UTC, Florian Müllner
needs-work Details | Review
user-menu: Indicate progress on status changes (3.78 KB, patch)
2012-06-01 21:33 UTC, Florian Müllner
none Details | Review
user-menu: Indicate progress on status changes (3.76 KB, patch)
2012-06-01 21:37 UTC, Florian Müllner
accepted-commit_now Details | Review
user-menu: Indicate progress on status changes (3.71 KB, patch)
2012-06-01 23:10 UTC, Florian Müllner
committed Details | Review

Description Florian Müllner 2011-09-14 15:55:24 UTC
See attached patch. Whether the approach of overlaying an indicator rather than having a set of proper in-progress icons is up to the designers :-)
Comment 1 Florian Müllner 2011-09-14 15:55:27 UTC
Created attachment 196518 [details] [review]
user-menu: Indicate progress on status changes

Depending on the number of accounts, the type or simply the network,
there may be a noticable lag between setting the status and the actual
status change.
Indicate that by overlaying the status icon with a progress indicator.
Comment 2 Jasper St. Pierre (not reading bugmail) 2012-06-01 12:19:03 UTC
Review of attachment 196518 [details] [review]:

Looks fine to me.
Comment 3 Florian Müllner 2012-06-01 16:17:22 UTC
Comment on attachment 196518 [details] [review]
user-menu: Indicate progress on status changes

Some objections from the design side
Comment 4 Florian Müllner 2012-06-01 21:33:17 UTC
Created attachment 215469 [details] [review]
user-menu: Indicate progress on status changes

Depending on the number of accounts, the type or simply the network,
there may be a noticable lag between setting the status and the actual
status change.
Indicate that by overlaying the status icon with a progress indicator.
Comment 5 Florian Müllner 2012-06-01 21:37:19 UTC
Created attachment 215470 [details] [review]
user-menu: Indicate progress on status changes

The designers didn't like the idea of using an overlay, so change the status icon to a dedicated icon instead.
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-06-01 21:54:42 UTC
Review of attachment 215470 [details] [review]:

Code looks fine, but I'm a bit worried about the heuristic.

::: js/ui/userMenu.js
@@ +661,3 @@
+        }
+
+        if (changing / total > .5) {

I think we should display pending if there's at least one changing account.
Comment 7 Florian Müllner 2012-06-01 22:01:20 UTC
(In reply to comment #6)
> Review of attachment 215470 [details] [review]:
> 
> Code looks fine, but I'm a bit worried about the heuristic.
> 
> ::: js/ui/userMenu.js
> @@ +661,3 @@
> +        }
> +
> +        if (changing / total > .5) {
> 
> I think we should display pending if there's at least one changing account.

The idea here is to guard against "rogue" accounts, for instance telepathy's IRC support is (uhm) not so great, so you'd end up "pending" for minutes even though you already appear online with a couple of other accounts.
(To be honest, I don't remember the exact details of this patch, but I do remember that "at least one changing account" was the first approach I did ...)
Comment 8 Florian Müllner 2012-06-01 23:10:17 UTC
Created attachment 215474 [details] [review]
user-menu: Indicate progress on status changes

Well, looks like the spinner in Empathy's roster window actually uses the "at least one pending" heuristic, so Do What Empathy Does (tm)
Comment 9 Jasper St. Pierre (not reading bugmail) 2012-06-01 23:42:07 UTC
Review of attachment 215474 [details] [review]:

Commit message nit: userMenu, not user-menu. Otherwise, one whitespace nit.

::: js/ui/userMenu.js
@@ +490,3 @@
                 let [presence, s, msg] = mgr.get_most_available_presence();
                 this._updatePresenceIcon(mgr, presence, s, msg);
+                this._setupAccounts();

A bit annoying that tp-glib doesn't send us 'account-*' signals on startup.

@@ +635,3 @@
+            accounts[i]._changingId = accounts[i].connect('notify::connection-status',
+                                                          Lang.bind(this, this._updateChangingPresence));
+}

Hello, closing brace. Would you please get back into your correct position?