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

Issue 909313003: Add cr-checkbox to Chrome (Closed)

Created:
5 years, 10 months ago by Oren Blasberg
Modified:
5 years, 10 months ago
CC:
chromium-reviews, khorimoto+watch-md-settings_chromium.org, michaelpg+watch-polymer_chromium.org, michaelpg+watch-md-settings_chromium.org, jhawkins+watch-md-settings_chromium.org, orenb+watch-md-settings_chromium.org, arv+watch_chromium.org, oshima+watch_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

Adds the cr-checkbox wrapper element around paper-checkbox. Sample in chrome://md-settings. BUG=457513 Committed: https://crrev.com/1493ca1c409b970874c69095e89b39edbfae2882 Cr-Commit-Position: refs/heads/master@{#317190}

Patch Set 1 #

Patch Set 2 : Update styling and use underscores #

Total comments: 14

Patch Set 3 : Respond to comments. #

Total comments: 15

Patch Set 4 : Remove unnecessary styles and reply to comments #

Patch Set 5 : Remove spaces. #

Total comments: 12

Patch Set 6 : Respond to nits. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+94 lines, -2 lines) Patch
M chrome/browser/resources/md_settings/md_settings.html View 1 2 chunks +3 lines, -0 lines 0 comments Download
A + ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css View 1 2 3 1 chunk +2 lines, -2 lines 0 comments Download
A ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html View 1 2 3 4 1 chunk +15 lines, -0 lines 0 comments Download
A ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js View 1 2 3 4 5 1 chunk +56 lines, -0 lines 0 comments Download
M ui/webui/resources/cr_elements_resources.grdp View 1 1 chunk +9 lines, -0 lines 0 comments Download
M ui/webui/resources/polymer_resources.grdp View 1 chunk +9 lines, -0 lines 0 comments Download

Messages

Total messages: 35 (9 generated)
Oren Blasberg
5 years, 10 months ago (2015-02-11 01:42:43 UTC) #2
Jeremy Klein
https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css (right): https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css#newcode10 ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css:10: color: rgb(0, 150, 136); Can we share the color ...
5 years, 10 months ago (2015-02-11 01:55:36 UTC) #4
michaelpg
https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html (right): https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html#newcode10 ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html:10: <paper-checkbox id="button" label="{{ label }}" https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js (right): ...
5 years, 10 months ago (2015-02-11 02:08:10 UTC) #6
Oren Blasberg
https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css (right): https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css#newcode10 ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css:10: color: rgb(0, 150, 136); On 2015/02/11 01:55:36, Jeremy Klein ...
5 years, 10 months ago (2015-02-11 20:12:42 UTC) #7
stevenjb
https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css (right): https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css#newcode10 ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css:10: color: rgb(0, 150, 136); On 2015/02/11 20:12:42, Oren Blasberg ...
5 years, 10 months ago (2015-02-11 20:35:02 UTC) #9
michaelpg
https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css (right): https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css#newcode10 ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css:10: color: rgb(0, 150, 136); On 2015/02/11 20:12:42, Oren Blasberg ...
5 years, 10 months ago (2015-02-11 20:40:34 UTC) #10
Jeremy Klein
On 2015/02/11 20:40:34, michaelpg wrote: > https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css > File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css (right): > > https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css#newcode10 > ...
5 years, 10 months ago (2015-02-11 20:41:40 UTC) #11
Oren Blasberg
Good idea, thanks guys, we can follow up with the core-style changes in later CL(s)
5 years, 10 months ago (2015-02-12 20:18:42 UTC) #13
Oren Blasberg
Friendly ping on the review
5 years, 10 months ago (2015-02-13 21:18:41 UTC) #14
Jeremy Klein
lgtm
5 years, 10 months ago (2015-02-13 21:25:16 UTC) #15
Jeremy Klein
On 2015/02/13 21:25:16, Jeremy Klein wrote: > lgtm My LG is assuming a followup to ...
5 years, 10 months ago (2015-02-13 21:25:44 UTC) #16
Dan Beam
https://codereview.chromium.org/909313003/diff/40001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css (right): https://codereview.chromium.org/909313003/diff/40001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css#newcode9 ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css:9: paper-checkbox::shadow #ink[checked] { #ink == text/borders? https://codereview.chromium.org/909313003/diff/40001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html ...
5 years, 10 months ago (2015-02-13 21:56:50 UTC) #17
michaelpg
https://codereview.chromium.org/909313003/diff/40001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html (right): https://codereview.chromium.org/909313003/diff/40001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html#newcode4 ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html:4: href="chrome://resources/cr_elements/cr_events/cr_events.html"> On 2015/02/13 21:56:49, Dan Beam wrote: > chrome ...
5 years, 10 months ago (2015-02-13 23:27:57 UTC) #18
michaelpg
https://codereview.chromium.org/909313003/diff/40001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js (right): https://codereview.chromium.org/909313003/diff/40001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js#newcode26 ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js:26: * @default false On 2015/02/13 21:56:50, Dan Beam wrote: ...
5 years, 10 months ago (2015-02-14 05:51:18 UTC) #19
Oren Blasberg
https://codereview.chromium.org/909313003/diff/40001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css (right): https://codereview.chromium.org/909313003/diff/40001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css#newcode9 ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.css:9: paper-checkbox::shadow #ink[checked] { On 2015/02/13 21:56:49, Dan Beam wrote: ...
5 years, 10 months ago (2015-02-17 18:23:38 UTC) #21
michaelpg
lgtm https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html (right): https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html#newcode10 ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html:10: <paper-checkbox id="button" On 2015/02/11 20:12:42, Oren Blasberg wrote: ...
5 years, 10 months ago (2015-02-18 00:11:16 UTC) #22
Oren Blasberg
https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html (right): https://codereview.chromium.org/909313003/diff/20001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html#newcode10 ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html:10: <paper-checkbox id="button" On 2015/02/18 00:11:16, michaelpg wrote: > On ...
5 years, 10 months ago (2015-02-18 00:17:01 UTC) #24
Dan Beam
https://codereview.chromium.org/909313003/diff/40001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html (right): https://codereview.chromium.org/909313003/diff/40001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html#newcode4 ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html:4: href="chrome://resources/cr_elements/cr_events/cr_events.html"> On 2015/02/13 23:27:57, michaelpg wrote: > On 2015/02/13 ...
5 years, 10 months ago (2015-02-19 22:47:57 UTC) #25
Jeremy Klein
https://codereview.chromium.org/909313003/diff/80001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js (right): https://codereview.chromium.org/909313003/diff/80001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js#newcode17 ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js:17: * @element cr-checkbox On 2015/02/19 22:47:56, Dan Beam wrote: ...
5 years, 10 months ago (2015-02-19 22:58:00 UTC) #26
Dan Beam
ultimately lgtm, the naming issue can be resolved separately https://codereview.chromium.org/909313003/diff/80001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js (right): https://codereview.chromium.org/909313003/diff/80001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js#newcode51 ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js:51: ...
5 years, 10 months ago (2015-02-19 23:09:49 UTC) #27
Oren Blasberg
https://codereview.chromium.org/909313003/diff/80001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js (right): https://codereview.chromium.org/909313003/diff/80001/ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js#newcode30 ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.js:30: reflect: true On 2015/02/19 22:47:56, Dan Beam wrote: > ...
5 years, 10 months ago (2015-02-19 23:38:02 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/909313003/100001
5 years, 10 months ago (2015-02-19 23:40:05 UTC) #31
commit-bot: I haz the power
Committed patchset #6 (id:100001)
5 years, 10 months ago (2015-02-20 00:31:46 UTC) #32
commit-bot: I haz the power
Patchset 6 (id:??) landed as https://crrev.com/1493ca1c409b970874c69095e89b39edbfae2882 Cr-Commit-Position: refs/heads/master@{#317190}
5 years, 10 months ago (2015-02-20 00:32:18 UTC) #33
michaelpg
Anyone opposed to removing "cr_" from "chrome://cr_elements"? And if anyone has a concrete suggestion for ...
5 years, 10 months ago (2015-02-20 01:26:48 UTC) #34
Jeremy Klein
5 years, 10 months ago (2015-02-20 01:32:00 UTC) #35
Message was sent while issue was closed.
On 2015/02/20 01:26:48, michaelpg wrote:
> Anyone opposed to removing "cr_" from "chrome://cr_elements"?
> 
> And if anyone has a concrete suggestion for shortening these URLs, it'd be
great
> to get this settled:
> 
> "chrome://elements/cr_checkbox/cr_checkbox.html"
> 
>
https://codereview.chromium.org/909313003/diff/40001/ui/webui/resources/cr_el...
> File ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html (right):
> 
>
https://codereview.chromium.org/909313003/diff/40001/ui/webui/resources/cr_el...
> ui/webui/resources/cr_elements/cr_checkbox/cr_checkbox.html:4:
> href="chrome://resources/cr_elements/cr_events/cr_events.html">
> On 2015/02/19 22:47:56, Dan Beam wrote:
> > On 2015/02/13 23:27:57, michaelpg wrote:
> > > On 2015/02/13 21:56:49, Dan Beam wrote:
> > > > chrome cr cr cr :(
> > > 
> > > cf. paper-checkbox/paper-checkbox.html
> > 
> > that's repetitive. that's repetitive.
> > 
> > it wastes space and my time. it wastes space and my time.
> > 
> > don't you wish you got those 10s back? don't you wish you got those 10s
back?
> 
> My editor cuts this down to 2s... but I acknowledge that it's repetitive.
> 
> > 
> > > 
> > > "cr_events/cr_events.*" is pretty much *the* convention in Polymer-land
> > (except
> > > the underscore).
> > 
> > I'm confused: are we in chrome or polymer land?  you just said "we willingly
> > disobey polymer when it comes to - vs _" but we don't when it comes to
saving
> us
> > tons of wrapped lines?
> 
> Both. And this is one way we reconcile that. This is the convention that has
> formed around web components.
> 
> Just because we're enforcing Chrome style (- vs _) and making use of Chrome
> facilities (e.g. including with "chrome://" instead of relative paths) doesn't
> mean we should assume nobody will be interested in using some of our
components
> in their projects.
> 
> Also, we aren't assuming all files will have the same names as their
> directories. For instance, "paper-dropdown/paper-dropdown-transition.html" is
> used by "paper-dropdown/paper-dropdown.html" (yay composition). But it makes
it
> clear that:
> 
>     paper-dropdown/paper-dropdown.html
>     paper-dropdown/paper-dropdown-transition.html
> 
> both belong to paper-dropdown, while
> 
>     paper-dropdown-menu/paper-dropdown-menu.html
> 
> belongs to the separate paper-dropdown-menu component. I don't see a great way
> to encode that information while saving a substantial number of characters...
we
> could leave out "cr_" in the leaf directories.
> 
> > 
> > > 
> > > "chrome://elements/" doesn't imply "chrome elements" any more than
> > > "chrome://polymer/" implies "chrome polymer elements".
> > 
> > I don't get what you mean here.
> > 
> > English is made up of words strung together. Code is written in/like
English.
> > That's why conditional operators are if/else/then, for example, so it reads
> like
> > logical English.
> > 
> > When you glean the English of "chrome://elements", YES is does imply "chrome
> > elements" and "chrome://polymer" does imply "using polymer in Chrome".
> 
> I meant that "using elements in chrome" is not the same as "using custom
> elements in chrome that are specific to chrome rather than a third party". If
> "Polymer" can be top-level, Chrome elements should go in a "Chrome" top-level
> "directory", thus "polymer" and "cr_elements".
> 
> I don't care much though, so "chrome://elements" is fine with me.
> 
> > 
> > If we're against writing a new data source for this that's OK I guess, but
if
> > the only way these things will ever be loaded is via a URL that starts with
> > chrome:// it seems pretty silly to add 3 more "cr" to it...
> 
> Not sure what you mean, we added this to shared_resources_data_source rather
> than create a new data source, but it's easily changeable either way.

Definite +1 to chrome://elements/cr_checkbox/cr_checkbox.html

I'd actually like to take this a step further and serve *all* elements from that
directory so that our html imports can all be simple ../blah/blah.html just like
with the paper elements. This doesn't mean that the elements need to be in the
same place in the source tree, but I do think simplifying the url structure
would be beneficial. Splitting up polymer and cr elements doesn't seem like a
huge win to me when we need to namespace the tag names anyway.

Powered by Google App Engine
This is Rietveld 408576698