Selected state not working properly |
|||||||
Issue descriptionChrome 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
,
Jun 20 2017
+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
,
Jun 20 2017
,
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
,
Jun 20 2017
,
Jun 21 2017
,
Jun 21 2017
,
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
,
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
,
Jun 27 2017
> 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 |
|||||||
Comment 1 by dpa...@chromium.org
, Jun 20 2017