New issue
Advanced search Search tips

Issue 734789 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Jun 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Windows , Mac
Pri: 2
Type: Bug



Sign in to add a comment

Selected state not working properly

Project Member Reported by bettes@chromium.org, Jun 19 2017

Issue description

Chrome Version: Version 59.0.3071.104
OS: OSX

What steps will reproduce the problem?
(1) On your Mac, go to chrome://settings/manageProfile
(2) Note there's no visual indication of a selected avatar 
(3) Select any avatar in the page
(4) Note that it takes 2 clicks to trigger the blue outline (selected)
(5) Note that the blue outline is 1px

What is the expected result?
- the selected state should be 2px GoogleBlue500 <-- This is new and true for all platforms
- the selected state should be present upon opening chrome://settings/manageProfile
- 1 click is required to toggle between avatars. It should take 1 click to toggle the selected state


 

Comment 1 by dpa...@chromium.org, Jun 20 2017

Labels: Hotlist-MD-Settings-People OS-Linux OS-Windows
The related code is at https://cs.chromium.org/chromium/src/ui/webui/resources/cr_elements/cr_profile_avatar_selector/. I am able to reproduce this on Linux too, not just Mac.

Comment 2 by dpa...@chromium.org, Jun 20 2017

Cc: dbeam@chromium.org
+dbeam, just FYI.

So it seems that something is wrong within the involved Polymer "select-y" behaviors [1]. Specifically see screencast where the avatar being selected is immediately de-selected. I am not aware yet of what triggers the 2nd call. Perhaps the problem can be sidestepped by making cr-profile-avatar-selector-grid to not use the IronMenuBehavior [2].


[1] https://cs.chromium.org/chromium/src/third_party/polymer/v1_0/components-chromium/iron-selector/iron-selectable-extracted.js?l=319
[2] https://cs.chromium.org/chromium/src/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.js?l=14
selection_changes_too_often.mp4
470 KB View Download

Comment 3 by dbeam@chromium.org, Jun 20 2017

Cc: tommycli@chromium.org mahmadi@chromium.org

Comment 4 by dpa...@chromium.org, Jun 20 2017

FYI, I am attempting to re-implement the grid's functionality without IronMenuBehavior (and fixing the bug at the same time, [1]). I initially spent some time digging into all the involved behaviors, until I stopped because it seemed overly complicated for the task at hand.

I don't know if my attempt will succeed, but looks promising so far. Will report back in this thread.

[1] https://codereview.chromium.org/2950943002 still WIP

Comment 5 by dpa...@chromium.org, Jun 20 2017

Status: Started (was: Assigned)

Comment 6 Deleted

Comment 7 by dpa...@chromium.org, Jun 21 2017

Cc: -nyerramilli@chromium.org -rbasuvula@chromium.org -dbeam@chromium.org -msrchandra@chromium.org -dpa...@chromium.org -ranjitkan@chromium.org

Comment 8 by dpa...@chromium.org, Jun 21 2017

Cc: dbeam@chromium.org
Project Member

Comment 9 by bugdroid1@chromium.org, Jun 23 2017

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

commit e67dbad97952415cabff9444ed85f543579240e6
Author: dpapad <dpapad@chromium.org>
Date: Fri Jun 23 01:54:31 2017

MD Settings: Stop using IronMenuBehavior from cr-profile-avatar-selector-grid.

This both simplifies the code and fixes the selection bug. The original
code relied on multiple inherited Polymer behaviors which stomped on each other
causing what seems like a race condition per findings at
https://bugs.chromium.org/p/chromium/issues/detail?id=734789#c2.

Specifically:
 - Simplify logic within cr-profile-avatar-selector-grid, no more inherited
   behaviors.
 - Update both settings/ and md_user_manager/ client code.
 - Stop relying on bubbling 'iron-activate' event in manage_profile.html.
   Instead use a Polymer binding + observer.

Regarding the race condition: The previous code, was seemingly attempting to
highlight the grid with the currently selected avatar icon on creation, but
unsuccessfully because this was intentionally broken within the C++ side at
 crbug.com/710660 . As a side-effect, the 'profile-info-changed' event
propagating back from C++ after every user-initiated change, was causing the
selection of the user to be immediately discarded.

It would make little sense to re-implement JS functionality that is already not
working. Instead I am removing such tests, since they are meaningless until/if
the C++ side is fixed.

BUG= 734789 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2950943002
Cr-Commit-Position: refs/heads/master@{#481776}

[modify] https://crrev.com/e67dbad97952415cabff9444ed85f543579240e6/chrome/browser/resources/md_user_manager/create_profile.html
[modify] https://crrev.com/e67dbad97952415cabff9444ed85f543579240e6/chrome/browser/resources/md_user_manager/create_profile.js
[modify] https://crrev.com/e67dbad97952415cabff9444ed85f543579240e6/chrome/browser/resources/settings/people_page/manage_profile.html
[modify] https://crrev.com/e67dbad97952415cabff9444ed85f543579240e6/chrome/browser/resources/settings/people_page/manage_profile.js
[modify] https://crrev.com/e67dbad97952415cabff9444ed85f543579240e6/chrome/browser/resources/settings/people_page/people_page.html
[modify] https://crrev.com/e67dbad97952415cabff9444ed85f543579240e6/chrome/test/data/webui/cr_elements/cr_profile_avatar_selector_tests.js
[modify] https://crrev.com/e67dbad97952415cabff9444ed85f543579240e6/chrome/test/data/webui/md_user_manager/create_profile_tests.js
[modify] https://crrev.com/e67dbad97952415cabff9444ed85f543579240e6/chrome/test/data/webui/settings/people_page_manage_profile_test.js
[modify] https://crrev.com/e67dbad97952415cabff9444ed85f543579240e6/ui/webui/resources/cr_elements/cr_profile_avatar_selector/compiled_resources2.gyp
[modify] https://crrev.com/e67dbad97952415cabff9444ed85f543579240e6/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.html
[modify] https://crrev.com/e67dbad97952415cabff9444ed85f543579240e6/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.js
[modify] https://crrev.com/e67dbad97952415cabff9444ed85f543579240e6/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.html
[modify] https://crrev.com/e67dbad97952415cabff9444ed85f543579240e6/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.js

Project Member

Comment 10 by bugdroid1@chromium.org, Jun 26 2017

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

commit 16d4bfed7e1a4f29cdc9e471dbaaddfd12419e50
Author: dpapad <dpapad@chromium.org>
Date: Mon Jun 26 22:59:07 2017

MD Settings: Tweak selected avatar border in selection grid.

Per UX request, it should be 2px instead of 1px. Also removing unused
--avatar-selector-avatar-selected CSS mixin.

BUG= 734789 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Review-Url: https://codereview.chromium.org/2956953002
Cr-Commit-Position: refs/heads/master@{#482450}

[modify] https://crrev.com/16d4bfed7e1a4f29cdc9e471dbaaddfd12419e50/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.html

Status: Fixed (was: Started)
> the selected state should be 2px GoogleBlue500 <-- This is new and true for all platforms

Fixed.

> the selected state should be present upon opening chrome://settings/manageProfile

Tracked by  issue 710660 , and it was a tradeoff we made to have high DPI icons (see details in that bug). Fixing this seems more involved.

> 1 click is required to toggle between avatars. It should take 1 click to toggle the selected state

Fixed.

Sign in to add a comment