Chromium Code Reviews
DescriptionMD 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 #Dependent Patchsets: Messages
Total messages: 18 (10 generated)
|