New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 826057 link

Starred by 2 users

Issue metadata

Status: Verified
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug

Blocking:
issue 799524



Sign in to add a comment

Start the pre-shutdown animation if pressing power button for a while when menu is shown

Project Member Reported by derat@chromium.org, Mar 26 2018

Issue description

In r545871, the UX when the power button is released and pressed while the power menu is shown seems like it needs some work. We make an abrupt transition to the undimmed desktop and then immediately repeat the original menu animation.

We've talked a bit about whether the animation should repeat or not. I think it repeats to match Android, but this looks pretty janky to me on a Pixel 2.

I think it would be much better if we immediately showed the pre-shutdown fade-to-white animation when the power button is held again while the menu is already up.
 

Comment 1 by derat@chromium.org, Mar 26 2018

You can see what it currently looks like (in slow-motion) at https://drive.google.com/file/d/19-ygX5rxiut-GfJluKGsG1q84W1QgHWI/view?usp=sharing .

Comment 2 by derat@chromium.org, Mar 26 2018

Cc: jennschen@chromium.org
Owner: zalcorn@chromium.org

Comment 3 by derat@chromium.org, Mar 26 2018

Components: -OS>Kernel>Power -UI>Shell>WindowManager UI>Shell>TouchView
I'd recommend restarting the reveal animation from whatever point it is currently at. That should address the flashing jank. As derat@ says, I wouldn't use Pixel 2 as a model.
Owner: minch@chromium.org
+1, agree with Dan and Ben

Comment 6 by minch@chromium.org, Apr 9 2018

Labels: -M-57 M-67
I don't quite get the meaning here, I think what Dan and Ben suggested are different.
Dan suggested to start the pre-shutdown fade-to-white animation if press the power button when menu is shown.
Ben suggested to restart the showing menu animation in this case. I think this is what we have now.

Do I understand correct? Which one it should be?
I think both Dan's and my suggestions apply, just at different moments. Dan's suggestion sounds like his comments in crbug.com/826064 #5.

I was referring to the jank I saw pressing the button again when the menu was partially showing - with the animation restarting from the beginning. I think Dan's comment applies when the menu is already fully visible.

Comment 8 by derat@chromium.org, Apr 9 2018

Yes, I agree with the summary in #7. :-)

Comment 9 by minch@chromium.org, Apr 9 2018

I see. Thanks.

Comment 10 by minch@chromium.org, Apr 11 2018

Status: Started (was: Assigned)

Comment 11 by minch@chromium.org, Apr 12 2018

Dan, we can start the pre-shutdown animation if press the power button when menu is opened and focus is on the "power-off" item. I think we may don't start the pre-shutdown animation if the focus is on "sign-out" item? Then what should we do in this case?

Comment 12 by minch@chromium.org, Apr 12 2018

How about request focus for "power-off" item and then start the pre-shtudown animation?

Comment 13 by derat@chromium.org, Apr 12 2018

I think we should always start the pre-shutdown animation if the power button is held while the menu is open, regardless of where the focus is.

Focusing the "power off" item when starting the pre-shutdown animation to make it clearer what's going to happen sounds like a good idea to me.

Comment 14 by minch@chromium.org, Apr 12 2018

Cc: zalcorn@chromium.org

Comment 15 by minch@chromium.org, Apr 13 2018

Labels: Merge-Request-67
Project Member

Comment 16 by bugdroid1@chromium.org, Apr 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b432b7c1ef34b32400fbc2d6f9bfa4624e4ea32e

commit b432b7c1ef34b32400fbc2d6f9bfa4624e4ea32e
Author: Min Chen <minch@google.com>
Date: Fri Apr 13 23:11:32 2018

ash: Start pre-shutdown animation if long press power button
when menu is already shown.

- Don't dismiss the menu if pressing power button when menu is already shown.
  Wait for 650ms to start the pre-shutdown animation and request focus for
  'power off' item instead.

- Turn screen off for convertible device / in tablet mode if
  "ModeSpecificPowerButton" is set when menu is not fully shown or second
   press before starting the pre-shutdown animation.

Test=PowerButtonControllerTest*

Bug:  826057 
Change-Id: I1f906e2bcf5d91960180742bf558c00784fbaa1e
Reviewed-on: https://chromium-review.googlesource.com/1011590
Commit-Queue: Min Chen <minch@chromium.org>
Reviewed-by: Qiang Xu <warx@google.com>
Reviewed-by: Dan Erat <derat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550785}
[modify] https://crrev.com/b432b7c1ef34b32400fbc2d6f9bfa4624e4ea32e/ash/system/power/power_button_controller.cc
[modify] https://crrev.com/b432b7c1ef34b32400fbc2d6f9bfa4624e4ea32e/ash/system/power/power_button_controller.h
[modify] https://crrev.com/b432b7c1ef34b32400fbc2d6f9bfa4624e4ea32e/ash/system/power/power_button_controller_unittest.cc

Comment 17 by minch@chromium.org, Apr 13 2018

Status: Fixed (was: Started)
Summary: Start the pre-shutdown animation if pressing power button for a while when menu is shown (was: Improve animation when power button is pressed while power menu is already shown)
Pressing the power button for 650ms when menu is opened will start the pre-shutdown animation.
Project Member

Comment 18 by sheriffbot@chromium.org, Apr 14 2018

Labels: -Merge-Request-67 Merge-Approved-67 Hotlist-Merge-Approved
Your change meets the bar and is auto-approved for M67. Please go ahead and merge the CL to branch 3396 manually. Please contact milestone owner if you have questions.
Owners: cmasso@(Android), cmasso@(iOS), kbleicher@(ChromeOS), govind@(Desktop)

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Project Member

Comment 19 by bugdroid1@chromium.org, Apr 17 2018

Labels: merge-merged-testbranch
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b432b7c1ef34b32400fbc2d6f9bfa4624e4ea32e

commit b432b7c1ef34b32400fbc2d6f9bfa4624e4ea32e
Author: Min Chen <minch@google.com>
Date: Fri Apr 13 23:11:32 2018

ash: Start pre-shutdown animation if long press power button
when menu is already shown.

- Don't dismiss the menu if pressing power button when menu is already shown.
  Wait for 650ms to start the pre-shutdown animation and request focus for
  'power off' item instead.

- Turn screen off for convertible device / in tablet mode if
  "ModeSpecificPowerButton" is set when menu is not fully shown or second
   press before starting the pre-shutdown animation.

Test=PowerButtonControllerTest*

Bug:  826057 
Change-Id: I1f906e2bcf5d91960180742bf558c00784fbaa1e
Reviewed-on: https://chromium-review.googlesource.com/1011590
Commit-Queue: Min Chen <minch@chromium.org>
Reviewed-by: Qiang Xu <warx@google.com>
Reviewed-by: Dan Erat <derat@chromium.org>
Cr-Commit-Position: refs/heads/master@{#550785}
[modify] https://crrev.com/b432b7c1ef34b32400fbc2d6f9bfa4624e4ea32e/ash/system/power/power_button_controller.cc
[modify] https://crrev.com/b432b7c1ef34b32400fbc2d6f9bfa4624e4ea32e/ash/system/power/power_button_controller.h
[modify] https://crrev.com/b432b7c1ef34b32400fbc2d6f9bfa4624e4ea32e/ash/system/power/power_button_controller_unittest.cc

Project Member

Comment 20 by bugdroid1@chromium.org, Apr 17 2018

Labels: -merge-approved-67 merge-merged-3396
The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/e801faea3a9e294da4fd761955f4618da3a43238

commit e801faea3a9e294da4fd761955f4618da3a43238
Author: Min Chen <minch@google.com>
Date: Tue Apr 17 18:11:53 2018

[Merge to M67]ash: Start pre-shutdown animation if long press power button when menu is already shown.

TBR=minch@chromium.org

- Don't dismiss the menu if pressing power button when menu is already shown.
  Wait for 650ms to start the pre-shutdown animation and request focus for
  'power off' item instead.

- Turn screen off for convertible device / in tablet mode if
  "ModeSpecificPowerButton" is set when menu is not fully shown or second
   press before starting the pre-shutdown animation.

Test=PowerButtonControllerTest*

(cherry picked from commit b432b7c1ef34b32400fbc2d6f9bfa4624e4ea32e)

Bug:  826057 
Change-Id: I1f906e2bcf5d91960180742bf558c00784fbaa1e
Reviewed-on: https://chromium-review.googlesource.com/1011590
Commit-Queue: Min Chen <minch@chromium.org>
Reviewed-by: Qiang Xu <warx@google.com>
Reviewed-by: Dan Erat <derat@chromium.org>
Cr-Original-Commit-Position: refs/heads/master@{#550785}
Reviewed-on: https://chromium-review.googlesource.com/1015524
Reviewed-by: Min Chen <minch@chromium.org>
Cr-Commit-Position: refs/branch-heads/3396@{#52}
Cr-Branched-From: 9ef2aa869bc7bc0c089e255d698cca6e47d6b038-refs/heads/master@{#550428}
[modify] https://crrev.com/e801faea3a9e294da4fd761955f4618da3a43238/ash/system/power/power_button_controller.cc
[modify] https://crrev.com/e801faea3a9e294da4fd761955f4618da3a43238/ash/system/power/power_button_controller.h
[modify] https://crrev.com/e801faea3a9e294da4fd761955f4618da3a43238/ash/system/power/power_button_controller_unittest.cc

Status: Verified (was: Fixed)
Verified on M67 (10575.26.0, 67.0.3396.31)

Sign in to add a comment