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 687113 - Better login process indication
Better login process indication
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: login-screen
3.7.x
Other Linux
: Normal normal
: ---
Assigned To: Ray Strode [halfline]
gnome-shell-maint
Depends on:
Blocks: 685307
 
 
Reported: 2012-10-29 12:54 UTC by Allan Day
Modified: 2012-11-20 23:29 UTC
See Also:
GNOME target: ---
GNOME version: 3.7/3.8


Attachments
First try (11.98 KB, patch)
2012-10-29 23:19 UTC, Stéphane Démurget
reviewed Details | Review
Second try (11.97 KB, patch)
2012-10-29 23:36 UTC, Stéphane Démurget
none Details | Review
Third patch, addButton-powered (11.79 KB, patch)
2012-10-30 00:17 UTC, Stéphane Démurget
reviewed Details | Review
An other one (11.79 KB, patch)
2012-10-30 12:30 UTC, Stéphane Démurget
needs-work Details | Review
Fixed patch (13.00 KB, patch)
2012-10-30 14:37 UTC, Stéphane Démurget
reviewed Details | Review
panel: do not cumulate animations in AnimatedIcon (1008 bytes, patch)
2012-11-01 16:06 UTC, Stéphane Démurget
reviewed Details | Review
modalDialog: give more control over the layout (5.49 KB, patch)
2012-11-01 16:09 UTC, Stéphane Démurget
none Details | Review
panel: do not accumulate icon animations (997 bytes, patch)
2012-11-01 18:22 UTC, Stéphane Démurget
none Details | Review
modalDialog: give more control over the layout (5.59 KB, patch)
2012-11-04 11:07 UTC, Stéphane Démurget
reviewed Details | Review
modalDialog: give more control over the layout (5.21 KB, patch)
2012-11-05 14:49 UTC, Stéphane Démurget
none Details | Review
Login: better process indication (8.99 KB, patch)
2012-11-05 16:12 UTC, Stéphane Démurget
rejected Details | Review
modalDialog: give more control over the layout (5.20 KB, patch)
2012-11-18 22:16 UTC, Stéphane Démurget
committed Details | Review
modalDialog: do not launch disabled button actions (3.56 KB, patch)
2012-11-18 22:17 UTC, Stéphane Démurget
needs-work Details | Review
Login: sensitivity fixes (8.49 KB, patch)
2012-11-18 22:17 UTC, Stéphane Démurget
committed Details | Review
Login: add a spinner for better process indication (13.95 KB, patch)
2012-11-18 22:17 UTC, Stéphane Démurget
committed Details | Review
modalDialog: do not launch disabled button actions (4.92 KB, patch)
2012-11-18 23:30 UTC, Stéphane Démurget
committed Details | Review
unlockDialog: set password char on verif. failure (1.08 KB, patch)
2012-11-20 23:15 UTC, Stéphane Démurget
committed Details | Review

Description Allan Day 2012-10-29 12:54:24 UTC
We need to do a better job of indicating login process. This can sometimes take a few seconds (particularly if you get your password wrong): we need to give better feedback of what's going on. In particular:

 * The login button should be insensitive (we already do this)
 * The password field should be insensitive
 * "Login as another user..." should be insensitive
 * If authorisation takes more than about half a second, we should show a spinner next to the login button:

https://dl.dropbox.com/u/5031519/gnome-shell/login/3-progress.png
Comment 1 Stéphane Démurget 2012-10-29 13:54:05 UTC
Just to clarify the password field is already insensitive too, its styling is wrong though.
Comment 2 Stéphane Démurget 2012-10-29 23:19:06 UTC
Created attachment 227600 [details] [review]
First try

Some notes:
- the sliced image is loaded twice since we use reuse AnimatedIcon from panel, but it's ok
- "box-shadow: none" does not work, so I overwrote the definition with a "inset 0px 0px"
- the buttons-set signal is not used ATM? I duplicate the signal emission but it could be either removed or we could add a #buttonLayoutFinished method or something
- ModalDialog#makeButton is full of side-effects, and without them the method is not useful, maybe addButton(buttonInfo, layoutInfo) would be better as convenience API (defaults to medium-y, etc.) since the point of makeButton is to create a button to add it. Well, the unlock dialog is the first to add actors manually, so I do not know... Jasper, is it what you wanted? 
- for the moment UnlockDialog#_setWorking could be called inside _updateSensitivity, or I could merge everything in _setWorking (with a potential better name)
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-10-29 23:36:24 UTC
Review of attachment 227600 [details] [review]:

::: js/ui/modalDialog.js
@@ +154,3 @@
+        if (isDefault && !key) {
+            this._actionKeys[Clutter.KEY_KP_Enter] = action;
+            this._actionKeys[Clutter.KEY_ISO_Enter] = action;

I wasn't thinking this through. This will have to be an "addButton" method, or an "addButton"/"makeButton" pair or something. A constructor like I was thinking shouldn't modify any state like this.
Comment 4 Stéphane Démurget 2012-10-29 23:36:29 UTC
Created attachment 227601 [details] [review]
Second try

Fixed the entry look after Giovanni's run dialog enhancements and removed the 'buttons-set' signal emission.
Comment 5 Stéphane Démurget 2012-10-30 00:17:19 UTC
Created attachment 227603 [details] [review]
Third patch, addButton-powered

Ok, we were on the same line then.
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-10-30 00:25:55 UTC
Review of attachment 227603 [details] [review]:

::: js/ui/modalDialog.js
@@ +166,3 @@
+            this._actionKeys[key] = action;
+
+        layoutInfo = Params.parse(layoutInfo, { expand: false,

This seems unnecessary to me.

@@ +178,3 @@
+
+    getButtonLayout: function() {
+        return this._buttonLayout;

I'd prefer a rename to this.buttonLayout.

::: js/ui/unlockDialog.js
@@ +180,3 @@
+                             default: true };
+
+        this.getButtonLayout().visible = true;

Yeah, I find this a bit awkward.

@@ +181,3 @@
+
+        this.getButtonLayout().visible = true;
+        this.addButton(cancelButtonInfo, { expand: true,

I don't like having the info split out like this.

@@ +234,3 @@
+            this._workSpinner.actor.show();
+
+            Tweener.addTween(this._workSpinner.actor,

Just have it appear directly. The fade-out seems a bit extravagant when we already have the thing spinning.

(So, this entire function would go away and be replaced with this._workSpinner.actor.visible = ...)

@@ +245,3 @@
+                               time: WORK_SPINNER_ANIMATION_TIME,
+                               transition: 'linear',
+                               onComplete: this._workSpinner.actor.hide

I'm not sure this will work correctly.
Comment 7 Jakub Steiner 2012-10-30 10:56:43 UTC
> Just have it appear directly. The fade-out seems a bit extravagant when we
> already have the thing spinning.

I am a big fan of the fade. In fact, I'd even go an extra step and make it scale with an overshoot for the fade in, as I've done in the boot process animation -- http://jimmac.fedorapeople.org/gnome3/login.webm

(it's a little hard to catch in firefox as it starts right at the beginning when Ffox is still showing its buffering spinner
Comment 8 Stéphane Démurget 2012-10-30 12:30:46 UTC
Created attachment 227631 [details] [review]
An other one

After much fiddling with the animation, jimmac said "maybe the fade is enough".

Other comments are taken in account, except one. I tested the patch before submitting, so "onComplete: this._workSpinner.actor.hide" is working fine. Jasper, I made a mistake while testing the example lambda call you gave me yesterday. hide is a function and the scope is not used so we do not care which one it is: it is just a simple function reference (maybe I missed something)?

You'd prefer I add "onCompleteScope: this" or switch to "Lang.bind(this, this._workSpinner.actor.hide)"?
Comment 9 Stéphane Démurget 2012-10-30 12:35:28 UTC
For reference:
- fading: http://zzrough.free.fr/files/public/gnome-shell-687113-Better-login-process-indication/0001-Login-better-process-indication-1.0-fade.webm
- scale+overshoot: http://zzrough.free.fr/files/public/gnome-shell-687113-Better-login-process-indication/0001-Login-better-process-indication-scale-overshoot.webm

Jasper: I also added a check in AnimatedIcon to guard against cumulating  timeouts (this was the original reason for the spinner.visible != working check). I still need the check in _setWorking to avoid a glitch as working(true) might be called multiple times.
Comment 10 Jasper St. Pierre (not reading bugmail) 2012-10-30 13:30:47 UTC
(In reply to comment #8)
> Created an attachment (id=227631) [details] [review]
> An other one
> 
> After much fiddling with the animation, jimmac said "maybe the fade is enough".
> 
> Other comments are taken in account, except one. I tested the patch before
> submitting, so "onComplete: this._workSpinner.actor.hide" is working fine.
> Jasper, I made a mistake while testing the example lambda call you gave me
> yesterday. hide is a function and the scope is not used so we do not care which
> one it is: it is just a simple function reference (maybe I missed something)?
> 
> You'd prefer I add "onCompleteScope: this" or switch to "Lang.bind(this,
> this._workSpinner.actor.hide)"?

Neither of these are correct. this._workSpinner.actor.hide needs to be called on this._workSpinner.actor, not this. We typically use:

    onComplete: function() {
        this._workSpinner.actor.hide();
    },
    onCompleteScope: this,

Although we're not consistent. Sometimes we use Lang.bind(this, function() { ... }); instead.
Comment 11 Jasper St. Pierre (not reading bugmail) 2012-10-30 13:32:18 UTC
Actually, you know what? Don't bother hiding the actor at all. Just keep it at 0 opacity. It will be fine.
Comment 12 Jasper St. Pierre (not reading bugmail) 2012-10-30 13:35:25 UTC
Review of attachment 227631 [details] [review]:

::: data/theme/gnome-shell.css
@@ +396,3 @@
 }
 
+.modal-dialog StEntry:insensitive {

Is this badly rebased? I think it's .modal-dialog StEntry:insensitive already in master.

::: js/ui/modalDialog.js
@@ -116,3 @@
     },
 
-    setButtons: function(buttons) {

Keep this as buttonInfos.

::: js/ui/unlockDialog.js
@@ +180,3 @@
+                             default: true };
+
+        this.getButtonLayout().visible = true;

getButtonLayout() still icky.

@@ +240,3 @@
+                               transition: 'linear'
+                             });
+        } else

Style issue: if one branch has braces, all need to have them.
Comment 13 Stéphane Démurget 2012-10-30 14:37:34 UTC
Created attachment 227645 [details] [review]
Fixed patch

Yes, I meant on the this._workSpinner.actor scope, not this. But it is still unused...
Ok, I'll follow the more verbose style from now on.

Isn't it a problem not to hide it? the timeout will keep on running animation will keep on 
running. It will not draing my battery faster? Anyway, the actor is not hidden anymore with this version.

Sorry for the last patch, it was the same as the 2nd one + only the css changes, so indeed you certainly did not find anything you commented fixed. :-/

About the latest review:
- no, it still not ".modal-dialog StEntry:insensitive" on master
- for "Keep this as buttonInfos.", I think you reviewed the wrong column? It's what I changed to, or did you mean to keep the name "buttons", then?
Comment 14 Jasper St. Pierre (not reading bugmail) 2012-11-01 13:45:24 UTC
Review of attachment 227645 [details] [review]:

Code looks fine, I'd just like things split out a bit more.

::: js/ui/modalDialog.js
@@ +94,3 @@
                                 y_align: St.Align.START });
 
+        this.buttonLayout = new St.BoxLayout({ style_class: 'modal-dialog-button-box',

I'd prefer all these changes to modalDialog in a separate patch, please.

::: js/ui/panel.js
@@ +100,2 @@
     _onVisibleNotify: function() {
+        if (this.actor.visible && this._timeoutId > 0)

I'd prefer this in a separate patch as well.
Comment 15 Stéphane Démurget 2012-11-01 16:06:06 UTC
Created attachment 227817 [details] [review]
panel: do not cumulate animations in AnimatedIcon
Comment 16 Stéphane Démurget 2012-11-01 16:09:21 UTC
Created attachment 227818 [details] [review]
modalDialog: give more control over the layout
Comment 17 Stéphane Démurget 2012-11-01 16:16:35 UTC
Jasper, I made the same mistake as in #687112: I only changed the unlock dialog and not the login one, so the 3td patch will need more work.
Comment 18 Jasper St. Pierre (not reading bugmail) 2012-11-01 17:42:31 UTC
Review of attachment 227817 [details] [review]:

"accumulate"

The fix is correct, but when would this happen, where we'd repeatedly be setting the visible property to "true", without setting it to "false" first?
Comment 19 Stéphane Démurget 2012-11-01 18:22:11 UTC
Created attachment 227836 [details] [review]
panel: do not accumulate icon animations

Yes.
Comment 20 Stéphane Démurget 2012-11-04 11:07:22 UTC
Created attachment 228015 [details] [review]
modalDialog: give more control over the layout

Make the button layout public for callers to be able to have more
control over like adding custom widgets. Also, a method addButton is
added as convenience for the most frequent usage.

This patch fixes a dummy regression where the button was not set in
the buttonInfo object.
Comment 21 Jasper St. Pierre (not reading bugmail) 2012-11-04 16:09:28 UTC
Review of attachment 228015 [details] [review]:

::: js/ui/modalDialog.js
@@ -116,3 @@
     },
 
-    setButtons: function(buttons) {

Gah, I typed this wrong last time. Keep this as "buttons"

@@ +125,3 @@
+            let buttonInfo = buttonInfos[i];
+
+            let xAlignment;

This style fixup belongs in a separate patch.
Comment 22 Stéphane Démurget 2012-11-05 14:22:51 UTC
Comment on attachment 227836 [details] [review]
panel: do not accumulate icon animations

This is obsolete since bug 687583 is fixed.
Comment 23 Stéphane Démurget 2012-11-05 14:44:41 UTC
(In reply to comment #17)
> Jasper, I made the same mistake as in #687112: I only changed the unlock dialog
> and not the login one, so the 3td patch will need more work.

I prefer to attach my updated patches anyway so they are not lost, hence the next attachments.
Comment 24 Stéphane Démurget 2012-11-05 14:49:02 UTC
Created attachment 228121 [details] [review]
modalDialog: give more control over the layout

Make the button layout public for callers to be able to have more
control over like adding custom widgets. Also, the clearButtons and
addButton methods are added as convenience for the most frequent usage.

Note: I added clearButtons because I need that in the LoginDialog and it
makes sense to have a way to clear them properly.
Comment 25 Stéphane Démurget 2012-11-05 16:12:10 UTC
Created attachment 228140 [details] [review]
Login: better process indication

We need to do a better job of indicating login process. This can
sometimes take a few seconds (particularly if you get your password
wrong): we need to give better feedback of what's going on.

In particular:

 - The password field insensitive look must match the mockup
 - "Login as another user..." should be insensitive
 - If authorisation takes more than about half a second, we should
   show a spinner next to the login button
Comment 26 Allan Day 2012-11-07 14:34:31 UTC
This doesn't apply for me.
Comment 27 Stéphane Démurget 2012-11-18 13:15:13 UTC
Allan, I'll rebase once bug 687848 is fixed. Basically this could have been committed without the login part since I suppose the "shared widget" will be based on the unlock dialog as it seems more "correct".
Comment 28 Jasper St. Pierre (not reading bugmail) 2012-11-18 15:17:13 UTC
Don't wait on that for now.
Comment 29 Stéphane Démurget 2012-11-18 22:15:10 UTC
Comment on attachment 228140 [details] [review]
Login: better process indication

I've split this patch, see upcoming comment about the patch series.
Comment 30 Stéphane Démurget 2012-11-18 22:16:47 UTC
Created attachment 229311 [details] [review]
modalDialog: give more control over the layout

Make the button layout public for callers to be able to have more
control over like adding custom widgets. Also, the clearButtons and
addButton methods are added as convenience for the most frequent usage.
Comment 31 Stéphane Démurget 2012-11-18 22:17:00 UTC
Created attachment 229312 [details] [review]
modalDialog: do not launch disabled button actions

The "Sign In" button of the login dialog has its look disabled when the
entry is empty, but it can still be triggered by the Enter key.

This fixes the modal dialog so it does not trigger the action of an
insensitive button, and also means we do not need to connect to the
"activate" signal of the entry anymore.
Comment 32 Stéphane Démurget 2012-11-18 22:17:08 UTC
Created attachment 229313 [details] [review]
Login: sensitivity fixes

The login dialog had these issues:
  - the entry was not really disabled, you could still edit text
  - the sensitivity state was not reset on verification failure
  - the session list was not disabled

The unlock dialog had these issues:
  - "Login as another user..." was not insensitive
  - redundant password char setting, overwriting the one given by the
    question

The entry insensitive style was also wrong.
Comment 33 Stéphane Démurget 2012-11-18 22:17:17 UTC
Created attachment 229314 [details] [review]
Login: add a spinner for better process indication

We need to do a better job of indicating login process. This can
sometimes take a few seconds (particularly if you get your password
wrong): we need to give better feedback of what's going on.

This adds a spinner next to the login button if the authorization takes
some time.
Comment 34 Stéphane Démurget 2012-11-18 22:27:25 UTC
(In reply to comment #28)
> Don't wait on that for now.
My bad, I did not understand that when you told me about sharing the widgets. I really need to read between the lines better :)

I've reworked the patch series after rebasing:
- to fix all those little issues I talked about in the login dialog (entry still editable when log in, still look disabled after one try)
- to also fix the modal dialog where the sign in button could still be activated when disabled (did not spot that one before)

The last patch "better process indication" was becoming quite big because it needs some moves in login dialog, so I split it in two:
- one to fix all the sensitivity bugs (including the style)
- one to add the spinner

I hope this will ease reviewing.
Comment 35 Jasper St. Pierre (not reading bugmail) 2012-11-18 22:28:16 UTC
Review of attachment 229311 [details] [review]:

Sure; I'm fine with this.
Comment 36 Jasper St. Pierre (not reading bugmail) 2012-11-18 22:29:46 UTC
Review of attachment 229312 [details] [review]:

I'd rather have a buttonKeys that mapped to the buttonInfo, so that way we wouldn't need two maps, but only one.
Comment 37 Jasper St. Pierre (not reading bugmail) 2012-11-18 22:32:57 UTC
Review of attachment 229313 [details] [review]:

Seems fine to me.
Comment 38 Jasper St. Pierre (not reading bugmail) 2012-11-18 22:36:04 UTC
Review of attachment 229314 [details] [review]:

Seems fine to me.
Comment 39 Stéphane Démurget 2012-11-18 23:30:12 UTC
Created attachment 229323 [details] [review]
modalDialog: do not launch disabled button actions

The "Sign In" button of the login dialog has its look disabled when the
entry is empty, but it can still be triggered by the Enter key.

This fixes the modal dialog so it does not trigger the action of an
insensitive button, and also means we do not need to connect to the
"activate" signal of the entry anymore.
Comment 40 Allan Day 2012-11-20 11:54:27 UTC
Seems that there's a patch here that needs reviewing...
Comment 41 Jasper St. Pierre (not reading bugmail) 2012-11-20 15:52:31 UTC
Review of attachment 229323 [details] [review]:

Sure, looks fine.
Comment 42 Jasper St. Pierre (not reading bugmail) 2012-11-20 15:52:55 UTC
I guess I didn't hit the "Publish" button hard enough when I reviewed it the first time.
Comment 43 Stéphane Démurget 2012-11-20 20:11:01 UTC
Attachment 229311 [details] pushed as c10e4c3 - modalDialog: give more control over the layout
Attachment 229313 [details] pushed as c3cab28 - Login: sensitivity fixes
Attachment 229314 [details] pushed as 59a7fdd - Login: add a spinner for better process indication
Attachment 229323 [details] pushed as 4c55a6f - modalDialog: do not launch disabled button actions
Comment 44 Allan Day 2012-11-20 20:25:27 UTC
Yaaaay!
Comment 45 Giovanni Campagna 2012-11-20 21:49:40 UTC
The UnlockDialog patches are wrong.
The isPassword and password_char bits were there to allow typing the password after a failure but before the first question for the new attempt came.
Without that code, in complex PAM setups you can end up with a visible password.
Comment 46 Stéphane Démurget 2012-11-20 23:15:49 UTC
Created attachment 229517 [details] [review]
unlockDialog: set password char on verif. failure

Commit c3cab28 removed bits setting the password char that was used to
allow typing the password after a failure but before the first question
for the new attempt came.

Without that code, in complex PAM setups you can end up with a visible
password.
Comment 47 Stéphane Démurget 2012-11-20 23:19:01 UTC
Sorry for that, I knew I should have let this code intact. I saw differences between the login and the unlock dialogs, but this should have been kept for bug 687848 as there are many implementation differences (the handling of the first question for instance). The unlock dialog seems to be more polished in this domain.
Comment 48 Giovanni Campagna 2012-11-20 23:23:09 UTC
Review of attachment 229517 [details] [review]:

Yes
Comment 49 Stéphane Démurget 2012-11-20 23:28:27 UTC
Attachment 229517 [details] pushed as 393c238 - unlockDialog: set password char on verif. failure