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 706612 - Update the end session dialog / power off dialog to meet the new designs
Update the end session dialog / power off dialog to meet the new designs
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: 2013-08-22 20:40 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2013-08-26 14:47 UTC
See Also:
GNOME target: 3.10
GNOME version: ---


Attachments
loginManager: Remove login manager versions of PowerOff/Reboot (3.43 KB, patch)
2013-08-22 20:40 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
endSessionDialog: Don't error out if gnome-session hands us a dead inhibitor (1.23 KB, patch)
2013-08-22 20:40 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
endSessionDialog: Fix a warning (918 bytes, patch)
2013-08-22 20:40 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
endSessionDialog: Implement new designs for the end session dialog (11.01 KB, patch)
2013-08-22 20:41 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
endSessionDialog: Remove the interactivity of the end session dialog (2.75 KB, patch)
2013-08-22 20:41 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
endSessionDialog: List other users and sessions in with the inhibitors (16.02 KB, patch)
2013-08-22 20:41 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
endSessionDialog: Convert to the standard _sync pattern (4.48 KB, patch)
2013-08-22 20:41 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
system: Glow the power off icon when there are updates available (2.58 KB, patch)
2013-08-22 20:41 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
system: Use a dialog for selecting the Power Off option (8.36 KB, patch)
2013-08-22 20:41 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
endSessionDialog: Remove the interactivity of the end session dialog (2.77 KB, patch)
2013-08-23 15:25 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
endSessionDialog: List other users and sessions in with the inhibitors (15.97 KB, patch)
2013-08-23 15:26 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
endSessionDialog: Convert to the standard _sync pattern (5.45 KB, patch)
2013-08-23 15:26 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
system: Add an alt-switcher to re-enable Suspend in the system menu (6.92 KB, patch)
2013-08-23 15:26 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
endSessionDialog: Convert to the standard _sync pattern (5.43 KB, patch)
2013-08-23 15:53 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review
system: Add an alt-switcher to re-enable Suspend in the system menu (7.10 KB, patch)
2013-08-23 15:53 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review
endSessionDialog: List other users and sessions in with the inhibitors (16.33 KB, patch)
2013-08-23 17:26 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
endSessionDialog: Convert to the standard _sync pattern (5.04 KB, patch)
2013-08-23 17:26 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
endSessionDialog: Don't stop the timer when we have inhibitors (6.30 KB, patch)
2013-08-23 17:26 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
endSessionDialog: Split into two sections (13.35 KB, patch)
2013-08-23 17:26 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
system: Add a way to suspend from the system menu (7.24 KB, patch)
2013-08-23 17:32 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
add a variant of the Restart dialog for offline updates (2.44 KB, patch)
2013-08-26 04:54 UTC, Matthias Clasen
none Details | Review
Add a variant of the Restart dialog for offline updates (2.47 KB, patch)
2013-08-26 10:52 UTC, Matthias Clasen
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2013-08-22 20:40:51 UTC
See the designs at: https://raw.github.com/gnome-design-team/gnome-mockups/master/shell/system-menu/power-off-dialog.png

These don't meet them exactly, but they're a good first start.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-08-22 20:40:53 UTC
Created attachment 252796 [details] [review]
loginManager: Remove login manager versions of PowerOff/Reboot

These don't go through gnome-session, so they don't properly update
its state machine. We should use these in the future when we want to
use logind user sessions, but for now, they're just a trap.
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-08-22 20:40:56 UTC
Created attachment 252797 [details] [review]
endSessionDialog: Don't error out if gnome-session hands us a dead inhibitor

Sometimes gnome-session hands us a bad object path for JIT inhibitors
it creates for XSMP clients. While this is a bug in gnome-session, we
shouldn't show an empty-looking dialog here.
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-08-22 20:40:59 UTC
Created attachment 252798 [details] [review]
endSessionDialog: Fix a warning

If _timerId is undefined/null, as it is by default, we will take this
path, and fail when trying to remove a source ID for undefined.
Comment 4 Jasper St. Pierre (not reading bugmail) 2013-08-22 20:41:02 UTC
Created attachment 252799 [details] [review]
endSessionDialog: Implement new designs for the end session dialog
Comment 5 Jasper St. Pierre (not reading bugmail) 2013-08-22 20:41:06 UTC
Created attachment 252800 [details] [review]
endSessionDialog: Remove the interactivity of the end session dialog

This was always sort of a hidden feature, and with the new designs
it's going to get unclear about what's clickable, and what's not.
Comment 6 Jasper St. Pierre (not reading bugmail) 2013-08-22 20:41:09 UTC
Created attachment 252801 [details] [review]
endSessionDialog: List other users and sessions in with the inhibitors

Instead of in a separate dialog. This does not meet the designs right
now, but it's a good first start.
Comment 7 Jasper St. Pierre (not reading bugmail) 2013-08-22 20:41:12 UTC
Created attachment 252802 [details] [review]
endSessionDialog: Convert to the standard _sync pattern

... for starting and stopping the timer. This helps clean up the
state transitions in the code when caring about multiple things.
Comment 8 Jasper St. Pierre (not reading bugmail) 2013-08-22 20:41:15 UTC
Created attachment 252803 [details] [review]
system: Glow the power off icon when there are updates available
Comment 9 Jasper St. Pierre (not reading bugmail) 2013-08-22 20:41:19 UTC
Created attachment 252805 [details] [review]
system: Use a dialog for selecting the Power Off option
Comment 10 Giovanni Campagna 2013-08-22 20:42:08 UTC
Review of attachment 252796 [details] [review]:

Does it mean we show a confirmation dialog when you reboot from GDM?
Comment 11 Giovanni Campagna 2013-08-22 20:43:17 UTC
Review of attachment 252797 [details] [review]:

::: js/ui/endSessionDialog.js
@@ +124,3 @@
+    } catch(e) {
+        // XXX -- sometimes JIT inhibitors generated by gnome-session
+        // get removed too soon. Don't fail in this case.

We should probably log something here - just to help people debugging gnome-session.
Comment 12 Giovanni Campagna 2013-08-22 20:43:59 UTC
Review of attachment 252798 [details] [review]:

Oh sad, does it mean we need to check all places we're doing != 0?
Comment 13 Giovanni Campagna 2013-08-22 21:13:35 UTC
After discussion in IRC, we discovered that was an unfortunate misunderstanding of the designs, so Jasper is going to rewrite the unreviewed patches.
Comment 14 Jasper St. Pierre (not reading bugmail) 2013-08-22 21:14:35 UTC
(In reply to comment #10)
> Does it mean we show a confirmation dialog when you reboot from GDM?

We do what gnome-session tells us. If it tell us to open a confirmation dialog when we call OpenAsync, then we do.

(In reply to comment #11)
> We should probably log something here - just to help people debugging
> gnome-session.

OK.

(In reply to comment #12)
> Oh sad, does it mean we need to check all places we're doing != 0?

Well, most places set things in the constructor to = 0 on startup, but yeah, we should probably double-check.
Comment 15 Jasper St. Pierre (not reading bugmail) 2013-08-22 21:18:06 UTC
Attachment 252796 [details] pushed as ce76824 - loginManager: Remove login manager versions of PowerOff/Reboot
Attachment 252797 [details] pushed as c44caa5 - endSessionDialog: Don't error out if gnome-session hands us a dead inhibitor
Attachment 252798 [details] pushed as 77dc587 - endSessionDialog: Fix a warning
Comment 16 Giovanni Campagna 2013-08-23 12:09:08 UTC
Among other things,

(gnome-shell:12770): Gjs-WARNING **: JS ERROR: TypeError: this._userManager is undefined
EndSessionDialog<._loadSessions/<@/opt/gnome/share/gnome-shell/js/ui/endSessionDialog.js:414
LoginManagerSystemd<.listSessions/<@/opt/gnome/share/gnome-shell/js/misc/loginManager.js:164
asyncCallback@/opt/gnome/share/gjs-1.0/overrides/Gio.js:91
Comment 17 Giovanni Campagna 2013-08-23 12:09:35 UTC
As well as

(gnome-shell:12770): Gjs-WARNING **: JS ERROR: ReferenceError: event is not defined
PowerOffDialog<._onRestartClicked@/opt/gnome/share/gnome-shell/js/ui/status/system.js:94
wrapper@/opt/gnome/share/gjs-1.0/lang.js:213
Comment 18 Giovanni Campagna 2013-08-23 12:24:26 UTC
(gnome-shell:12770): Gjs-WARNING **: JS ERROR: ReferenceError: Util is not defined
PowerOffDialog<._onInstallUpdatesClicked@/opt/gnome/share/gnome-shell/js/ui/status/system.js:88
wrapper@/opt/gnome/share/gjs-1.0/lang.js:213

Wow!
Comment 19 Giovanni Campagna 2013-08-23 12:28:37 UTC
Review of attachment 252803 [details] [review]:

More on the list of bugs, you need to check at startup if the prepared updates file is there, and set the glow accordingly.
Comment 20 Jasper St. Pierre (not reading bugmail) 2013-08-23 15:25:53 UTC
Created attachment 252882 [details] [review]
endSessionDialog: Remove the interactivity of the end session dialog

This was always sort of a hidden feature, and with the new designs
it's going to get unclear about what's clickable, and what's not.
Comment 21 Jasper St. Pierre (not reading bugmail) 2013-08-23 15:26:17 UTC
Created attachment 252883 [details] [review]
endSessionDialog: List other users and sessions in with the inhibitors

Instead of in a separate dialog. This does not meet the designs right
now, but it's a good first start.
Comment 22 Jasper St. Pierre (not reading bugmail) 2013-08-23 15:26:20 UTC
Created attachment 252884 [details] [review]
endSessionDialog: Convert to the standard _sync pattern

... for starting and stopping the timer. This helps clean up the
state transitions in the code when caring about multiple things.
Comment 23 Jasper St. Pierre (not reading bugmail) 2013-08-23 15:26:24 UTC
Created attachment 252885 [details] [review]
system: Add an alt-switcher to re-enable Suspend in the system menu
Comment 24 Giovanni Campagna 2013-08-23 15:29:24 UTC
Review of attachment 252882 [details] [review]:

Ok
Comment 25 Giovanni Campagna 2013-08-23 15:34:20 UTC
Review of attachment 252883 [details] [review]:

In what way this does not meet the designs?

::: js/ui/endSessionDialog.js
@@ +175,3 @@
+                                                  style_class: 'end-session-dialog-app-list-item-description' });
+            textLayout.add(descriptionLabel, { expand: true, x_fill: true });
+        }

Doesn't this create items of different height if the reason is present or not?
Comment 26 Giovanni Campagna 2013-08-23 15:39:20 UTC
Review of attachment 252884 [details] [review]:

::: js/ui/endSessionDialog.js
@@ +317,2 @@
             return;
+        }

This doesn't make sense.
We know when the dialog is closed, it's only inside cancel() or _confirm(). Those places should call _stopTimer() directly.

The other uses of _sync are fine, otoh.
Comment 27 Giovanni Campagna 2013-08-23 15:41:54 UTC
Review of attachment 252885 [details] [review]:

::: js/ui/status/system.js
@@ +38,3 @@
+        this._alternate.connect('notify::visible', Lang.bind(this, this._sync));
+
+        this._capturedEventId = global.stage.connect('captured-event', Lang.bind(this, this._onCapturedEvent));

You probably want to disconnect this on destroy?

@@ +55,3 @@
+
+        if (childToShow != this._currentChild) {
+            this._currentChild = childToShow;

Do you really need _currentChild?
Comment 28 Jasper St. Pierre (not reading bugmail) 2013-08-23 15:49:02 UTC
(In reply to comment #25)
> In what way this does not meet the designs?

The designs call for two separate sections -- one for app inhibitors, and one for other sessions. This puts them all in one section.

> Doesn't this create items of different height if the reason is present or not?

Sure, but that was the case anyway if we word wrapped the reason. The icon should be the normalizer of height.

(In reply to comment #26)
> This doesn't make sense.
> We know when the dialog is closed, it's only inside cancel() or _confirm().
> Those places should call _stopTimer() directly.

Sort of the point of _sync is to make the state only change in one place, but I can go either way on this one since we change the state externally through .cancel / ._confirm as well.
Comment 29 Jasper St. Pierre (not reading bugmail) 2013-08-23 15:53:11 UTC
Created attachment 252896 [details] [review]
endSessionDialog: Convert to the standard _sync pattern

... for starting and stopping the timer. This helps clean up the
state transitions in the code when caring about multiple things.
Comment 30 Jasper St. Pierre (not reading bugmail) 2013-08-23 15:53:15 UTC
Created attachment 252897 [details] [review]
system: Add an alt-switcher to re-enable Suspend in the system menu
Comment 31 Giovanni Campagna 2013-08-23 16:09:12 UTC
Review of attachment 252896 [details] [review]:

Ok
Comment 32 Giovanni Campagna 2013-08-23 16:11:19 UTC
Review of attachment 252897 [details] [review]:

Ok
Comment 33 Jasper St. Pierre (not reading bugmail) 2013-08-23 17:25:44 UTC
Comment on attachment 252882 [details] [review]
endSessionDialog: Remove the interactivity of the end session dialog

Attachment 252882 [details] pushed as e4d46ae - endSessionDialog: Remove the interactivity of the end session dialog


Gonna push this one for now since it's sort of a hidden feature.
Comment 34 Jasper St. Pierre (not reading bugmail) 2013-08-23 17:26:13 UTC
Created attachment 252925 [details] [review]
endSessionDialog: List other users and sessions in with the inhibitors

Instead of in a separate dialog. This does not meet the designs right
now, but it's a good first start.
Comment 35 Jasper St. Pierre (not reading bugmail) 2013-08-23 17:26:16 UTC
Created attachment 252926 [details] [review]
endSessionDialog: Convert to the standard _sync pattern

... for starting and stopping the timer. This helps clean up the
state transitions in the code when caring about multiple things.
Comment 36 Jasper St. Pierre (not reading bugmail) 2013-08-23 17:26:20 UTC
Created attachment 252927 [details] [review]
endSessionDialog: Don't stop the timer when we have inhibitors
Comment 37 Jasper St. Pierre (not reading bugmail) 2013-08-23 17:26:23 UTC
Created attachment 252928 [details] [review]
endSessionDialog: Split into two sections
Comment 38 Jasper St. Pierre (not reading bugmail) 2013-08-23 17:32:38 UTC
Created attachment 252929 [details] [review]
system: Add a way to suspend from the system menu

When we implemented the new designs, we lost the ability to suspend
from the system menu. Re-enable this ability by re-adding the hidden
"Alt" shortcut item.
Comment 39 Jasper St. Pierre (not reading bugmail) 2013-08-23 17:33:03 UTC
Review of attachment 252929 [details] [review]:

(reattached for order, still ACN)
Comment 40 Allan Day 2013-08-23 18:03:36 UTC
I've just tested, and it looks great. Two small visual tweaks that would improve it:

1. When there are both inhibitor applications and inhibitor user accounts, increase the padding above each section.

2. Use a grey colour for the inhibitor headings (probably the same grey as the dialog title).
Comment 41 Matthias Clasen 2013-08-26 04:54:15 UTC
Created attachment 253093 [details] [review]
add a variant of the Restart dialog for offline updates

Here is an untested patch that adds a variant of the Restart dialog for when an offline update is pending.
Comment 42 Matthias Clasen 2013-08-26 10:52:59 UTC
Created attachment 253114 [details] [review]
Add a variant of the Restart dialog for offline updates

Detect when an offline update is pending, and show a more
suitable message in the Restart dialog.
Comment 43 Colin Walters 2013-08-26 11:12:41 UTC
Review of attachment 253114 [details] [review]:

Feel free to commit with or without change.

::: js/ui/endSessionDialog.js
@@ +114,3 @@
+    },
+    confirmButtons: [{ signal: 'ConfirmedReboot',
+                       label:  C_("button", "Restart & Install") }],

"Restart & Update" maybe?
Comment 44 Matthias Clasen 2013-08-26 11:15:14 UTC
I was following this: https://dl.dropboxusercontent.com/u/5031519/system-settings/end-session-dialogs.png
Comment 45 Giovanni Campagna 2013-08-26 11:43:55 UTC
Review of attachment 252925 [details] [review]:

Ok
Comment 46 Giovanni Campagna 2013-08-26 11:44:15 UTC
Review of attachment 252926 [details] [review]:

Yes
Comment 47 Giovanni Campagna 2013-08-26 11:45:50 UTC
Review of attachment 252927 [details] [review]:

Ok
Comment 48 Giovanni Campagna 2013-08-26 11:46:42 UTC
Review of attachment 252928 [details] [review]:

Why did you remove the class?
Comment 49 Jasper St. Pierre (not reading bugmail) 2013-08-26 13:20:59 UTC
Review of attachment 253114 [details] [review]:

No. This doesn't make sense. We need to trigger an offline update with PackageKit through calling an executable, and users should be able to normally restart without forcing updates to be installed. This needs to have new APIs in gnome-session that gnome-software can call.
Comment 50 Giovanni Campagna 2013-08-26 13:32:10 UTC
(In reply to comment #49)
> Review of attachment 253114 [details] [review]:
> 
> No. This doesn't make sense. We need to trigger an offline update with
> PackageKit through calling an executable, and users should be able to normally
> restart without forcing updates to be installed. This needs to have new APIs in
> gnome-session that gnome-software can call.

You weren't there in IRC for the discussion with halfline?
The new API is just gnome-session telling gnome-software if reboot was confirmed or not, all PackageKit handling will happen in gnome-software.
Comment 51 Jasper St. Pierre (not reading bugmail) 2013-08-26 14:03:10 UTC
Attachment 252925 [details] pushed as 2e65c85 - endSessionDialog: List other users and sessions in with the inhibitors
Attachment 252926 [details] pushed as aaaf25d - endSessionDialog: Convert to the standard _sync pattern
Attachment 252927 [details] pushed as a779e2a - endSessionDialog: Don't stop the timer when we have inhibitors
Attachment 252928 [details] pushed as dd8fd09 - endSessionDialog: Split into two sections
Attachment 252929 [details] pushed as ef2345e - system: Add a way to suspend from the system menu
Comment 52 Matthias Clasen 2013-08-26 14:07:01 UTC
(In reply to comment #49)
> Review of attachment 253114 [details] [review]:
> 
> No. This doesn't make sense. We need to trigger an offline update with
> PackageKit through calling an executable, and users should be able to normally
> restart without forcing updates to be installed. This needs to have new APIs in
> gnome-session that gnome-software can call.

Thats not how it works, I'm afraid. gnome-session is not involved in software updates at all, and won't be. Once offline updates have been triggered, the next reboot _will_ go ahead and install them. But this is usually part of a single workflow, anyway. You click 'Restart & Install' in gnome-software, and then gnome-software triggers the offline update (which puts /software-update in place) and then calls Reboot. gnome-shell is not making any policy decision here, it simply displays a suitable UI under the circumstances.
Comment 53 Matthias Clasen 2013-08-26 14:09:02 UTC
Review of attachment 253114 [details] [review]:

Setting back to acn, as Jasper conceded on irc.
Comment 54 Matthias Clasen 2013-08-26 14:47:29 UTC
Attachment 253114 [details] pushed as a0fa993 - Add a variant of the Restart dialog for offline updates