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

Issue 2224163002: Settings Router Refactor: Replace route.subpage usage with route.path (Closed)

Created:
4 years, 4 months ago by tommycli
Modified:
4 years, 4 months ago
Reviewers:
michaelpg
CC:
chromium-reviews, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, dbeam+watch-settings_chromium.org, stevenjb+watch-md-settings_chromium.org, arv+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Settings Router Refactor: Replace route.subpage usage with route.path The neon-animated-pages elements that previously had subpage ids now use the path as ids. (including the slashes) BUG=632382 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/1ce61a592e45865d01c17b36c86cbaf347dc5899 Cr-Commit-Position: refs/heads/master@{#411668}

Patch Set 1 #

Patch Set 2 : fix #

Total comments: 12

Patch Set 3 : fix #

Patch Set 4 : merge #

Patch Set 5 : rebase and fix tests #

Patch Set 6 : rebase and fix tests #

Patch Set 7 : fix tests #

Total comments: 8

Patch Set 8 : fix comments #

Patch Set 9 : fix test #

Patch Set 10 : merge #

Total comments: 5

Patch Set 11 : Update. #

Patch Set 12 : remove dialog test #

Patch Set 13 : fix devices test #

Patch Set 14 : merge #

Unified diffs Side-by-side diffs Delta from patch set Stats (+180 lines, -224 lines) Patch
M chrome/browser/resources/settings/a11y_page/a11y_page.html View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/about_page/about_page.html View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/appearance_page/appearance_page.html View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/bluetooth_page/bluetooth_page.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/device_page/device_page.html View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/resources/settings/internet_page/internet_page.html View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/resources/settings/languages_page/languages_page.html View 1 2 5 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/resources/settings/passwords_and_forms_page/passwords_and_forms_page.html View 1 2 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/resources/settings/people_page/people_page.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/resources/settings/printing_page/printing_page.html View 1 2 3 chunks +4 lines, -4 lines 0 comments Download
M chrome/browser/resources/settings/privacy_page/privacy_page.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 16 chunks +17 lines, -19 lines 0 comments Download
M chrome/browser/resources/settings/privacy_page/privacy_page.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/route.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 5 chunks +81 lines, -112 lines 0 comments Download
M chrome/browser/resources/settings/search_page/search_page.html View 1 2 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/settings_main/settings_main.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/settings_page/main_page_behavior.js View 1 2 3 4 5 chunks +6 lines, -6 lines 0 comments Download
M chrome/browser/resources/settings/settings_page/settings_animated_pages.html View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/settings_page/settings_animated_pages.js View 1 2 6 chunks +9 lines, -10 lines 0 comments Download
M chrome/test/data/webui/settings/device_page_tests.js View 1 2 3 4 5 6 7 8 9 10 6 chunks +16 lines, -15 lines 0 comments Download
M chrome/test/data/webui/settings/languages_page_browsertest.js View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/test/data/webui/settings/route_tests.js View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +6 lines, -17 lines 0 comments Download
M chrome/test/data/webui/settings/settings_page_browsertest.js View 1 2 3 4 5 6 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 72 (56 generated)
tommycli
michaelpg: PTAL, thanks!!
4 years, 4 months ago (2016-08-08 22:25:34 UTC) #11
michaelpg
So the title should be "replace route.subpage with route.path", basically. Or at least it would ...
4 years, 4 months ago (2016-08-09 03:07:48 UTC) #12
tommycli
michaelpg: Thanks. BTW, CSS selectors can technically work on ids with slashes, they just look ...
4 years, 4 months ago (2016-08-09 16:03:14 UTC) #14
michaelpg
https://codereview.chromium.org/2224163002/diff/20001/chrome/browser/resources/settings/settings_page/settings_animated_pages.js File chrome/browser/resources/settings/settings_page/settings_animated_pages.js (right): https://codereview.chromium.org/2224163002/diff/20001/chrome/browser/resources/settings/settings_page/settings_animated_pages.js#newcode90 chrome/browser/resources/settings/settings_page/settings_animated_pages.js:90: switchToSubpage_: function(newRoute, oldRoute) { On 2016/08/09 16:03:14, tommycli wrote: ...
4 years, 4 months ago (2016-08-09 20:39:32 UTC) #15
tommycli
michaelpg: Thanks. I merged, so the delta might look big. See below https://codereview.chromium.org/2224163002/diff/20001/chrome/browser/resources/settings/settings_page/settings_animated_pages.js File chrome/browser/resources/settings/settings_page/settings_animated_pages.js ...
4 years, 4 months ago (2016-08-10 17:21:33 UTC) #26
michaelpg
https://codereview.chromium.org/2224163002/diff/20001/chrome/browser/resources/settings/settings_page/settings_animated_pages.js File chrome/browser/resources/settings/settings_page/settings_animated_pages.js (right): https://codereview.chromium.org/2224163002/diff/20001/chrome/browser/resources/settings/settings_page/settings_animated_pages.js#newcode90 chrome/browser/resources/settings/settings_page/settings_animated_pages.js:90: switchToSubpage_: function(newRoute, oldRoute) { On 2016/08/10 17:21:33, tommycli wrote: ...
4 years, 4 months ago (2016-08-10 18:45:52 UTC) #33
tommycli
https://codereview.chromium.org/2224163002/diff/20001/chrome/browser/resources/settings/settings_page/settings_animated_pages.js File chrome/browser/resources/settings/settings_page/settings_animated_pages.js (right): https://codereview.chromium.org/2224163002/diff/20001/chrome/browser/resources/settings/settings_page/settings_animated_pages.js#newcode90 chrome/browser/resources/settings/settings_page/settings_animated_pages.js:90: switchToSubpage_: function(newRoute, oldRoute) { On 2016/08/10 18:45:51, michaelpg wrote: ...
4 years, 4 months ago (2016-08-10 18:52:18 UTC) #35
michaelpg
lgtm, see comments https://codereview.chromium.org/2224163002/diff/180001/chrome/browser/resources/settings/route.js File chrome/browser/resources/settings/route.js (right): https://codereview.chromium.org/2224163002/diff/180001/chrome/browser/resources/settings/route.js#newcode90 chrome/browser/resources/settings/route.js:90: return !this.dialog && !!this.parent && I ...
4 years, 4 months ago (2016-08-11 03:41:13 UTC) #47
tommycli
michaelpg: Thanks for the feedback. In the last patchset I just remove the createDialog method, ...
4 years, 4 months ago (2016-08-11 19:15:02 UTC) #50
tommycli
On 2016/08/11 19:15:02, tommycli wrote: > michaelpg: Thanks for the feedback. In the last patchset ...
4 years, 4 months ago (2016-08-11 19:19:59 UTC) #51
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/2224163002/240001
4 years, 4 months ago (2016-08-11 23:35:19 UTC) #62
commit-bot: I haz the power
Failed to apply patch for chrome/browser/resources/settings/people_page/people_page.html: While running git apply --index -3 -p1; error: patch ...
4 years, 4 months ago (2016-08-12 00:28:41 UTC) #64
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/2224163002/260001
4 years, 4 months ago (2016-08-12 14:44:52 UTC) #67
commit-bot: I haz the power
Committed patchset #14 (id:260001)
4 years, 4 months ago (2016-08-12 16:20:15 UTC) #69
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/1ce61a592e45865d01c17b36c86cbaf347dc5899 Cr-Commit-Position: refs/heads/master@{#411668}
4 years, 4 months ago (2016-08-12 16:22:00 UTC) #71
michaelpg
4 years, 4 months ago (2016-08-12 22:43:05 UTC) #72
Message was sent while issue was closed.
https://codereview.chromium.org/2224163002/diff/180001/chrome/browser/resourc...
File chrome/browser/resources/settings/route.js (right):

https://codereview.chromium.org/2224163002/diff/180001/chrome/browser/resourc...
chrome/browser/resources/settings/route.js:90: return !this.dialog &&
!!this.parent &&
On 2016/08/11 19:15:02, tommycli wrote:
> On 2016/08/11 03:41:13, michaelpg wrote:
> > I suggest removing the !this.dialog check (and comment): if dialog routes
are
> > never in sections, then it's redundant. Removing the check means we're still
> > safe if we *do* add a subpage dialog -- the transitions won't get confused
and
> > broken.
> > 
> > IOW: if we don't have navigable subpage dialogs, `!this.dialog &&` has no
> > effect; if we do, things break. That was my original point, anyway -- we're
> > replacing subpage.length > 0 with isSubpage(), so I'd prefer if they stayed
> > equal in this CL.
> 
> Removing !this.dialog doesn't work, since we changed the isSubpage test from
> looking at the length of the subpage array to checking if the current route's
> section is equal to the parent route's section.

Right, so this would have returned *true* for clear-browser-data, which is what
I wanted. I'll open a bug on the behavior that I see now, so we can start with
concrete behavior :-)

> 
> In the latest patchset, I just removed the concept of a dialog route and
special
> cased the CLEAR_BROWSING_DATA instance. Is that clearer?

Powered by Google App Engine
This is Rietveld 408576698