Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(567)

Issue 2950943002: MD Settings: Stop using IronMenuBehavior from cr-profile-avatar-selector-grid. (Closed)

Created:
3 years, 6 months ago by dpapad
Modified:
3 years, 6 months ago
Reviewers:
tommycli
CC:
chromium-reviews, Dan Beam, michaelpg+watch-elements_chromium.org, oshima+watch_chromium.org, stevenjb+watch-md-settings_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

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} Committed: https://chromium.googlesource.com/chromium/src/+/e67dbad97952415cabff9444ed85f543579240e6

Patch Set 1 #

Patch Set 2 : Remove more #

Patch Set 3 : More work #

Patch Set 4 : Fix compilation. #

Patch Set 5 : More #

Patch Set 6 : Fixing most tests. #

Patch Set 7 : Fix more tests. #

Patch Set 8 : Cleanup #

Patch Set 9 : Nits. #

Patch Set 10 : Simplify key handler. #

Patch Set 11 : Delete commented out test. #

Total comments: 11

Patch Set 12 : Address comments. #

Patch Set 13 : Added comment. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+140 lines, -208 lines) Patch
M chrome/browser/resources/md_user_manager/create_profile.html View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/md_user_manager/create_profile.js View 1 2 3 4 5 6 7 8 5 chunks +9 lines, -27 lines 0 comments Download
M chrome/browser/resources/settings/people_page/manage_profile.html View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/resources/settings/people_page/manage_profile.js View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +12 lines, -12 lines 0 comments Download
M chrome/browser/resources/settings/people_page/people_page.html View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M chrome/test/data/webui/cr_elements/cr_profile_avatar_selector_tests.js View 1 2 3 4 5 6 7 8 9 10 3 chunks +18 lines, -46 lines 0 comments Download
M chrome/test/data/webui/md_user_manager/create_profile_tests.js View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/test/data/webui/settings/people_page_manage_profile_test.js View 1 2 3 4 5 6 7 8 1 chunk +11 lines, -31 lines 0 comments Download
M ui/webui/resources/cr_elements/cr_profile_avatar_selector/compiled_resources2.gyp View 1 2 3 4 1 chunk +0 lines, -1 line 0 comments Download
M ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.html View 1 2 3 4 5 2 chunks +5 lines, -5 lines 0 comments Download
M ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector.js View 1 2 3 4 5 6 7 2 chunks +25 lines, -3 lines 0 comments Download
M ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.html View 1 2 3 4 2 chunks +3 lines, -3 lines 0 comments Download
M ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.js View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +52 lines, -74 lines 0 comments Download

Messages

Total messages: 40 (32 generated)
dpapad
Greet tests in patch#8. @tommycli: Sending to you since you have familiarity with the people_page/ ...
3 years, 6 months ago (2017-06-21 19:54:01 UTC) #20
dpapad
Friendly ping.
3 years, 6 months ago (2017-06-22 19:36:58 UTC) #25
tommycli
some questions https://codereview.chromium.org/2950943002/diff/220001/chrome/browser/resources/settings/people_page/manage_profile.js File chrome/browser/resources/settings/people_page/manage_profile.js (right): https://codereview.chromium.org/2950943002/diff/220001/chrome/browser/resources/settings/people_page/manage_profile.js#newcode21 chrome/browser/resources/settings/people_page/manage_profile.js:21: profileAvatar: { Since this property is no ...
3 years, 6 months ago (2017-06-22 21:45:33 UTC) #31
dpapad
https://codereview.chromium.org/2950943002/diff/220001/chrome/browser/resources/settings/people_page/manage_profile.js File chrome/browser/resources/settings/people_page/manage_profile.js (right): https://codereview.chromium.org/2950943002/diff/220001/chrome/browser/resources/settings/people_page/manage_profile.js#newcode21 chrome/browser/resources/settings/people_page/manage_profile.js:21: profileAvatar: { On 2017/06/22 at 21:45:31, tommycli wrote: > ...
3 years, 6 months ago (2017-06-22 23:22:49 UTC) #32
tommycli
LGTM (just one requested comment add below) https://codereview.chromium.org/2950943002/diff/220001/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.html File ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.html (right): https://codereview.chromium.org/2950943002/diff/220001/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.html#newcode15 ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.html:15: <content select=".avatar"></content> ...
3 years, 6 months ago (2017-06-22 23:25:32 UTC) #33
dpapad
Thanks. https://codereview.chromium.org/2950943002/diff/220001/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.js File ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.js (right): https://codereview.chromium.org/2950943002/diff/220001/ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.js#newcode77 ui/webui/resources/cr_elements/cr_profile_avatar_selector/cr_profile_avatar_selector_grid.js:77: break; > Ah gotcha. Could be worth adding ...
3 years, 6 months ago (2017-06-22 23:47:55 UTC) #34
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2950943002/260001
3 years, 6 months ago (2017-06-22 23:50:03 UTC) #37
commit-bot: I haz the power
3 years, 6 months ago (2017-06-23 01:54:49 UTC) #40
Message was sent while issue was closed.
Committed patchset #13 (id:260001) as
https://chromium.googlesource.com/chromium/src/+/e67dbad97952415cabff9444ed85...

Powered by Google App Engine
This is Rietveld 408576698