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

Issue 1477773003: Use dom-if to hide settings pages and show explicitly. (Closed)

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

Description

Use dom-if to hide settings pages and show explicitly. This CL: * Wraps each settings subpage with a dom-if * Adds a new SettingsPageVisibility behavior that allows tests to control page visibility. * NOTE: This changes the page load order (subpages are all loaded after the main pages and their dependencies). This has the side benefit of making Prefs more likely to load before the pages do. * Fixes an inconsistency with the naming of the OnStartup section NOTE: This does not impact i18n_template.js since that is loaded after <cr-settings> in settings.html, however if we enable a subpage after loading (e.g. in a test) then i18n_template.js will not be processed and would need to be run explicitly to include translations. BUG=560432 R=dbeam@chromium.org, michaelpg@chromium.org Committed: https://chromium.googlesource.com/chromium/src/+/004444d1a5d12d477446abda2376648d5701551c

Patch Set 1 #

Total comments: 2

Patch Set 2 : Re-upload PS2 #

Patch Set 3 : Feedback #

Total comments: 16

Patch Set 4 : Feedback #

Patch Set 5 : dom-if settings-sections, use SettingsHideAllPagesForTest #

Patch Set 6 : . #

Total comments: 13

Patch Set 7 : Rebase without onStartup change #

Patch Set 8 : Feedback #

Patch Set 9 : Rebase #

Patch Set 10 : restamp #

Patch Set 11 : Rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+207 lines, -134 lines) Patch
M chrome/browser/resources/settings/advanced_page/advanced_page.html View 1 2 3 4 5 6 7 8 9 2 chunks +69 lines, -54 lines 0 comments Download
M chrome/browser/resources/settings/advanced_page/advanced_page.js View 1 2 3 4 1 chunk +9 lines, -4 lines 0 comments Download
A + chrome/browser/resources/settings/advanced_page/compiled_resources.gyp View 1 2 3 1 chunk +4 lines, -7 lines 0 comments Download
M chrome/browser/resources/settings/basic_page/basic_page.html View 1 2 3 4 5 6 7 8 9 2 chunks +53 lines, -40 lines 0 comments Download
M chrome/browser/resources/settings/basic_page/basic_page.js View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
A + chrome/browser/resources/settings/basic_page/compiled_resources.gyp View 1 2 3 1 chunk +3 lines, -4 lines 0 comments Download
M chrome/browser/resources/settings/compiled_resources.gyp View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
A + chrome/browser/resources/settings/settings_page/compiled_resources.gyp View 1 2 3 4 5 1 chunk +2 lines, -5 lines 0 comments Download
A + chrome/browser/resources/settings/settings_page/settings_page_visibility.html View 1 chunk +1 line, -2 lines 0 comments Download
A chrome/browser/resources/settings/settings_page/settings_page_visibility.js View 1 2 3 4 5 6 7 1 chunk +46 lines, -0 lines 0 comments Download
M chrome/browser/resources/settings/settings_resources.grd View 1 2 3 4 5 6 7 8 9 10 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/browser/resources/settings/site_settings/site_details_permission.js View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/resources/settings/site_settings/site_list.js View 1 2 3 4 5 6 7 8 1 chunk +0 lines, -6 lines 0 comments Download
M chrome/browser/resources/settings/site_settings/site_settings_behavior.js View 1 2 3 4 5 6 7 8 1 chunk +9 lines, -0 lines 0 comments Download
M chrome/browser/resources/settings/site_settings/site_settings_category.js View 1 chunk +0 lines, -7 lines 0 comments Download

Messages

Total messages: 40 (11 generated)
stevenjb
Consider this a proposal. With these changes I have been able to write tests that ...
5 years ago (2015-11-25 19:17:07 UTC) #2
michaelpg
On 2015/11/25 19:17:07, stevenjb wrote: > Consider this a proposal. > > With these changes ...
5 years ago (2015-11-25 19:23:14 UTC) #3
stevenjb
On 2015/11/25 19:23:14, michaelpg wrote: > On 2015/11/25 19:17:07, stevenjb wrote: > > Consider this ...
5 years ago (2015-11-25 20:32:30 UTC) #5
Dan Beam
https://codereview.chromium.org/1477773003/diff/1/chrome/browser/resources/settings/basic_page/basic_page.js File chrome/browser/resources/settings/basic_page/basic_page.js (right): https://codereview.chromium.org/1477773003/diff/1/chrome/browser/resources/settings/basic_page/basic_page.js#newcode44 chrome/browser/resources/settings/basic_page/basic_page.js:44: this.setVisiblePages([ why do we need this? why can't the ...
5 years ago (2015-11-30 19:22:43 UTC) #6
stevenjb
https://codereview.chromium.org/1477773003/diff/1/chrome/browser/resources/settings/basic_page/basic_page.js File chrome/browser/resources/settings/basic_page/basic_page.js (right): https://codereview.chromium.org/1477773003/diff/1/chrome/browser/resources/settings/basic_page/basic_page.js#newcode44 chrome/browser/resources/settings/basic_page/basic_page.js:44: this.setVisiblePages([ On 2015/11/30 19:22:43, Dan Beam wrote: > why ...
5 years ago (2015-11-30 20:32:47 UTC) #7
stevenjb
Dan, is this along the lines of what you were suggesting? Keeping but hiding each ...
5 years ago (2015-11-30 21:58:29 UTC) #9
Dan Beam
https://codereview.chromium.org/1477773003/diff/40001/chrome/browser/resources/settings/controls/settings_checkbox.js File chrome/browser/resources/settings/controls/settings_checkbox.js (right): https://codereview.chromium.org/1477773003/diff/40001/chrome/browser/resources/settings/controls/settings_checkbox.js#newcode92 chrome/browser/resources/settings/controls/settings_checkbox.js:92: var newvalue = this.getNewValue_(this.checked); newValue https://codereview.chromium.org/1477773003/diff/40001/chrome/browser/resources/settings/controls/settings_checkbox.js#newcode95 chrome/browser/resources/settings/controls/settings_checkbox.js:95: this.set('pref.value', newvalue); ...
5 years ago (2015-12-01 04:36:14 UTC) #10
stevenjb
Dan, huge apologies, I accidentally deleted the patchset with your comments (and my replies). I'll ...
5 years ago (2015-12-01 17:40:16 UTC) #13
stevenjb
PTAL
5 years ago (2015-12-01 17:40:32 UTC) #14
michaelpg
On 2015/12/01 04:36:14, Dan Beam wrote: > https://codereview.chromium.org/1477773003/diff/40001/chrome/browser/resources/settings/controls/settings_checkbox.js > File chrome/browser/resources/settings/controls/settings_checkbox.js (right): > > https://codereview.chromium.org/1477773003/diff/40001/chrome/browser/resources/settings/controls/settings_checkbox.js#newcode92 ...
5 years ago (2015-12-02 19:01:11 UTC) #15
michaelpg
https://codereview.chromium.org/1477773003/diff/100001/chrome/browser/resources/settings/advanced_page/advanced_page.html File chrome/browser/resources/settings/advanced_page/advanced_page.html (right): https://codereview.chromium.org/1477773003/diff/100001/chrome/browser/resources/settings/advanced_page/advanced_page.html#newcode25 chrome/browser/resources/settings/advanced_page/advanced_page.html:25: <template is="dom-if" if="[[pageVisible.dateTime]]"> why can't we include the <settings-section> ...
5 years ago (2015-12-02 19:22:52 UTC) #16
stevenjb
PTAL https://codereview.chromium.org/1477773003/diff/100001/chrome/browser/resources/settings/advanced_page/advanced_page.html File chrome/browser/resources/settings/advanced_page/advanced_page.html (right): https://codereview.chromium.org/1477773003/diff/100001/chrome/browser/resources/settings/advanced_page/advanced_page.html#newcode25 chrome/browser/resources/settings/advanced_page/advanced_page.html:25: <template is="dom-if" if="[[pageVisible.dateTime]]"> On 2015/12/02 19:22:51, michaelpg wrote: ...
5 years ago (2015-12-02 21:57:10 UTC) #17
Dan Beam
so in talking with stevenjb@ on chat, there were a few things we realized: 1) ...
5 years ago (2015-12-03 19:46:51 UTC) #18
chromium-reviews
Dan, that looks good to me. I'm not sure if it's true that the templates ...
5 years ago (2015-12-03 20:05:57 UTC) #19
michaelpg
"chromium-reviews" was me btw. On 2015/12/03 20:05:57, chromium-reviews wrote: > Dan, that looks good to ...
5 years ago (2015-12-03 20:07:08 UTC) #20
stevenjb
On Thu, Dec 3, 2015 at 1:07 PM, <michaelpg@chromium.org> wrote: > "chromium-reviews" was me btw. ...
5 years ago (2015-12-07 19:54:22 UTC) #21
michaelpg
On 2015/12/07 19:54:22, stevenjb wrote: > On Thu, Dec 3, 2015 at 1:07 PM, <mailto:michaelpg@chromium.org> ...
5 years ago (2015-12-07 20:23:14 UTC) #22
stevenjb
Interesting. I'll try some tests. On Mon, Dec 7, 2015 at 1:23 PM, <michaelpg@chromium.org> wrote: ...
5 years ago (2015-12-07 20:58:19 UTC) #23
stevenjb
OK, this latest patcheset is closest to PS1, so you may want to ignore the ...
5 years ago (2015-12-07 23:54:23 UTC) #24
michaelpg
On 2015/12/07 23:54:23, stevenjb wrote: > OK, this latest patcheset is closest to PS1, so ...
5 years ago (2015-12-08 00:45:47 UTC) #26
michaelpg
https://codereview.chromium.org/1477773003/diff/160001/chrome/browser/resources/settings/settings_page/settings_page_visibility.js File chrome/browser/resources/settings/settings_page/settings_page_visibility.js (right): https://codereview.chromium.org/1477773003/diff/160001/chrome/browser/resources/settings/settings_page/settings_page_visibility.js#newcode31 chrome/browser/resources/settings/settings_page/settings_page_visibility.js:31: * @type {Object<string, boolean>} nit: just Object<boolean>, keys are ...
5 years ago (2015-12-08 00:45:58 UTC) #27
Dan Beam
lgtm https://codereview.chromium.org/1477773003/diff/160001/chrome/browser/resources/settings/on_startup_page/on_startup_page.html File chrome/browser/resources/settings/on_startup_page/on_startup_page.html (right): https://codereview.chromium.org/1477773003/diff/160001/chrome/browser/resources/settings/on_startup_page/on_startup_page.html#newcode16 chrome/browser/resources/settings/on_startup_page/on_startup_page.html:16: section="onStartup"> please try to stop writing these: https://en.wikipedia.org/wiki/Omnibus_bill ...
5 years ago (2015-12-08 02:55:27 UTC) #28
stevenjb
https://codereview.chromium.org/1477773003/diff/160001/chrome/browser/resources/settings/on_startup_page/on_startup_page.html File chrome/browser/resources/settings/on_startup_page/on_startup_page.html (right): https://codereview.chromium.org/1477773003/diff/160001/chrome/browser/resources/settings/on_startup_page/on_startup_page.html#newcode16 chrome/browser/resources/settings/on_startup_page/on_startup_page.html:16: section="onStartup"> On 2015/12/08 02:55:27, Dan Beam wrote: > please ...
5 years ago (2015-12-08 20:07:37 UTC) #29
michaelpg
https://codereview.chromium.org/1477773003/diff/160001/chrome/browser/resources/settings/basic_page/basic_page.html File chrome/browser/resources/settings/basic_page/basic_page.html (right): https://codereview.chromium.org/1477773003/diff/160001/chrome/browser/resources/settings/basic_page/basic_page.html#newcode22 chrome/browser/resources/settings/basic_page/basic_page.html:22: <template is="dom-if" if="[[showPage(pageVisibility.people)]]"> Set the restamp attribute on all ...
5 years ago (2015-12-08 22:27:08 UTC) #30
stevenjb
https://codereview.chromium.org/1477773003/diff/160001/chrome/browser/resources/settings/basic_page/basic_page.html File chrome/browser/resources/settings/basic_page/basic_page.html (right): https://codereview.chromium.org/1477773003/diff/160001/chrome/browser/resources/settings/basic_page/basic_page.html#newcode22 chrome/browser/resources/settings/basic_page/basic_page.html:22: <template is="dom-if" if="[[showPage(pageVisibility.people)]]"> On 2015/12/08 22:27:08, michaelpg wrote: > ...
5 years ago (2015-12-10 16:59:34 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1477773003/240001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1477773003/240001
5 years ago (2015-12-10 17:05:17 UTC) #34
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/127606)
5 years ago (2015-12-10 17:15:58 UTC) #36
commit-bot: I haz the power
Patchset 11 (id:??) landed as https://crrev.com/004444d1a5d12d477446abda2376648d5701551c Cr-Commit-Position: refs/heads/master@{#364470}
5 years ago (2015-12-10 20:53:59 UTC) #38
stevenjb
5 years ago (2015-12-10 20:54:34 UTC) #40
Message was sent while issue was closed.
Committed patchset #11 (id:260001) manually as
004444d1a5d12d477446abda2376648d5701551c (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698