New issue
Advanced search Search tips

Issue 772459 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Shelf items should not scale up if shelf is auto-hide

Project Member Reported by minch@chromium.org, Oct 6 2017

Issue description

Chrome Version: (copy from chrome://version)
OS: (e.g. Win7, OSX 10.9.5, etc...)

What steps will reproduce the problem?
(1)Set shelf to auto-hide.
(2)Long press the shelf items.
(3)Release the press.

What is the expected result?
Shelf items should not be scaled up. Since shelf items can't be dragged if shelf is auto-hide.

What happens instead?
Shelf items were scaled up and didn't scale down back after touch was released.
 
Components: UI>Shell>Shelf

Comment 2 by minch@chromium.org, Oct 9 2017

Hi, mccanny@ and sgabriel@, through this issue, we found that when shelf is auto-hide (shelf is still visible when there is no visible window), shelf icons can't be dragged via touch but can be dragged via mouse.
In issue 748253, we scale the icons to 120% when it is in the drag-gable state via touch.

I have some questions for the behavior here,
1. Should we make the behavior consistent for touch and mouse events if shelf is auto-hide. Both can or can not drag the items?

2. If we make the icons can be dragged when shelf is auto-hide via both touch and mouse, do we need to scale up the icons via mouse too?

Thanks.

Comment 3 by minch@chromium.org, Oct 9 2017

Cc: mccanny@chromium.org sgabr...@chromium.org
Hey Min,

1. I'd prefer to make the icons draggable by both mouse and touch when the shelf is auto-hide - is there a reason we shouldn't?

2. Yeah, I think we should scale up to 120% when either input is in a reorder mode
We should be ale to drag items even from auto-hidden shelf. At the moment if I make the hidden shelf appear and long-press, it hides it again so I cannot re-order icon, feels weird, I wasn't aware of this behavior.

Comment 6 by minch@chromium.org, Oct 10 2017

Ben, I am not quite sure why the old logic is to make the icons not draggable when shelf is auto-hide. But I think we maybe able to change it.

sgabriel@, auto-hide shelf will be shown (when there is visible window, shelf will always be shown when there is no visible window) if mouse cursor stays in the shelf's bounds, take a look of this  issue 657251 .

Why we should hide the shelf again if long-press the shelf? Long-press on the shelf icons or shelf will open the context menu, and if there is opened context menu, the logic now is not to hide the shelf.
>Why we should hide the shelf again if long-press the shelf? Long-press on the shelf icons or shelf will open the context menu, and if there is opened context menu, the logic now is not to hide the shelf.

Sorry not sure I understood what you meant. Long-pressing the shelf displays a contextual menu. Long pressing an icon on the shelf, regardless of the shelf is in auto-hide or not should follow the long-press behavior implemented when shelf auto-hide is off.


Comment 8 by minch@chromium.org, Oct 10 2017

I see. I think what do you mean in #6 is that the behavior long-press hides the auto-hide shelf is weird. I think this behavior has been fixed in  issue 657251 .

So, here we need to make the icons draggable regardless of the shelf is in auto-hide or not. And should scale up the icons if it is in draggable state.
Project Member

Comment 9 by bugdroid1@chromium.org, Oct 12 2017

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

commit 2a4edb39bc15c3b8aa854dd0597c7511ea913a1e
Author: MinChen <minch@chromium.org>
Date: Thu Oct 12 22:24:23 2017

Make shelf items can be dragged when shelf is auto-hide.

Changes,
1. Only let ShelfLayoutManager help process the gesture events when
   shelf is not visible. Then shelf items can be dragged when shelf is
   auto-hide.
2. Remove the logic in ShelfView that only transfer gesture events from
   owner to the MenuHost when shelf is not auto-hide.
3. Scale up the shelf items for mouse events.

Test: ShelfLayoutManagerTest*
Bug:  772459 
Change-Id: I33c9767216bb5d95048b151347fdc7ed8f69a302
Reviewed-on: https://chromium-review.googlesource.com/705575
Commit-Queue: min c <minch@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#508505}
[modify] https://crrev.com/2a4edb39bc15c3b8aa854dd0597c7511ea913a1e/ash/shelf/shelf.cc
[modify] https://crrev.com/2a4edb39bc15c3b8aa854dd0597c7511ea913a1e/ash/shelf/shelf_button.cc
[modify] https://crrev.com/2a4edb39bc15c3b8aa854dd0597c7511ea913a1e/ash/shelf/shelf_button.h
[modify] https://crrev.com/2a4edb39bc15c3b8aa854dd0597c7511ea913a1e/ash/shelf/shelf_layout_manager.cc
[modify] https://crrev.com/2a4edb39bc15c3b8aa854dd0597c7511ea913a1e/ash/shelf/shelf_view.cc

Comment 10 by minch@chromium.org, Oct 13 2017

Status: Fixed (was: Started)

Comment 11 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 12 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment