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

Issue 2696903005: Move common cr-policy-indicator behavior into CrPolicyIndicatorBehavior (Closed)

Created:
3 years, 10 months ago by michaelpg
Modified:
3 years, 9 months ago
Reviewers:
dschuyler, stevenjb
CC:
chromium-reviews, dbeam+watch-elements_chromium.org, michaelpg+watch-md-settings_chromium.org, michaelpg+watch-md-ui_chromium.org, arv+watch_chromium.org, oshima+watch_chromium.org, dbeam+watch-settings_chromium.org, michaelpg+watch-elements_chromium.org, stevenjb+watch-md-settings_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Move common cr-policy-indicator behavior into CrPolicyIndicatorBehavior This will make it simpler to create new indicators or add indicators to existing controls. BUG=317936 R=stevenjb@chromium.org CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation Review-Url: https://codereview.chromium.org/2696903005 Cr-Commit-Position: refs/heads/master@{#454069} Committed: https://chromium.googlesource.com/chromium/src/+/e3d7d44eb069441b0c2c10a51128193d940dcc53

Patch Set 1 #

Patch Set 2 #

Patch Set 3 : add small README.md #

Total comments: 2

Patch Set 4 : remove behavior from Settings controls that have indicators #

Total comments: 6

Patch Set 5 : comments #

Total comments: 2

Patch Set 6 : rename hasPolicy #

Total comments: 13

Patch Set 7 : TODO and README update #

Total comments: 4

Patch Set 8 : more README #

Patch Set 9 : rebase #

Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -117 lines) Patch
M chrome/browser/resources/settings/controls/compiled_resources2.gyp View 1 2 3 4 chunks +0 lines, -4 lines 0 comments Download
M chrome/browser/resources/settings/controls/controlled_button.html View 1 2 3 4 5 2 chunks +1 line, -2 lines 0 comments Download
M chrome/browser/resources/settings/controls/controlled_button.js View 1 2 3 2 chunks +0 lines, -13 lines 0 comments Download
M chrome/browser/resources/settings/controls/controlled_radio_button.html View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/controls/controlled_radio_button.js View 1 2 3 1 chunk +3 lines, -3 lines 0 comments Download
M chrome/browser/resources/settings/controls/settings_boolean_control_behavior.html View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/resources/settings/controls/settings_boolean_control_behavior.js View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/controls/settings_checkbox.html View 1 2 3 2 chunks +2 lines, -1 line 0 comments Download
M chrome/browser/resources/settings/controls/settings_input.html View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/settings/controls/settings_input.js View 1 2 3 1 chunk +2 lines, -3 lines 0 comments Download
M chrome/browser/resources/settings/controls/settings_toggle_button.html View 1 2 3 4 5 2 chunks +2 lines, -1 line 0 comments Download
M chrome/test/data/webui/cr_elements/cr_elements_browsertest.js View 1 2 3 4 5 2 chunks +25 lines, -0 lines 0 comments Download
A chrome/test/data/webui/cr_elements/cr_policy_indicator_behavior_tests.js View 1 2 3 1 chunk +59 lines, -0 lines 0 comments Download
M chrome/test/data/webui/cr_elements/cr_policy_pref_indicator_tests.js View 1 2 3 1 chunk +0 lines, -9 lines 0 comments Download
A chrome/test/data/webui/cr_elements/cr_policy_strings.js View 1 2 3 1 chunk +12 lines, -0 lines 0 comments Download
M chrome/test/data/webui/settings/date_time_page_tests.js View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
A ui/webui/resources/cr_elements/policy/README.md View 1 2 3 4 5 6 7 1 chunk +42 lines, -0 lines 0 comments Download
M ui/webui/resources/cr_elements/policy/compiled_resources2.gyp View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
D ui/webui/resources/cr_elements/policy/cr_policy_indicator.css View 1 chunk +0 lines, -9 lines 0 comments Download
M ui/webui/resources/cr_elements/policy/cr_policy_indicator_behavior.js View 1 2 3 4 5 6 4 chunks +44 lines, -3 lines 0 comments Download
M ui/webui/resources/cr_elements/policy/cr_policy_network_indicator.html View 1 chunk +8 lines, -5 lines 0 comments Download
M ui/webui/resources/cr_elements/policy/cr_policy_network_indicator.js View 1 2 3 4 3 chunks +8 lines, -8 lines 0 comments Download
M ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js View 1 2 3 4 5 1 chunk +10 lines, -25 lines 0 comments Download
M ui/webui/resources/cr_elements/policy/cr_policy_pref_indicator.html View 1 2 3 2 chunks +4 lines, -7 lines 0 comments Download
M ui/webui/resources/cr_elements/policy/cr_policy_pref_indicator.js View 1 2 3 4 2 chunks +37 lines, -14 lines 0 comments Download
M ui/webui/resources/cr_elements/policy/cr_policy_vars_css.html View 1 chunk +1 line, -1 line 0 comments Download
M ui/webui/resources/cr_elements_resources.grdp View 1 chunk +0 lines, -3 lines 0 comments Download

Messages

Total messages: 45 (14 generated)
michaelpg
PTAL.
3 years, 10 months ago (2017-02-15 00:16:53 UTC) #4
stevenjb
Thanks for the cleanup! If you could do me a favor and rebase this on ...
3 years, 10 months ago (2017-02-15 00:39:08 UTC) #5
michaelpg
stevenjb: I found a (IMO) better way to work in the behavior that removes some ...
3 years, 10 months ago (2017-02-21 23:59:01 UTC) #6
stevenjb (google-dont-use)
Thanks for the cleanup. A few comments/questions. https://codereview.chromium.org/2696903005/diff/60001/chrome/browser/resources/settings/controls/controlled_button.html File chrome/browser/resources/settings/controls/controlled_button.html (right): https://codereview.chromium.org/2696903005/diff/60001/chrome/browser/resources/settings/controls/controlled_button.html#newcode45 chrome/browser/resources/settings/controls/controlled_button.html:45: <template is="dom-if" ...
3 years, 10 months ago (2017-02-22 01:01:11 UTC) #8
michaelpg
https://codereview.chromium.org/2696903005/diff/60001/chrome/browser/resources/settings/controls/controlled_button.html File chrome/browser/resources/settings/controls/controlled_button.html (right): https://codereview.chromium.org/2696903005/diff/60001/chrome/browser/resources/settings/controls/controlled_button.html#newcode45 chrome/browser/resources/settings/controls/controlled_button.html:45: <template is="dom-if" if="[[hasPolicy(pref.*)]]" restamp> On 2017/02/22 01:01:10, stevenjb (google-dont-use) ...
3 years, 10 months ago (2017-02-22 21:00:01 UTC) #11
stevenjb
https://codereview.chromium.org/2696903005/diff/100001/ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js File ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js (right): https://codereview.chromium.org/2696903005/diff/100001/ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js#newcode24 ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js:24: hasPolicy: function() { This is why I was confused ...
3 years, 10 months ago (2017-02-23 18:21:39 UTC) #12
stevenjb
+dschuyler FYI
3 years, 10 months ago (2017-02-23 19:31:45 UTC) #14
michaelpg
https://codereview.chromium.org/2696903005/diff/100001/ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js File ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js (right): https://codereview.chromium.org/2696903005/diff/100001/ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js#newcode24 ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js:24: hasPolicy: function() { On 2017/02/23 18:21:39, stevenjb wrote: > ...
3 years, 9 months ago (2017-02-28 01:16:29 UTC) #15
stevenjb
lgtm
3 years, 9 months ago (2017-02-28 01:26:08 UTC) #16
dschuyler
On 2017/02/28 01:26:08, stevenjb wrote: > lgtm CL 2696903005 and CL 2708013003 appear to be ...
3 years, 9 months ago (2017-02-28 01:31:38 UTC) #17
stevenjb
On 2017/02/28 01:31:38, dschuyler wrote: > On 2017/02/28 01:26:08, stevenjb wrote: > > lgtm > ...
3 years, 9 months ago (2017-02-28 03:04:02 UTC) #18
michaelpg
On 2017/02/28 03:04:02, stevenjb wrote: > On 2017/02/28 01:31:38, dschuyler wrote: > > On 2017/02/28 ...
3 years, 9 months ago (2017-02-28 05:42:55 UTC) #19
dschuyler
https://codereview.chromium.org/2696903005/diff/140001/chrome/browser/resources/settings/controls/controlled_button.html File chrome/browser/resources/settings/controls/controlled_button.html (right): https://codereview.chromium.org/2696903005/diff/140001/chrome/browser/resources/settings/controls/controlled_button.html#newcode45 chrome/browser/resources/settings/controls/controlled_button.html:45: <template is="dom-if" if="[[hasPrefPolicyIndicator(pref.*)]]" restamp> Let's make this more general ...
3 years, 9 months ago (2017-02-28 19:42:40 UTC) #20
stevenjb
https://codereview.chromium.org/2696903005/diff/140001/chrome/browser/resources/settings/controls/controlled_button.html File chrome/browser/resources/settings/controls/controlled_button.html (right): https://codereview.chromium.org/2696903005/diff/140001/chrome/browser/resources/settings/controls/controlled_button.html#newcode45 chrome/browser/resources/settings/controls/controlled_button.html:45: <template is="dom-if" if="[[hasPrefPolicyIndicator(pref.*)]]" restamp> On 2017/02/28 19:42:40, dschuyler wrote: ...
3 years, 9 months ago (2017-02-28 20:04:37 UTC) #21
stevenjb
https://codereview.chromium.org/2696903005/diff/140001/chrome/browser/resources/settings/controls/controlled_button.html File chrome/browser/resources/settings/controls/controlled_button.html (right): https://codereview.chromium.org/2696903005/diff/140001/chrome/browser/resources/settings/controls/controlled_button.html#newcode45 chrome/browser/resources/settings/controls/controlled_button.html:45: <template is="dom-if" if="[[hasPrefPolicyIndicator(pref.*)]]" restamp> On 2017/02/28 19:42:40, dschuyler wrote: ...
3 years, 9 months ago (2017-02-28 20:04:37 UTC) #22
Dan Beam
https://codereview.chromium.org/2696903005/diff/140001/ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js File ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js (right): https://codereview.chromium.org/2696903005/diff/140001/ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js#newcode14 ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js:14: isPrefPolicyControlled: function() { On 2017/02/28 20:04:37, stevenjb wrote: > ...
3 years, 9 months ago (2017-02-28 20:07:08 UTC) #24
stevenjb
On 2017/02/28 20:07:08, Dan Beam wrote: > https://codereview.chromium.org/2696903005/diff/140001/ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js > File ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js (right): > > https://codereview.chromium.org/2696903005/diff/140001/ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js#newcode14 ...
3 years, 9 months ago (2017-02-28 20:08:49 UTC) #25
Dan Beam
ultimately there's a bajillion "policy" in the paths, file names, method names etc. so renaming ...
3 years, 9 months ago (2017-02-28 20:08:56 UTC) #26
dschuyler
https://codereview.chromium.org/2696903005/diff/140001/ui/webui/resources/cr_elements/policy/README.md File ui/webui/resources/cr_elements/policy/README.md (right): https://codereview.chromium.org/2696903005/diff/140001/ui/webui/resources/cr_elements/policy/README.md#newcode13 ui/webui/resources/cr_elements/policy/README.md:13: tooltip, icon, and visibility of the indicator. Just a ...
3 years, 9 months ago (2017-02-28 20:09:30 UTC) #27
dschuyler
On 2017/02/28 20:08:49, stevenjb wrote: > On 2017/02/28 20:07:08, Dan Beam wrote: > > > ...
3 years, 9 months ago (2017-02-28 20:15:26 UTC) #28
Dan Beam
On 2017/02/28 20:08:49, stevenjb wrote: > On 2017/02/28 20:07:08, Dan Beam wrote: > > > ...
3 years, 9 months ago (2017-02-28 20:16:48 UTC) #29
chromium-reviews
Yep. sgtm On Tue, Feb 28, 2017 at 1:16 PM, <dbeam@chromium.org> wrote: > On 2017/02/28 ...
3 years, 9 months ago (2017-02-28 20:46:31 UTC) #30
michaelpg
I think everything was addressed in the comments or message chain -- LMK if I ...
3 years, 9 months ago (2017-02-28 21:55:50 UTC) #32
stevenjb
https://codereview.chromium.org/2696903005/diff/140001/ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js File ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js (right): https://codereview.chromium.org/2696903005/diff/140001/ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js#newcode24 ui/webui/resources/cr_elements/policy/cr_policy_pref_behavior.js:24: hasPrefPolicyIndicator: function() { On 2017/02/28 21:55:50, michaelpg wrote: > ...
3 years, 9 months ago (2017-02-28 21:59:01 UTC) #33
dschuyler
Thanks for the Readme improvements! Tip: I think Dan had a question about performance -- ...
3 years, 9 months ago (2017-02-28 22:16:33 UTC) #34
michaelpg
On 2017/02/28 20:08:56, Dan Beam wrote: > ultimately there's a bajillion "policy" in the paths, ...
3 years, 9 months ago (2017-03-01 00:33:47 UTC) #35
michaelpg
https://codereview.chromium.org/2696903005/diff/160001/ui/webui/resources/cr_elements/policy/README.md File ui/webui/resources/cr_elements/policy/README.md (right): https://codereview.chromium.org/2696903005/diff/160001/ui/webui/resources/cr_elements/policy/README.md#newcode3 ui/webui/resources/cr_elements/policy/README.md:3: Setting that can't be controlled by the current user ...
3 years, 9 months ago (2017-03-01 00:34:01 UTC) #36
michaelpg
On 2017/02/28 20:08:56, Dan Beam wrote: > ultimately there's a bajillion "policy" in the paths, ...
3 years, 9 months ago (2017-03-01 21:26:36 UTC) #38
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/2696903005/200001
3 years, 9 months ago (2017-03-01 21:27:37 UTC) #41
Dan Beam
On 2017/03/01 21:26:36, michaelpg wrote: > On 2017/02/28 20:08:56, Dan Beam wrote: > > ultimately ...
3 years, 9 months ago (2017-03-01 21:55:33 UTC) #42
commit-bot: I haz the power
3 years, 9 months ago (2017-03-01 22:25:05 UTC) #45
Message was sent while issue was closed.
Committed patchset #9 (id:200001) as
https://chromium.googlesource.com/chromium/src/+/e3d7d44eb069441b0c2c10a51128...

Powered by Google App Engine
This is Rietveld 408576698