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 681143 - Improvements to the screen shield and unlock dialog
Improvements to the screen shield and unlock dialog
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on: 681168 681576 682041
Blocks:
 
 
Reported: 2012-08-03 15:03 UTC by Giovanni Campagna
Modified: 2012-09-14 15:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ScreenShield: lower the autodrag threshold to 10% (934 bytes, patch)
2012-08-03 15:46 UTC, Giovanni Campagna
committed Details | Review
ScreenShield: blur and desaturate the screenshield background (1.39 KB, patch)
2012-08-03 16:41 UTC, Giovanni Campagna
needs-work Details | Review
theme: Use the noise texture for the background of the screen shield (100.08 KB, patch)
2012-08-03 17:00 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
UnlockDialog: allow going back to the lock screen by pressing escape (2.56 KB, patch)
2012-08-03 17:27 UTC, Giovanni Campagna
committed Details | Review
ScreenShield: when explicitly locking, tween the shield from the top (2.77 KB, patch)
2012-08-03 17:52 UTC, Giovanni Campagna
reviewed Details | Review
ScreenShield: handle Escape on the stage, not on the lock screen (2.49 KB, patch)
2012-08-03 20:58 UTC, Giovanni Campagna
rejected Details | Review
ScreenShield: bump the lock screen slightly when pressing a key (2.14 KB, patch)
2012-08-03 21:32 UTC, Giovanni Campagna
none Details | Review
ScreenShield: constrain vertical movement of the screen lock (1.48 KB, patch)
2012-08-03 22:15 UTC, Giovanni Campagna
needs-work Details | Review
ScreenShield: update the displayed title when the source changes (2.41 KB, patch)
2012-08-03 23:18 UTC, Giovanni Campagna
none Details | Review
NotificationDaemon: don't override the title for app notifications (1.15 KB, patch)
2012-08-06 14:35 UTC, Giovanni Campagna
committed Details | Review
ScreenShield: update the displayed title when the source changes (1.55 KB, patch)
2012-08-06 14:35 UTC, Giovanni Campagna
committed Details | Review
Only show new notifications in the screen shield (9.54 KB, patch)
2012-08-06 15:45 UTC, Giovanni Campagna
none Details | Review
Only show new notifications in the screen shield (9.88 KB, patch)
2012-08-06 16:07 UTC, Giovanni Campagna
needs-work Details | Review
ScreenSheild: make notification view scrollable (3.10 KB, patch)
2012-08-06 17:03 UTC, Giovanni Campagna
committed Details | Review
ScreenShield: fix spacing of notifications and sources (4.28 KB, patch)
2012-08-06 18:45 UTC, Giovanni Campagna
committed Details | Review
MessageTray: fix restoring focus when the notification is destroyed (3.06 KB, patch)
2012-08-07 12:46 UTC, Giovanni Campagna
rejected Details | Review
ScreenShield: when explicitly locking, tween the shield from the top (5.66 KB, patch)
2012-08-07 13:35 UTC, Giovanni Campagna
reviewed Details | Review
Only show new notifications in the screen shield (12.27 KB, patch)
2012-08-07 13:40 UTC, Giovanni Campagna
committed Details | Review
Login/UnlockDialog: don't reset immediately if auth fails (8.01 KB, patch)
2012-08-07 15:40 UTC, Giovanni Campagna
none Details | Review
UnlockDialog: Move "Login as another user" at the bottom (6.79 KB, patch)
2012-08-07 15:40 UTC, Giovanni Campagna
committed Details | Review
Unlock: place the prompt above the entry, rather than on the side (1.03 KB, patch)
2012-08-07 15:58 UTC, Giovanni Campagna
committed Details | Review
ScreenShield: prepare the dialog when the user starts dragging (3.73 KB, patch)
2012-08-07 16:09 UTC, Giovanni Campagna
committed Details | Review
ScreenShield: when explicitly locking, tween the shield from the top (5.43 KB, patch)
2012-08-07 18:38 UTC, Giovanni Campagna
committed Details | Review
Login/UnlockDialog: don't reset immediately if auth fails (8.02 KB, patch)
2012-08-07 18:40 UTC, Giovanni Campagna
reviewed Details | Review
Login/UnlockDialog: don't reset immediately if auth fails (9.97 KB, patch)
2012-08-13 16:24 UTC, Giovanni Campagna
none Details | Review
ScreenShield: bump the lock screen slightly when pressing a key (2.34 KB, patch)
2012-08-13 16:28 UTC, Giovanni Campagna
committed Details | Review
ScreenShield: constrain vertical movement of the screen lock (1.56 KB, patch)
2012-08-13 23:31 UTC, Giovanni Campagna
committed Details | Review
ScreenShield: animate going from the unlock dialog to the lock screen (2.47 KB, patch)
2012-08-13 23:44 UTC, Giovanni Campagna
committed Details | Review
UserMenu: show a padlock icon in the screenshield (3.00 KB, patch)
2012-08-14 11:29 UTC, Giovanni Campagna
rejected Details | Review
Hide user menu and a11y menu in the screen lock (1.42 KB, patch)
2012-08-16 17:03 UTC, Giovanni Campagna
committed Details | Review
UnlockDialog: remove hover effect from the avatar widget (2.08 KB, patch)
2012-08-16 20:25 UTC, Giovanni Campagna
committed Details | Review
ScreenShield: Fix updating visibility of the notification box (2.42 KB, patch)
2012-08-16 20:42 UTC, Giovanni Campagna
needs-work Details | Review
UnlockDialog: add an explicit cancel button (2.33 KB, patch)
2012-08-16 20:57 UTC, Giovanni Campagna
committed Details | Review
ScreenShield: Fix updating visibility of the notification box (2.20 KB, patch)
2012-08-16 20:59 UTC, Giovanni Campagna
committed Details | Review
ScreenShield: hide Removable devices in the lock screen (1.93 KB, patch)
2012-08-16 21:12 UTC, Giovanni Campagna
committed Details | Review
ScreenShield: reduce curtain sliding time to 0.5 seconds (962 bytes, patch)
2012-08-16 23:18 UTC, Giovanni Campagna
committed Details | Review
Login/UnlockDialog: don't reset immediately if auth fails (10.00 KB, patch)
2012-08-21 19:54 UTC, Giovanni Campagna
none Details | Review

Description Giovanni Campagna 2012-08-03 15:03:10 UTC
Meta bug to implement the suggestions in https://live.gnome.org/ThreePointFive/Features/ScreenLock/BoF
Comment 1 Jasper St. Pierre (not reading bugmail) 2012-08-03 15:05:57 UTC
> Should use the system level theme for the background - same as in the message tray (with the texture)

I did this in the wip/message-tray branch

http://git.gnome.org/browse/gnome-shell/commit/?h=wip/message-tray&id=47f347b92eb4afec74de8db54b8d4a2f3b686a8e

requires patches from https://bugzilla.gnome.org/show_bug.cgi?id=680801
Comment 2 Giovanni Campagna 2012-08-03 15:46:54 UTC
Created attachment 220256 [details] [review]
ScreenShield: lower the autodrag threshold to 10%

The threshold is there just to ensure that the user is opening
the curtain on purpose. Requiring 40% is too much for that.
Comment 3 Giovanni Campagna 2012-08-03 16:41:45 UTC
Created attachment 220266 [details] [review]
ScreenShield: blur and desaturate the screenshield background

The background is the same as the normal desktop, so we blur and
desaturate it to clearly show that it's not the normal system state.

Includes a noticeable slowdown due to GLSL shading and FBO redirection.
Comment 4 Jasper St. Pierre (not reading bugmail) 2012-08-03 16:56:30 UTC
Review of attachment 220266 [details] [review]:

Sure.
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-08-03 17:00:50 UTC
Created attachment 220269 [details] [review]
theme: Use the noise texture for the background of the screen shield
Comment 6 Giovanni Campagna 2012-08-03 17:20:41 UTC
Review of attachment 220269 [details] [review]:

And clearly so!
Comment 7 Jasper St. Pierre (not reading bugmail) 2012-08-03 17:26:54 UTC
Comment on attachment 220269 [details] [review]
theme: Use the noise texture for the background of the screen shield

Attachment 220269 [details] pushed as ed991f7 - theme: Use the noise texture for the background of the screen shield
Comment 8 Giovanni Campagna 2012-08-03 17:27:17 UTC
Created attachment 220273 [details] [review]
UnlockDialog: allow going back to the lock screen by pressing escape
Comment 9 Jasper St. Pierre (not reading bugmail) 2012-08-03 17:32:20 UTC
Review of attachment 220273 [details] [review]:

Sure.
Comment 10 Giovanni Campagna 2012-08-03 17:52:17 UTC
Created attachment 220274 [details] [review]
ScreenShield: when explicitly locking, tween the shield from the top

The curtain should appear to be an overlay on top of the system,
and since it is lifted by dragging up, it makes sense to slide it
down on lock.
Comment 11 Giovanni Campagna 2012-08-03 17:53:42 UTC
Comment on attachment 220266 [details] [review]
ScreenShield: blur and desaturate the screenshield background

Togheter with the new animation, this lags a lot here. (Intel GM45, with Core 2 Duo CPU).

Needs a better implementation.
Comment 12 Giovanni Campagna 2012-08-03 17:55:14 UTC
Comment on attachment 220273 [details] [review]
UnlockDialog: allow going back to the lock screen by pressing escape

Attachment 220273 [details] pushed as 413ace2 - UnlockDialog: allow going back to the lock screen by pressing escape
Comment 13 Giovanni Campagna 2012-08-03 20:58:44 UTC
Created attachment 220287 [details] [review]
ScreenShield: handle Escape on the stage, not on the lock screen

This allows to press esc to unlock even if the focus is not on
the lock screen (for example after dismissing the auth failure
notification).
Comment 14 Jasper St. Pierre (not reading bugmail) 2012-08-03 21:01:59 UTC
The focus shouldn't be on the stage in that case. When the message tray pops up, it stores the current focus, and then tries to go back to it once done.
Comment 15 Giovanni Campagna 2012-08-03 21:32:31 UTC
Created attachment 220290 [details] [review]
ScreenShield: bump the lock screen slightly when pressing a key

When pressing a key different from escape (one thus that has no
effect), bump the screen up, to indicate that it eats keyboard
input and it must be lifted up.
Comment 16 Jasper St. Pierre (not reading bugmail) 2012-08-03 21:57:30 UTC
Review of attachment 220290 [details] [review]:

::: js/ui/screenShield.js
@@ +442,3 @@
+                           transition: 'easeOutQuad',
+                           onComplete: function() {
+                               Tweener.addTween(this,

Ugh. Have you considered writing a custom curve?
Comment 17 Giovanni Campagna 2012-08-03 22:02:09 UTC
(In reply to comment #16)
> Review of attachment 220290 [details] [review]:
> 
> ::: js/ui/screenShield.js
> @@ +442,3 @@
> +                           transition: 'easeOutQuad',
> +                           onComplete: function() {
> +                               Tweener.addTween(this,
> 
> Ugh. Have you considered writing a custom curve?

Yes. But apparently tweener will set the property to the final value at the end of the transition "just in case", and so the curtain stays up.
Comment 18 Giovanni Campagna 2012-08-03 22:15:46 UTC
Created attachment 220296 [details] [review]
ScreenShield: constrain vertical movement of the screen lock

Don't allow dragging the screen lock above and below the screen,
as in particular dragging below breaks the illusion of the curtain.
Comment 19 Giovanni Campagna 2012-08-03 23:18:33 UTC
Created attachment 220298 [details] [review]
ScreenShield: update the displayed title when the source changes

Notifications in the lock screen need to watch signals on source
and react accordingly.
At the same time, don't allow the appname provided by the notifications
protocol to override the app name obtained via the app system (if
one is present).
This fixes the "XChat-GNOME OSD" problem.
Comment 20 Jasper St. Pierre (not reading bugmail) 2012-08-03 23:25:27 UTC
Review of attachment 220298 [details] [review]:

This should be two separate patches.
Comment 21 Giovanni Campagna 2012-08-06 14:35:34 UTC
Created attachment 220453 [details] [review]
NotificationDaemon: don't override the title for app notifications

If a source is associated with an app, ignore the app name provided
by libnotify, as that is often garbage.
This fixes the "XChat-GNOME OSD" problem.
Comment 22 Giovanni Campagna 2012-08-06 14:35:53 UTC
Created attachment 220454 [details] [review]
ScreenShield: update the displayed title when the source changes

Notifications in the lock screen need to watch signals on source
and react accordingly.
Comment 23 Giovanni Campagna 2012-08-06 15:45:01 UTC
Created attachment 220461 [details] [review]
Only show new notifications in the screen shield

Rework the count system in Source, to distinguish between the
normal notification count and the count of unseen/unacknowledged
notification. (A notification is considered unacknowledged until
shown, as a banner or inside the summary box pointer).
Includes some code cleanups and a test for multiple notifications
in the same source.

This is on top of bug 680426 but not wip/message-tray. Rebasing is
however trivial.
Comment 24 Giovanni Campagna 2012-08-06 16:07:24 UTC
Created attachment 220466 [details] [review]
Only show new notifications in the screen shield

Rework the count system in Source, to distinguish between the
normal notification count and the count of unseen/unacknowledged
notification. (A notification is considered unacknowledged until
shown, as a banner or inside the summary box pointer).
Includes some code cleanups and a test for multiple notifications
in the same source.
Comment 25 Giovanni Campagna 2012-08-06 17:03:58 UTC
Created attachment 220476 [details] [review]
ScreenSheild: make notification view scrollable

Place a maximum height on the notification view, and show scrollbars
if the list of persistent sources would overflow.
Comment 26 Giovanni Campagna 2012-08-06 18:45:31 UTC
Created attachment 220485 [details] [review]
ScreenShield: fix spacing of notifications and sources

Reduce padding around persistent sources, and ensure that spacing
around resident notifications is only applied once.
Also, add some padding to the clock.
Comment 27 Jasper St. Pierre (not reading bugmail) 2012-08-06 20:39:52 UTC
Review of attachment 220453 [details] [review]:

Yes.
Comment 28 Jasper St. Pierre (not reading bugmail) 2012-08-06 20:39:59 UTC
Review of attachment 220454 [details] [review]:

OK.
Comment 29 Jasper St. Pierre (not reading bugmail) 2012-08-06 20:49:40 UTC
Review of attachment 220256 [details] [review]:

Sure.
Comment 30 Jasper St. Pierre (not reading bugmail) 2012-08-06 20:56:30 UTC
Review of attachment 220476 [details] [review]:

::: data/theme/gnome-shell.css
@@ +2232,3 @@
     background-color: rgba(0.0, 0.0, 0.0, 0.9);
     border: 2px solid #868686;
+    max-height: 500px;

...

At some point I wish we had something like CSS does, like:

   "top: 20px; bottom: 20px"

and it constraints its height to that of the parent container.

(Don't take this as a cue to start implementing this, though, this is fine.)

::: js/ui/screenShield.js
@@ +82,3 @@
         this.actor = new St.BoxLayout({ vertical: true,
+                                       name: 'screenShieldNotifications',
+                                       style_class: 'screen-shield-notifications-box' });

Indentation issues?
Comment 31 Jasper St. Pierre (not reading bugmail) 2012-08-06 20:57:50 UTC
Review of attachment 220485 [details] [review]:

Sure, looks fine.

::: js/ui/messageTray.js
@@ -1308,3 @@
         this.actor.child = this._sourceBox;
 
-        this.notificationStackView = new St.ScrollView({ name: source.isChat ? '' : 'summary-notification-stack-scrollview',

This is really weird for me. We need to re-do this at some point.
Comment 32 Florian Müllner 2012-08-06 21:01:45 UTC
Review of attachment 220274 [details] [review]:

Better than what we had, but the animation still doesn't feel right - sliding the shield from the top is good, but the lock "background" just magically appears; we probably want a fade there (though we currently use the shield's parent, needs design input I guess)

::: js/ui/screenShield.js
@@ +32,3 @@
 // SHORT_FADE_TIME is used when requesting lock explicitly from the user menu
 const STANDARD_FADE_TIME = 10;
+const SHORT_FADE_TIME = 0.8;

Kinda unrelated, but OK
Comment 33 Florian Müllner 2012-08-06 21:02:51 UTC
Review of attachment 220287 [details] [review]:

Minor comment, otherwise looks good

::: js/ui/screenShield.js
@@ +495,3 @@
         this._arrow.show();
 
+        if (!this._stageKeyHandler)

I'd prefer an explicit
  this._stageKeyHandler = 0;
in _init()
Comment 34 Florian Müllner 2012-08-06 21:03:37 UTC
Review of attachment 220476 [details] [review]:

Minor nit: ScreenSheild in the commit message
Comment 35 Jasper St. Pierre (not reading bugmail) 2012-08-06 21:04:44 UTC
Review of attachment 220287 [details] [review]:

As I said before, this is wrong. The message tray should restore focus to what was there before. We need to investigate that.
Comment 36 Giovanni Campagna 2012-08-06 21:11:16 UTC
Attachment 220256 [details] pushed as a29ceaa - ScreenShield: lower the autodrag threshold to 10%
Attachment 220453 [details] pushed as 1e37969 - NotificationDaemon: don't override the title for app notifications
Attachment 220454 [details] pushed as 59dfb58 - ScreenShield: update the displayed title when the source changes
Attachment 220476 [details] pushed as 59cd9b4 - ScreenSheild: make notification view scrollable
Attachment 220485 [details] pushed as 8d7fa54 - ScreenShield: fix spacing of notifications and sources
Comment 37 Florian Müllner 2012-08-06 21:32:02 UTC
Review of attachment 220296 [details] [review]:

Looks good, but depends on pending clutter changes - in the meanwhile, https://bugzilla.gnome.org/show_bug.cgi?id=681168#c6 is probably a good idea
Comment 38 Giovanni Campagna 2012-08-06 21:55:18 UTC
(In reply to comment #37)
> Review of attachment 220296 [details] [review]:
> 
> Looks good, but depends on pending clutter changes - in the meanwhile,
> https://bugzilla.gnome.org/show_bug.cgi?id=681168#c6 is probably a good idea

Do you want it for 3.5.5?
Otherwise, I can fix the clutter patch before 3.5.90 / API freeze.
Comment 39 Florian Müllner 2012-08-06 22:50:56 UTC
Review of attachment 220466 [details] [review]:

::: js/ui/messageTray.js
@@ +950,3 @@
 
+    acknowledge: function() {
+        this.acknowledged = true;

Please set acknowledged explicitly to false in _init()

@@ +951,3 @@
+    acknowledge: function() {
+        this.acknowledged = true;
+        this.emit('acknowledged');

Unused signal

@@ +1165,3 @@
+
+    countUpdated: function() {
+        this.emit('count-changed');

Nit: mismatch of function and signal name is a bit odd

@@ +1224,2 @@
     notify: function(notification) {
+        notification.acknowledged = false;

Mmmh,
  notification.acknowledged = false;
vs.
  notification.acknowledge();

Pick one

@@ +1843,3 @@
                 this._reNotifyAfterHideNotification = notification;
+            } else {
+                // The summary box pointer is showing or shown.

... or hidden?

@@ +2547,3 @@
+                    let sameSource = this._summaryBoxPointerItem.source == notification.source;
+                    if (sameSource)
+                        notification.acknowledge();

Ugh - not a fan of filter functions with side effects

::: js/ui/screenShield.js
@@ +128,3 @@
     },
 
+    _makeNotificationCountText: function(source, count) {

Not clear why you add the count parameter instead of doing
  let count = source.unseenCount;

If you want the additional parameter,
  function(count, isChat)
makes more sense to me

::: js/ui/telepathyClient.js
@@ +640,1 @@
     _updateCount: function() {

I suspect some subtle bugs here, as all previous calls to _updateCount() in messageTray.js are now effectively ignored. Can't you just do

get count() {
    return this._pendingMessages.length;
},

get unseenCount() {
    return this.count;
}?

::: tests/Makefile.am
@@ +16,3 @@
 	interactive/icons.js			\
 	interactive/inline-style.js		\
+	interactive/notify-ack.js		\

libnotify has a rather extensive test suite - if it's missing something important, better to add the test there imo
Comment 40 Florian Müllner 2012-08-07 00:03:16 UTC
(In reply to comment #38)
> > Looks good, but depends on pending clutter changes - in the meanwhile,
> > https://bugzilla.gnome.org/show_bug.cgi?id=681168#c6 is probably a good idea
> 
> Do you want it for 3.5.5?

I guess we can do without (can't say I care deeply about unstable tarballs ;-)
Comment 41 Giovanni Campagna 2012-08-07 10:53:23 UTC
(In reply to comment #32)
> Review of attachment 220274 [details] [review]:
> 
> Better than what we had, but the animation still doesn't feel right - sliding
> the shield from the top is good, but the lock "background" just magically
> appears; we probably want a fade there (though we currently use the shield's
> parent, needs design input I guess)
> 
> ::: js/ui/screenShield.js
> @@ +32,3 @@
>  // SHORT_FADE_TIME is used when requesting lock explicitly from the user menu
>  const STANDARD_FADE_TIME = 10;
> +const SHORT_FADE_TIME = 0.8;
> 
> Kinda unrelated, but OK

Initially, I had the whole lock screen tween from the top (including the background). The problem with that is the watchdog, which is spawned before locking and draws a full black window.
Comment 42 Giovanni Campagna 2012-08-07 11:00:55 UTC
(In reply to comment #39)
> Review of attachment 220466 [details] [review]:
> 
> @@ +1165,3 @@
> +
> +    countUpdated: function() {
> +        this.emit('count-changed');
> 
> Nit: mismatch of function and signal name is a bit odd

It is intentionally similar to icon-changed/iconUpdated in bug 680426

> @@ +1224,2 @@
>      notify: function(notification) {
> +        notification.acknowledged = false;
> 
> Mmmh,
>   notification.acknowledged = false;
> vs.
>   notification.acknowledge();
> 
> Pick one
> 
> @@ +1843,3 @@
>                  this._reNotifyAfterHideNotification = notification;
> +            } else {
> +                // The summary box pointer is showing or shown.
> 
> ... or hidden?

If hidden, this._summaryBoxPointerItem is cleared.

> 
> ::: js/ui/screenShield.js
> @@ +128,3 @@
>      },
> 
> +    _makeNotificationCountText: function(source, count) {
> 
> Not clear why you add the count parameter instead of doing
>   let count = source.unseenCount;

In the non telepathy case, source.unseenCount is potentially slow (O(N)), so this is an optimization.
Comment 43 Florian Müllner 2012-08-07 12:06:09 UTC
(In reply to comment #41)
> Initially, I had the whole lock screen tween from the top (including the
> background). 

That doesn't sound right either - IMHO the "correct" animation would fade in the background while sliding in the shield from the top.


> The problem with that is the watchdog, which is spawned before
> locking and draws a full black window.

Right, we would need to not show the watchdog window (in the compositor that is, we obviously need to open/map the window on the server). In any case, all those are perfectly fine as future improvements ...


(In reply to comment #42)
> > Nit: mismatch of function and signal name is a bit odd
> 
> It is intentionally similar to icon-changed/iconUpdated in bug 680426


You mean the last patch? That one uses icon-updated/iconUpdated, which is perfectly fine. (If you are referring to another patch, chances are I'd consider that odd as well ;-)


> > ... or hidden?
> 
> If hidden, this._summaryBoxPointerItem is cleared.

... which is not immediately obvious, so a comment would be appropriate IMO



> In the non telepathy case, source.unseenCount is potentially slow (O(N)), so
> this is an optimization.

You mean because you use it as well to update actor.visible? Frankly, I suspect that a large number of notifications becomes a UI problem long before affecting performance (iterating over 100 notifications shouldn't be too bad, having a scrolled list of 100 notifications crammed together in a boxpointer otoh ...)

Still, as mentioned before, I'm fine with the alternative of replacing the source parameter with source.isChat
Comment 44 Jasper St. Pierre (not reading bugmail) 2012-08-07 12:46:08 UTC
(In reply to comment #43)
> (In reply to comment #42)
> > > Nit: mismatch of function and signal name is a bit odd
> > 
> > It is intentionally similar to icon-changed/iconUpdated in bug 680426
> 
> 
> You mean the last patch? That one uses icon-updated/iconUpdated, which is
> perfectly fine. (If you are referring to another patch, chances are I'd
> consider that odd as well ;-)

It was originally icon-changed, to match count-changed. I changed it because I thought the function consistency was better than the signal consistency. We should probably fix it to be count-updated as well.
Comment 45 Giovanni Campagna 2012-08-07 12:46:40 UTC
Created attachment 220549 [details] [review]
MessageTray: fix restoring focus when the notification is destroyed

- Emit Notification::destroy before actually destroying the actor, so
  that MessageTray (through FocusGrabber) has a chance to restore
  focus before Clutter assigns it to the stage
- Don't reenter a transient animation state if the final state is
  already reached, otherwise the state machine gets confused and
  destroyed notifications are not cleaned up properly.

This is a second attempt to solve the esc problem. I'm a lot less confident
in this, since the message tray state machine has a lot of edge cases.
Comment 46 Jasper St. Pierre (not reading bugmail) 2012-08-07 12:48:08 UTC
Note that I thought we already had some mechanism for unseen vs. seen notifications that was used in some tracking somewhere.
Comment 47 Giovanni Campagna 2012-08-07 13:35:25 UTC
Created attachment 220555 [details] [review]
ScreenShield: when explicitly locking, tween the shield from the top

The curtain should appear to be an overlay on top of the system,
and since it is lifted by dragging up, it makes sense to slide it
down on lock.
Comment 48 Giovanni Campagna 2012-08-07 13:40:26 UTC
Created attachment 220556 [details] [review]
Only show new notifications in the screen shield

Rework the count system in Source, to distinguish between the
normal notification count and the count of unseen/unacknowledged
notification. (A notification is considered unacknowledged until
shown, as a banner or inside the summary box pointer).
Includes some code cleanups and a test for multiple notifications
in the same source.
Comment 49 Giovanni Campagna 2012-08-07 15:40:06 UTC
Created attachment 220572 [details] [review]
Login/UnlockDialog: don't reset immediately if auth fails

Instead of showing a notification, add a small message immediately
below the entry, and give the user two more attempts to login,
before going back to the welcome or lock screen.
Comment 50 Giovanni Campagna 2012-08-07 15:40:17 UTC
Created attachment 220573 [details] [review]
UnlockDialog: Move "Login as another user" at the bottom

The Unlock button is more logically related to the entry than
this link, and having the latter in the middle breaks the workflow.
Comment 51 Giovanni Campagna 2012-08-07 15:58:55 UTC
Created attachment 220575 [details] [review]
Unlock: place the prompt above the entry, rather than on the side

As indicated in the mockups
Comment 52 Florian Müllner 2012-08-07 16:07:20 UTC
Review of attachment 220556 [details] [review]:

I still think the notification test belongs into libnotify (or just be kept private); I can see how the timeouts are useful for testing unseen notifications on the screen shield, but a month or so from now on the test will just appear completely arbitrary. Other than that looks good!
Comment 53 Giovanni Campagna 2012-08-07 16:09:25 UTC
Created attachment 220576 [details] [review]
ScreenShield: prepare the dialog when the user starts dragging

This way if the user drags long enough it will see the dialog
below the curtain, and it will appear as it was always there.
Comment 54 Giovanni Campagna 2012-08-07 16:12:01 UTC
Comment on attachment 220556 [details] [review]
Only show new notifications in the screen shield

Attachment 220556 [details] pushed as aa733b5 - Only show new notifications in the screen shield
Pushed without the test. I still have it locally, but I don't think it belongs in
libnotify (it's not testing the protocol, just the very special policies of gnome-shell)
Comment 55 Florian Müllner 2012-08-07 16:55:22 UTC
Review of attachment 220555 [details] [review]:

::: js/ui/screenShield.js
@@ +305,3 @@
         this._lockScreenGroup.add_action(action);
 
+        this._lockDialogGroup = new Shell.GenericContainer({ name: 'lockDialogGroup' });

So are we still not confident enough to inherit from StWidget? Not to mention that there *must* be a nicer way to enforce the lock dialog's size/position ...
Comment 56 Florian Müllner 2012-08-07 17:19:27 UTC
Review of attachment 220576 [details] [review]:

Looks reasonable except for one assumed typo (disclaimer: I didn't actually test the patch)

::: js/ui/screenShield.js
@@ +482,3 @@
                                time: time,
                                transition: 'linear',
+                               onComplete: function() { this.hide(); }

this._lockScreenGroup.hide() I assume?

@@ -524,3 @@
     _resetLockScreen: function(animate) {
         this._lockScreenGroup.show();
-        this._arrow.show();

_arrow.show()/hide() not necessary?
Comment 57 Giovanni Campagna 2012-08-07 17:22:16 UTC
(In reply to comment #56)
> Review of attachment 220576 [details] [review]:
> 
> Looks reasonable except for one assumed typo (disclaimer: I didn't actually
> test the patch)
> 
> ::: js/ui/screenShield.js
> @@ +482,3 @@
>                                 time: time,
>                                 transition: 'linear',
> +                               onComplete: function() { this.hide(); }
> 
> this._lockScreenGroup.hide() I assume?

No, this.hide: absent onCompleteScope, the function is invoked with the tweened actor as this.

> @@ -524,3 @@
>      _resetLockScreen: function(animate) {
>          this._lockScreenGroup.show();
> -        this._arrow.show();
> 
> _arrow.show()/hide() not necessary?

No, we're hiding its container anyway. It was probably a left over from when arrow was a sibling of the two groups.
Comment 58 Florian Müllner 2012-08-07 17:31:47 UTC
Review of attachment 220573 [details] [review]:

I'd prefer a separate patch for making _dialogLayout public, otherwise good
Comment 59 Florian Müllner 2012-08-07 17:33:38 UTC
Review of attachment 220575 [details] [review]:

Sure
Comment 60 Florian Müllner 2012-08-07 17:37:42 UTC
Review of attachment 220572 [details] [review]:

Looks reasonable at first sight, but needs testing - currently the patch assumes the PIN changes
Comment 61 Giovanni Campagna 2012-08-07 18:17:58 UTC
(In reply to comment #55)
> Review of attachment 220555 [details] [review]:
> 
> ::: js/ui/screenShield.js
> @@ +305,3 @@
>          this._lockScreenGroup.add_action(action);
> 
> +        this._lockDialogGroup = new Shell.GenericContainer({ name:
> 'lockDialogGroup' });
> 
> So are we still not confident enough to inherit from StWidget? Not to mention
> that there *must* be a nicer way to enforce the lock dialog's size/position ...

I don't think there is, short of making my own layout manager that acts like BinLayout but respects fixed position.
Comment 62 Giovanni Campagna 2012-08-07 18:37:05 UTC
Attachment 220573 [details] pushed as 03db0d6 - UnlockDialog: Move "Login as another user" at the bottom
Comment 63 Giovanni Campagna 2012-08-07 18:38:27 UTC
Created attachment 220590 [details] [review]
ScreenShield: when explicitly locking, tween the shield from the top

The curtain should appear to be an overlay on top of the system,
and since it is lifted by dragging up, it makes sense to slide it
down on lock.

Using StWidget now.
Comment 64 Giovanni Campagna 2012-08-07 18:40:59 UTC
Created attachment 220591 [details] [review]
Login/UnlockDialog: don't reset immediately if auth fails

Instead of showing a notification, add a small message immediately
below the entry, and give the user two more attempts to login,
before going back to the welcome or lock screen.

Rebased to avoid the PIN dependency. Tested locally, both the login
and unlock paths seem to work, although the login part could use some
testing in a real system, rather than faking it inside the session.
Comment 65 Florian Müllner 2012-08-07 19:22:29 UTC
Review of attachment 220590 [details] [review]:

Yeah, I like that better (still time to switch back to GenericContainer if necessary)
Comment 66 Florian Müllner 2012-08-07 19:25:47 UTC
Review of attachment 220591 [details] [review]:

I generally like how this works, but let's keep this out of the release for now:

::: js/gdm/loginDialog.js
@@ +696,3 @@
         this._userVerifier = new GdmUtil.ShellUserVerifier(this._greeterClient);
         this._userVerifier.connect('ask-question', Lang.bind(this, this._askQuestion));
+        this._userVerifier.connect('show-message', Lang.bind(this, this._showMessage));

Looks like we need to disconnect this at some point:

(lt-gnome-shell-real:26753): Clutter-CRITICAL **: clutter_text_get_text: assertion `CLUTTER_IS_TEXT (self)' failed

(lt-gnome-shell-real:26753): St-ERROR **: st_widget_get_theme_node called on the widget [0x5982820 StLabel.login-dialog-message-warning ("(null)")] which is not in the stage.
Shell killed with signal 5
Comment 67 Florian Müllner 2012-08-07 19:34:14 UTC
Comment on attachment 220590 [details] [review]
ScreenShield: when explicitly locking, tween the shield from the top

Attachment 220590 [details] pushed as d7f5421 - ScreenShield: when explicitly locking, tween the shield from the top
Comment 68 Giovanni Campagna 2012-08-13 16:01:00 UTC
Comment on attachment 220576 [details] [review]
ScreenShield: prepare the dialog when the user starts dragging

Comments were addressed, I believe.
Attachment 220576 [details] pushed as 2c627ca - ScreenShield: prepare the dialog when the user starts dragging
Comment 69 Giovanni Campagna 2012-08-13 16:24:59 UTC
Created attachment 221032 [details] [review]
Login/UnlockDialog: don't reset immediately if auth fails

Instead of showing a notification, add a small message immediately
below the entry, and give the user two more attempts to login,
before going back to the welcome or lock screen.
Comment 70 Giovanni Campagna 2012-08-13 16:28:43 UTC
Created attachment 221033 [details] [review]
ScreenShield: bump the lock screen slightly when pressing a key

When pressing a key different from escape (one thus that has no
effect), bump the screen up, to indicate that it eats keyboard
input and it must be lifted up.
Comment 71 Giovanni Campagna 2012-08-13 23:31:36 UTC
Created attachment 221066 [details] [review]
ScreenShield: constrain vertical movement of the screen lock

Don't allow dragging the screen lock above and below the screen,
as in particular dragging below breaks the illusion of the curtain.

Rebased to account for comments on the clutter patch.
Comment 72 Giovanni Campagna 2012-08-13 23:44:50 UTC
Created attachment 221067 [details] [review]
ScreenShield: animate going from the unlock dialog to the lock screen

If the user presses esc in the dialog, tween the lock screen from
the top instead of showing it immediately.
Comment 73 Giovanni Campagna 2012-08-14 11:29:30 UTC
Created attachment 221127 [details] [review]
UserMenu: show a padlock icon in the screenshield

When the screen is locked, the IM presence is forced to idle (away), so
it's not helpful. Show a padlock instead, to indicate that password
or other authentication method is required.

(There is no way currently to know if a password is really required,
or pam would succeed right away, so the padlock is just always shown)
Comment 74 Jasper St. Pierre (not reading bugmail) 2012-08-14 16:09:36 UTC
Review of attachment 221127 [details] [review]:

Not sure why you care about password in the commit message. I think a padlock indicates "locked", not "requires password". I don't know any padlocks that take a password.

::: js/ui/userMenu.js
@@ +677,3 @@
+        if (this._isLocked) {
+            // ignore presence changes when locked
+            this._iconBox.child = this._lockedIcon;

Why do you need to re-set the icon?
Comment 75 Giovanni Campagna 2012-08-14 16:35:03 UTC
(In reply to comment #74)
> Review of attachment 221127 [details] [review]:
> 
> Not sure why you care about password in the commit message. I think a padlock
> indicates "locked", not "requires password". I don't know any padlocks that
> take a password.

From the wiki:
Show the lock icon when a password or other authentication method is in effect
And effectively, if there is no password, the screen is not really locked.
Comment 76 Jasper St. Pierre (not reading bugmail) 2012-08-14 16:39:06 UTC
So what you're saying is that "in obscure conditions where some guy has pam_true has his auth stack, we'll show a padlock"?
Comment 77 Giovanni Campagna 2012-08-14 16:55:53 UTC
And in the not so obscure conditions where some guy has chosen to log in without a password in the control center.
Comment 78 Giovanni Campagna 2012-08-16 17:01:00 UTC
Comment on attachment 221127 [details] [review]
UserMenu: show a padlock icon in the screenshield

This is not what we want
Comment 79 Giovanni Campagna 2012-08-16 17:03:53 UTC
Created attachment 221425 [details] [review]
Hide user menu and a11y menu in the screen lock

This is a temporary patch. The user menu button needs to move to
the left, and the a11y menu in some cases needs to be hidden outside
of the screen lock too.
Comment 80 Giovanni Campagna 2012-08-16 20:25:09 UTC
Created attachment 221465 [details] [review]
UnlockDialog: remove hover effect from the avatar widget

It is not clickable, so it should not have any hover.
Comment 81 Jasper St. Pierre (not reading bugmail) 2012-08-16 20:29:18 UTC
Review of attachment 221465 [details] [review]:

Sure.
Comment 82 Jasper St. Pierre (not reading bugmail) 2012-08-16 20:30:03 UTC
Review of attachment 221425 [details] [review]:

This can work for now.
Comment 83 Giovanni Campagna 2012-08-16 20:42:10 UTC
Created attachment 221468 [details] [review]
ScreenShield: Fix updating visibility of the notification box

If there were no persistent or resident notification sources,
nothing ever would call _updateVisibility, and the box would stay
there empty
Comment 84 Giovanni Campagna 2012-08-16 20:43:54 UTC
Attachment 221425 [details] pushed as cbb56b6 - Hide user menu and a11y menu in the screen lock
Attachment 221465 [details] pushed as 80fde70 - UnlockDialog: remove hover effect from the avatar widget
Comment 85 Jasper St. Pierre (not reading bugmail) 2012-08-16 20:54:28 UTC
Review of attachment 221468 [details] [review]:

::: js/ui/screenShield.js
@@ +124,3 @@
 
+        let children = this._persistentNotificationBox.get_children();
+        let yes = children.some(function(a) { return a.visible; });

um

@@ +125,3 @@
+        let children = this._persistentNotificationBox.get_children();
+        let yes = children.some(function(a) { return a.visible; });
+        log('_persistentNotificationBox.children.some.etc...: ' + yes);

No.

@@ +127,3 @@
+        log('_persistentNotificationBox.children.some.etc...: ' + yes);
+
+        this.actor.visible = yes;

Yes.
Comment 86 Giovanni Campagna 2012-08-16 20:57:45 UTC
Created attachment 221473 [details] [review]
UnlockDialog: add an explicit cancel button

Pressing escape to cancelling the unlock procedure is not discoverable
enough.
At the same time, fix styling to avoid bluish hover effects.
Comment 87 Giovanni Campagna 2012-08-16 20:59:58 UTC
Created attachment 221474 [details] [review]
ScreenShield: Fix updating visibility of the notification box

If there were no persistent or resident notification sources,
nothing ever would call _updateVisibility, and the box would stay
there empty
Comment 88 Jasper St. Pierre (not reading bugmail) 2012-08-16 21:01:53 UTC
Review of attachment 221474 [details] [review]:

Sure.
Comment 89 Jasper St. Pierre (not reading bugmail) 2012-08-16 21:02:12 UTC
Review of attachment 221473 [details] [review]:

Sure.
Comment 90 Jasper St. Pierre (not reading bugmail) 2012-08-16 21:05:17 UTC
Review of attachment 221033 [details] [review]:

Sure.
Comment 91 Jasper St. Pierre (not reading bugmail) 2012-08-16 21:05:44 UTC
Review of attachment 221066 [details] [review]:

Sure.
Comment 92 Giovanni Campagna 2012-08-16 21:12:23 UTC
Created attachment 221475 [details] [review]
ScreenShield: hide Removable devices in the lock screen

Showing the removable devices is potentially a security risk (as
they include network shares). Also, a nautilus launched from there
can't be used, so it's just a way to overload the system.
Comment 93 Giovanni Campagna 2012-08-16 21:19:05 UTC
Attachment 221033 [details] pushed as d0a9476 - ScreenShield: bump the lock screen slightly when pressing a key
Attachment 221066 [details] pushed as b53d18f - ScreenShield: constrain vertical movement of the screen lock
Attachment 221468 [details] pushed as f8b1a84 - ScreenShield: Fix updating visibility of the notification box
Attachment 221473 [details] pushed as fd04c59 - UnlockDialog: add an explicit cancel button
Attachment 221474 [details] pushed as f8b1a84 - ScreenShield: Fix updating visibility of the notification box
Comment 94 Giovanni Campagna 2012-08-16 23:18:29 UTC
Created attachment 221524 [details] [review]
ScreenShield: reduce curtain sliding time to 0.5 seconds

Current time is too long, 0.5 was proved to be more effective
in user testing.
Comment 95 Jasper St. Pierre (not reading bugmail) 2012-08-16 23:24:58 UTC
Review of attachment 221524 [details] [review]:

Easy enough.
Comment 96 Giovanni Campagna 2012-08-16 23:34:38 UTC
Comment on attachment 221524 [details] [review]
ScreenShield: reduce curtain sliding time to 0.5 seconds

Attachment 221524 [details] pushed as a5f2d28 - ScreenShield: reduce curtain sliding time to 0.5 seconds
Comment 97 Giovanni Campagna 2012-08-21 19:54:09 UTC
Created attachment 222070 [details] [review]
Login/UnlockDialog: don't reset immediately if auth fails

Instead of showing a notification, add a small message immediately
below the entry, and give the user two more attempts to login,
before going back to the welcome or lock screen.

Rebased to current master (after the gdm login hint).
Needs fast review, because it has UI impact.
Comment 98 Giovanni Campagna 2012-08-23 13:08:35 UTC
Comment on attachment 220549 [details] [review]
MessageTray: fix restoring focus when the notification is destroyed

Apparently, the original bug fixed itself in the message tray rework, and this might be the cause of bug 682533
Comment 99 Allan Day 2012-08-23 13:46:26 UTC
Let's try and wrap this bug up and file separate reports for the outstanding issues. I've added most of the uncommitted patches to bug 682536, bug 682544 and bug 682545.

After that, the only patches that remain are:

 * ScreenShield: handle Escape on the stage, not on the lock screen

 * MessageTray: fix restoring focus when the notification is destroyed
Comment 100 Giovanni Campagna 2012-08-26 12:36:04 UTC
Comment on attachment 221475 [details] [review]
ScreenShield: hide Removable devices in the lock screen

Attachment 221475 [details] pushed as bec4849 - ScreenShield: hide Removable devices in the lock screen
Comment 101 Giovanni Campagna 2012-08-26 13:04:28 UTC
Some of the remaining patches are tracked in other bugs (bug 682536 for blur and desaturate, bug 682545 for escape animation, bug 682544 for failed login attempts), while the message tray stuff is unnecessary.
What about FIXED? :)
Comment 102 Allan Day 2012-08-28 08:54:55 UTC
(In reply to comment #101)
> What about FIXED? :)

The screen lock has been IMPROVED. :)
Comment 103 Giovanni Campagna 2012-09-14 15:14:34 UTC
Comment on attachment 221067 [details] [review]
ScreenShield: animate going from the unlock dialog to the lock screen

Attachment 221067 [details] pushed as 107f5de - ScreenShield: animate going from the unlock dialog to the lock screen