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

Issue 2210063002: MD Settings: add a <controlled-radio-button> (Closed)

Created:
4 years, 4 months ago by Dan Beam
Modified:
4 years, 4 months ago
Reviewers:
stevenjb
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

MD Settings: add a <controlled-radio-button> It's a new control (currently in settings) that wraps a <paper-radio-button> and a <cr-pref-policy-indicator> and magically manages whether the radio button is controlled/disabled and whether the indicator should show (when the pref is controlled and this specific option is the effective value). Because <controlled-radio-button> internally depends on settings-shared styles, I didn't need to change: paper-radio-button { selectors to: paper-radio-button, controlled-radio-button { as I had to with <controlled-button> (as selectors like paper-button.primary-button specifically made assumptions about tag names). I also had to update what <settings-radio-group> considers selectable. Q: Which {paper,settings,controlled}-radio* thing should I use? A: If a radio group is backed by a managable pref (ex: use NTP as homepage, what to do on startup), it should use: <settings-radio-group pref="..."> <controlled-radio-button name="..." pref="..."> If radio group displays a pref but there's no policy to manage it (ex: device scrolling mode): <settings-radio-group pref="..."> <paper-radio-button name="..."> If a radio group doesn't deal with a pref at all (ex: channel switcher): <paper-radio-group> <paper-radio-button name="..."> R=stevenjb@chromium.org BUG=614265 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Committed: https://crrev.com/ff2144883b2063fa79b38a99d27a4f270a934993 Cr-Commit-Position: refs/heads/master@{#409929}

Patch Set 1 #

Patch Set 2 : remove radio-group tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+60 lines, -112 lines) Patch
M chrome/browser/resources/settings/about_page/channel_switcher_dialog.html View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/resources/settings/appearance_page/appearance_page.html View 2 chunks +10 lines, -5 lines 0 comments Download
A + chrome/browser/resources/settings/controls/controlled_radio_button.html View 2 chunks +8 lines, -6 lines 0 comments Download
A + chrome/browser/resources/settings/controls/controlled_radio_button.js View 2 chunks +20 lines, -3 lines 0 comments Download
M chrome/browser/resources/settings/controls/settings_radio_group.html View 2 chunks +2 lines, -2 lines 0 comments Download
M chrome/browser/resources/settings/controls/settings_radio_group.js View 2 chunks +1 line, -16 lines 0 comments Download
M chrome/browser/resources/settings/on_startup_page/on_startup_page.html View 2 chunks +10 lines, -7 lines 0 comments Download
M chrome/browser/resources/settings/on_startup_page/startup_urls_page.html View 1 chunk +0 lines, -4 lines 0 comments Download
M chrome/browser/resources/settings/settings_resources.grd View 1 chunk +6 lines, -0 lines 0 comments Download
M chrome/test/data/webui/settings/cr_settings_browsertest.js View 1 1 chunk +0 lines, -22 lines 0 comments Download
D chrome/test/data/webui/settings/radio_group_tests.js View 1 1 chunk +0 lines, -47 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 18 (10 generated)
Dan Beam
4 years, 4 months ago (2016-08-04 01:12:27 UTC) #2
Dan Beam
sorry, forgot screenshot: http://i.imgur.com/qysNi7U.png
4 years, 4 months ago (2016-08-04 01:16:34 UTC) #3
stevenjb
lgtm
4 years, 4 months ago (2016-08-04 20:50:28 UTC) #8
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/2210063002/20001
4 years, 4 months ago (2016-08-04 21:28:03 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_rel_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/274610)
4 years, 4 months ago (2016-08-04 22:38:28 UTC) #13
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/2210063002/20001
4 years, 4 months ago (2016-08-04 22:44:19 UTC) #15
commit-bot: I haz the power
Committed patchset #2 (id:20001)
4 years, 4 months ago (2016-08-04 23:22:53 UTC) #16
commit-bot: I haz the power
4 years, 4 months ago (2016-08-04 23:24:57 UTC) #18
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/ff2144883b2063fa79b38a99d27a4f270a934993
Cr-Commit-Position: refs/heads/master@{#409929}

Powered by Google App Engine
This is Rietveld 408576698