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

Issue 2402553002: MD Settings: Implementing modal popup/action menus. (Closed)

Created:
4 years, 2 months ago by dpapad
Modified:
4 years, 2 months ago
Reviewers:
Dan Beam
CC:
arv+watch_chromium.org, chromium-reviews, dbeam+watch-settings_chromium.org, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, stevenjb+watch-md-settings_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MD Settings: Implementing modal popup/action menus. Specifically, introducing a new settings-action-menu element implemented as a native <dialog>. This solves a suite of problems that current action menu implementations suffer from (cr-shared-menu, iron-dropdown), such as scrolling, focus and z-index/stacking context problems. Migrating two such menus (search engines, languages). Remaining menus will be migrated in follow up CLs. BUG=639718 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/46b5ca1056271d70ed5e264612aafe9fa948a2a4 Cr-Commit-Position: refs/heads/master@{#425534}

Patch Set 1 #

Patch Set 2 : Simplify #

Patch Set 3 : Rename, add up/down arrow handling. #

Patch Set 4 : Fix direction #

Patch Set 5 : Address window resize, plus others. #

Patch Set 6 : Left/right keys. #

Patch Set 7 : Position smarter. #

Total comments: 8

Patch Set 8 : Generalize #

Patch Set 9 : Fix compilation. #

Patch Set 10 : Fix tests. #

Patch Set 11 : Fix RTL #

Total comments: 2

Patch Set 12 : Address comments. #

Total comments: 21

Patch Set 13 : Address comments. #

Patch Set 14 : Remove recursion. #

Total comments: 2

Patch Set 15 : Remove infinite loop, simplify more. #

Patch Set 16 : Rename. #

Patch Set 17 : Add unit tests #

Patch Set 18 : Remove unused ids from test HTML. #

Patch Set 19 : Simplify return statement. #

Patch Set 20 : Fix compiler. #

Patch Set 21 : Fix test breakage caused by compiler suppress hack. #

Total comments: 17

Patch Set 22 : Addressing comments. #

Patch Set 23 : Change click to tap #

Patch Set 24 : Make resize listening smarter. #

Total comments: 16

Patch Set 25 : Address comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+403 lines, -73 lines) Patch
M chrome/browser/resources/settings/compiled_resources2.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +7 lines, -0 lines 0 comments Download
M chrome/browser/resources/settings/languages_page/compiled_resources2.gyp View 1 2 3 4 5 6 7 8 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/languages_page/languages_page.html View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +7 lines, -11 lines 0 comments Download
M chrome/browser/resources/settings/languages_page/languages_page.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 7 chunks +12 lines, -14 lines 0 comments Download
M chrome/browser/resources/settings/search_engines_page/compiled_resources2.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/resources/settings/search_engines_page/search_engine_entry.html View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +15 lines, -17 lines 0 comments Download
M chrome/browser/resources/settings/search_engines_page/search_engine_entry.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +8 lines, -1 line 0 comments Download
A chrome/browser/resources/settings/settings_action_menu.html View 1 2 3 4 5 6 7 8 9 10 1 chunk +23 lines, -0 lines 0 comments Download
A chrome/browser/resources/settings/settings_action_menu.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +165 lines, -0 lines 0 comments Download
M chrome/browser/resources/settings/settings_resources.grd View 1 2 3 4 5 6 7 8 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/test/data/webui/settings/cr_settings_browsertest.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +17 lines, -0 lines 0 comments Download
M chrome/test/data/webui/settings/languages_page_browsertest.js View 1 2 3 4 5 6 7 8 9 4 chunks +23 lines, -29 lines 0 comments Download
M chrome/test/data/webui/settings/search_engines_page_test.js View 1 2 3 4 5 6 7 8 9 2 chunks +6 lines, -0 lines 0 comments Download
A chrome/test/data/webui/settings/settings_action_menu_test.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +111 lines, -0 lines 0 comments Download

Messages

Total messages: 53 (33 generated)
dpapad
Screenshots at http://imgur.com/a/Vv9qM. Green tests at patch 10.
4 years, 2 months ago (2016-10-13 00:20:54 UTC) #13
dpapad
https://codereview.chromium.org/2402553002/diff/220001/chrome/browser/resources/settings/settings_action_menu.js File chrome/browser/resources/settings/settings_action_menu.js (right): https://codereview.chromium.org/2402553002/diff/220001/chrome/browser/resources/settings/settings_action_menu.js#newcode127 chrome/browser/resources/settings/settings_action_menu.js:127: this.style.right = right + 'px'; I don't know if ...
4 years, 2 months ago (2016-10-13 00:23:17 UTC) #14
Dan Beam
https://codereview.chromium.org/2402553002/diff/140001/chrome/browser/resources/settings/cr_action_menu.js File chrome/browser/resources/settings/cr_action_menu.js (right): https://codereview.chromium.org/2402553002/diff/140001/chrome/browser/resources/settings/cr_action_menu.js#newcode26 chrome/browser/resources/settings/cr_action_menu.js:26: onWindowResize_: null, nit: just do this after the ctor ...
4 years, 2 months ago (2016-10-13 00:28:34 UTC) #15
dpapad
https://codereview.chromium.org/2402553002/diff/140001/chrome/browser/resources/settings/cr_action_menu.js File chrome/browser/resources/settings/cr_action_menu.js (right): https://codereview.chromium.org/2402553002/diff/140001/chrome/browser/resources/settings/cr_action_menu.js#newcode26 chrome/browser/resources/settings/cr_action_menu.js:26: onWindowResize_: null, On 2016/10/13 at 00:28:34, Dan Beam wrote: ...
4 years, 2 months ago (2016-10-13 00:51:22 UTC) #16
Dan Beam
didn't get to the tests yet https://codereview.chromium.org/2402553002/diff/230001/chrome/browser/resources/settings/languages_page/languages_page.html File chrome/browser/resources/settings/languages_page/languages_page.html (right): https://codereview.chromium.org/2402553002/diff/230001/chrome/browser/resources/settings/languages_page/languages_page.html#newcode18 chrome/browser/resources/settings/languages_page/languages_page.html:18: <link rel="import" href="/settings_action_menu.html"> ...
4 years, 2 months ago (2016-10-13 05:03:01 UTC) #17
dpapad
https://codereview.chromium.org/2402553002/diff/230001/chrome/browser/resources/settings/languages_page/languages_page.html File chrome/browser/resources/settings/languages_page/languages_page.html (right): https://codereview.chromium.org/2402553002/diff/230001/chrome/browser/resources/settings/languages_page/languages_page.html#newcode18 chrome/browser/resources/settings/languages_page/languages_page.html:18: <link rel="import" href="/settings_action_menu.html"> On 2016/10/13 at 05:03:01, Dan Beam ...
4 years, 2 months ago (2016-10-13 18:18:01 UTC) #18
dpapad
https://codereview.chromium.org/2402553002/diff/230001/chrome/browser/resources/settings/settings_action_menu.js File chrome/browser/resources/settings/settings_action_menu.js (right): https://codereview.chromium.org/2402553002/diff/230001/chrome/browser/resources/settings/settings_action_menu.js#newcode100 chrome/browser/resources/settings/settings_action_menu.js:100: return getNextOptionRec_(); On 2016/10/13 at 18:18:01, dpapad wrote: > ...
4 years, 2 months ago (2016-10-13 18:58:25 UTC) #19
Dan Beam
https://codereview.chromium.org/2402553002/diff/230001/chrome/browser/resources/settings/settings_action_menu.js File chrome/browser/resources/settings/settings_action_menu.js (right): https://codereview.chromium.org/2402553002/diff/230001/chrome/browser/resources/settings/settings_action_menu.js#newcode105 chrome/browser/resources/settings/settings_action_menu.js:105: * @param {!ClientRect} rect On 2016/10/13 05:03:01, Dan Beam ...
4 years, 2 months ago (2016-10-13 19:01:24 UTC) #20
Dan Beam
https://codereview.chromium.org/2402553002/diff/270001/chrome/browser/resources/settings/settings_action_menu.js File chrome/browser/resources/settings/settings_action_menu.js (right): https://codereview.chromium.org/2402553002/diff/270001/chrome/browser/resources/settings/settings_action_menu.js#newcode106 chrome/browser/resources/settings/settings_action_menu.js:106: showAtLocation: function(anchorElement) { ah, nevermind can we just rename ...
4 years, 2 months ago (2016-10-13 19:02:50 UTC) #21
dpapad
https://codereview.chromium.org/2402553002/diff/270001/chrome/browser/resources/settings/settings_action_menu.js File chrome/browser/resources/settings/settings_action_menu.js (right): https://codereview.chromium.org/2402553002/diff/270001/chrome/browser/resources/settings/settings_action_menu.js#newcode106 chrome/browser/resources/settings/settings_action_menu.js:106: showAtLocation: function(anchorElement) { On 2016/10/13 at 19:02:50, Dan Beam ...
4 years, 2 months ago (2016-10-13 19:17:41 UTC) #22
dpapad
Added unit tests, which revealed a small bug!
4 years, 2 months ago (2016-10-13 21:11:24 UTC) #24
dpapad
Fixed closure compilation. PTAL.
4 years, 2 months ago (2016-10-13 22:21:18 UTC) #30
Dan Beam
these tests are awesome! https://codereview.chromium.org/2402553002/diff/430001/chrome/browser/resources/settings/settings_action_menu.js File chrome/browser/resources/settings/settings_action_menu.js (right): https://codereview.chromium.org/2402553002/diff/430001/chrome/browser/resources/settings/settings_action_menu.js#newcode51 chrome/browser/resources/settings/settings_action_menu.js:51: this.addEventListener('click', function(e) { can you ...
4 years, 2 months ago (2016-10-14 03:51:13 UTC) #39
dpapad
https://codereview.chromium.org/2402553002/diff/430001/chrome/browser/resources/settings/settings_action_menu.js File chrome/browser/resources/settings/settings_action_menu.js (right): https://codereview.chromium.org/2402553002/diff/430001/chrome/browser/resources/settings/settings_action_menu.js#newcode51 chrome/browser/resources/settings/settings_action_menu.js:51: this.addEventListener('click', function(e) { On 2016/10/14 at 03:51:13, Dan Beam ...
4 years, 2 months ago (2016-10-14 17:39:23 UTC) #40
dpapad
https://codereview.chromium.org/2402553002/diff/430001/chrome/browser/resources/settings/settings_action_menu.js File chrome/browser/resources/settings/settings_action_menu.js (right): https://codereview.chromium.org/2402553002/diff/430001/chrome/browser/resources/settings/settings_action_menu.js#newcode51 chrome/browser/resources/settings/settings_action_menu.js:51: this.addEventListener('click', function(e) { On 2016/10/14 at 03:51:13, Dan Beam ...
4 years, 2 months ago (2016-10-14 17:49:09 UTC) #41
Dan Beam
lgtm https://codereview.chromium.org/2402553002/diff/490001/chrome/browser/resources/settings/compiled_resources2.gyp File chrome/browser/resources/settings/compiled_resources2.gyp (right): https://codereview.chromium.org/2402553002/diff/490001/chrome/browser/resources/settings/compiled_resources2.gyp#newcode78 chrome/browser/resources/settings/compiled_resources2.gyp:78: ':direction_delegate', just 'direction_delegate' (no ':' required) https://codereview.chromium.org/2402553002/diff/490001/chrome/browser/resources/settings/languages_page/languages_page.js File ...
4 years, 2 months ago (2016-10-14 23:31:06 UTC) #46
dpapad
https://codereview.chromium.org/2402553002/diff/490001/chrome/browser/resources/settings/compiled_resources2.gyp File chrome/browser/resources/settings/compiled_resources2.gyp (right): https://codereview.chromium.org/2402553002/diff/490001/chrome/browser/resources/settings/compiled_resources2.gyp#newcode78 chrome/browser/resources/settings/compiled_resources2.gyp:78: ':direction_delegate', On 2016/10/14 at 23:31:06, Dan Beam wrote: > ...
4 years, 2 months ago (2016-10-15 01:02:09 UTC) #47
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/2402553002/510001
4 years, 2 months ago (2016-10-15 01:03:54 UTC) #50
commit-bot: I haz the power
Committed patchset #25 (id:510001)
4 years, 2 months ago (2016-10-15 02:12:06 UTC) #51
commit-bot: I haz the power
4 years, 2 months ago (2016-10-15 02:14:05 UTC) #53
Message was sent while issue was closed.
Patchset 25 (id:??) landed as
https://crrev.com/46b5ca1056271d70ed5e264612aafe9fa948a2a4
Cr-Commit-Position: refs/heads/master@{#425534}

Powered by Google App Engine
This is Rietveld 408576698