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

Issue 1345913002: [MD settings] adding isNewTabPage setting radio buttons (Closed)

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

Description

[MD settings] adding isNewTabPage setting radio buttons This CL adds UI to set a preference on whether to use a NewTabPage for the homepage or whether to use a custom url for the homepage. This CL had a bit of extra challenge because the pref is a bool and the UI control are radio buttons. This is solved by using a local string property to store the radio button state. BUG=531786

Patch Set 1 #

Total comments: 13

Patch Set 2 : review changes #

Total comments: 2

Patch Set 3 : adding underscores for private values #

Patch Set 4 : using true/false strings #

Unified diffs Side-by-side diffs Delta from patch set Stats (+41 lines, -19 lines) Patch
M chrome/browser/resources/settings/appearance_page/appearance_page.html View 1 2 3 2 chunks +11 lines, -9 lines 0 comments Download
M chrome/browser/resources/settings/appearance_page/appearance_page.js View 1 2 3 3 chunks +30 lines, -10 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 19 (4 generated)
dschuyler
5 years, 3 months ago (2015-09-15 22:30:53 UTC) #2
Dan Beam
t/f is not better than true/false, IMO https://codereview.chromium.org/1345913002/diff/1/chrome/browser/resources/settings/appearance_page/appearance_page.html File chrome/browser/resources/settings/appearance_page/appearance_page.html (right): https://codereview.chromium.org/1345913002/diff/1/chrome/browser/resources/settings/appearance_page/appearance_page.html#newcode30 chrome/browser/resources/settings/appearance_page/appearance_page.html:30: hidden="[[!prefs.browser.show_home_button.value]]" can ...
5 years, 3 months ago (2015-09-15 23:44:44 UTC) #4
stevenjb
I *think* we can wrap paper-radio-group as <cr-settings-radio-group pref="prefs.foo.bar"> and handle String, Boolean, and Number ...
5 years, 3 months ago (2015-09-15 23:55:06 UTC) #6
dschuyler
https://codereview.chromium.org/1345913002/diff/1/chrome/browser/resources/settings/appearance_page/appearance_page.html File chrome/browser/resources/settings/appearance_page/appearance_page.html (right): https://codereview.chromium.org/1345913002/diff/1/chrome/browser/resources/settings/appearance_page/appearance_page.html#newcode30 chrome/browser/resources/settings/appearance_page/appearance_page.html:30: hidden="[[!prefs.browser.show_home_button.value]]" On 2015/09/15 23:44:44, Dan Beam wrote: > can ...
5 years, 3 months ago (2015-09-16 00:14:28 UTC) #7
Dan Beam
> t/f is not better than true/false https://codereview.chromium.org/1345913002/diff/1/chrome/browser/resources/settings/appearance_page/appearance_page.html File chrome/browser/resources/settings/appearance_page/appearance_page.html (right): https://codereview.chromium.org/1345913002/diff/1/chrome/browser/resources/settings/appearance_page/appearance_page.html#newcode30 chrome/browser/resources/settings/appearance_page/appearance_page.html:30: hidden="[[!prefs.browser.show_home_button.value]]" On ...
5 years, 3 months ago (2015-09-16 00:23:19 UTC) #9
dschuyler
https://codereview.chromium.org/1345913002/diff/1/chrome/browser/resources/settings/appearance_page/appearance_page.html File chrome/browser/resources/settings/appearance_page/appearance_page.html (right): https://codereview.chromium.org/1345913002/diff/1/chrome/browser/resources/settings/appearance_page/appearance_page.html#newcode30 chrome/browser/resources/settings/appearance_page/appearance_page.html:30: hidden="[[!prefs.browser.show_home_button.value]]" On 2015/09/16 00:23:19, Dan Beam wrote: > On ...
5 years, 3 months ago (2015-09-16 01:37:30 UTC) #10
Dan Beam
27 nodes is a lot https://codereview.chromium.org/1345913002/diff/1/chrome/browser/resources/settings/appearance_page/appearance_page.html File chrome/browser/resources/settings/appearance_page/appearance_page.html (right): https://codereview.chromium.org/1345913002/diff/1/chrome/browser/resources/settings/appearance_page/appearance_page.html#newcode30 chrome/browser/resources/settings/appearance_page/appearance_page.html:30: hidden="[[!prefs.browser.show_home_button.value]]" On 2015/09/16 01:37:30, ...
5 years, 3 months ago (2015-09-16 01:56:34 UTC) #11
dschuyler
On 2015/09/16 01:56:34, Dan Beam wrote: > 27 nodes is a lot > > https://codereview.chromium.org/1345913002/diff/1/chrome/browser/resources/settings/appearance_page/appearance_page.html ...
5 years, 3 months ago (2015-09-16 17:06:26 UTC) #12
Dan Beam
On 2015/09/16 17:06:26, dschuyler wrote: > On 2015/09/16 01:56:34, Dan Beam wrote: > > 27 ...
5 years, 3 months ago (2015-09-16 17:38:16 UTC) #13
dschuyler
On 2015/09/16 17:38:16, Dan Beam wrote: > On 2015/09/16 17:06:26, dschuyler wrote: > > On ...
5 years, 3 months ago (2015-09-16 20:12:21 UTC) #14
Dan Beam
>> t/f is not better than true/false (for the third time)
5 years, 3 months ago (2015-09-16 21:51:22 UTC) #15
stevenjb
So, FWIW, I think that the change in https://codereview.chromium.org/1347193003/ is both simpler and doesn't requre ...
5 years, 3 months ago (2015-09-16 21:55:39 UTC) #16
dschuyler
On 2015/09/16 21:51:22, Dan Beam wrote: > >> t/f is not better than true/false > ...
5 years, 3 months ago (2015-09-16 22:14:27 UTC) #17
dschuyler
On 2015/09/16 21:55:39, stevenjb wrote: > So, FWIW, I think that the change in https://codereview.chromium.org/1347193003/ ...
5 years, 3 months ago (2015-09-16 22:29:14 UTC) #18
dschuyler
5 years, 3 months ago (2015-09-16 22:29:18 UTC) #19
On 2015/09/16 21:55:39, stevenjb wrote:
> So, FWIW, I think that the change in
https://codereview.chromium.org/1347193003/
> is both simpler and doesn't requre repeating this solution if we come across
any
> other places where we map a boolean pref to a radio group.

Nice.  This also looks like it's using 
a local string property.  Though at least it
encapsulates it.  I was trying to eliminate
the local string property and haven't
succeeded with bools yet.  It may be better
to go with encapsulating it :)

Powered by Google App Engine
This is Rietveld 408576698