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

Issue 345853005: Start a top-down rewrite of Garden-O-Matic in Polymer (Closed)

Created:
6 years, 5 months ago by abarth-chromium
Modified:
6 years, 5 months ago
Reviewers:
esprehn, ojan
CC:
esprehn, blink-reviews, Dougle, Dirk Pranke, eseidel, michaelpg
Project:
blink
Visibility:
Public.

Description

Start a top-down rewrite of Garden-O-Matic in Polymer In previous CLs, we've been working up from the bottom of the widget hierarchy to rewrite Garden-O-Matic in Polymer. This CL moves this project forward by starting from the top of the widget hierarchy. When these two efforts meet in the middle, we'll be done! This CL is mostly about fleshing out the structure of the components. We'll need to iterate on the visual style of each component in future CLs. I've added dependencies on Polymer's core and paper elements because the core elements are super useful and the paper elements are super pretty. The top-down version is hosted in gom2.html to avoid breaking the working product. Currently, gom2 shows correctly grouped sets of failing tests and the regression ranges for each group (albeit without any fancy styling). NOTRY=true Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=177172

Patch Set 1 #

Total comments: 3

Patch Set 2 : Now with tests #

Patch Set 3 : Remove stray console.log #

Total comments: 12
Unified diffs Side-by-side diffs Delta from patch set Stats (+488 lines, -29 lines) Patch
M Tools/GardeningServer/bower.json View 1 chunk +6 lines, -4 lines 0 comments Download
M Tools/GardeningServer/run-unittests.html View 1 1 chunk +3 lines, -1 line 0 comments Download
A + Tools/GardeningServer/sheriff-o-matic.html View 1 2 chunks +19 lines, -24 lines 0 comments Download
A Tools/GardeningServer/ui/ct-commit.html View 1 chunk +16 lines, -0 lines 0 comments Download
A Tools/GardeningServer/ui/ct-commit-data.html View 1 1 chunk +27 lines, -0 lines 2 comments Download
A Tools/GardeningServer/ui/ct-commit-list.html View 1 chunk +22 lines, -0 lines 1 comment Download
A Tools/GardeningServer/ui/ct-commit-tests.html View 1 1 chunk +42 lines, -0 lines 0 comments Download
A Tools/GardeningServer/ui/ct-failure-analyzer.html View 1 chunk +31 lines, -0 lines 2 comments Download
A Tools/GardeningServer/ui/ct-failure-grouper.html View 2 1 chunk +36 lines, -0 lines 1 comment Download
A Tools/GardeningServer/ui/ct-failure-grouper-tests.html View 1 1 chunk +178 lines, -0 lines 0 comments Download
A Tools/GardeningServer/ui/ct-failure-stream.html View 1 chunk +16 lines, -0 lines 1 comment Download
A Tools/GardeningServer/ui/ct-sheriff-o-matic.html View 1 1 chunk +46 lines, -0 lines 2 comments Download
A Tools/GardeningServer/ui/ct-unexpected-failures.html View 1 chunk +46 lines, -0 lines 3 comments Download

Messages

Total messages: 19 (0 generated)
abarth-chromium
6 years, 5 months ago (2014-06-28 07:45:08 UTC) #1
ojan
Michael, Doug, FYI since you're working in this code as well.
6 years, 5 months ago (2014-06-28 16:29:53 UTC) #2
ojan
This looks good to me except for the lack of tests. Please at least add ...
6 years, 5 months ago (2014-06-28 16:50:10 UTC) #3
abarth-chromium
https://codereview.chromium.org/345853005/diff/1/Tools/GardeningServer/ui/ct-failure-grouper.html File Tools/GardeningServer/ui/ct-failure-grouper.html (right): https://codereview.chromium.org/345853005/diff/1/Tools/GardeningServer/ui/ct-failure-grouper.html#newcode31 Tools/GardeningServer/ui/ct-failure-grouper.html:31: this.groups[i] = map[key].sort(this.failureComparator.bind(this)); Just so I don't get bitten ...
6 years, 5 months ago (2014-06-28 17:52:37 UTC) #4
abarth-chromium
On 2014/06/28 at 16:50:10, ojan wrote: > This looks good to me except for the ...
6 years, 5 months ago (2014-06-28 17:54:21 UTC) #5
ojan
> > While we're adding new files and rewriting it all, may as well use ...
6 years, 5 months ago (2014-06-28 19:00:28 UTC) #6
abarth-chromium
On 2014/06/28 at 19:00:28, ojan wrote: > > > While we're adding new files and ...
6 years, 5 months ago (2014-06-28 19:34:25 UTC) #7
abarth-chromium
PTAL I've added a couple tests. I need to think about the right way to ...
6 years, 5 months ago (2014-06-28 20:02:26 UTC) #8
ojan
On 2014/06/28 at 20:02:26, abarth wrote: > I've added a couple tests. I need to ...
6 years, 5 months ago (2014-06-29 03:18:52 UTC) #9
abarth-chromium
Thanks for the thoughtful review. For what it's worth, I agree with your viewpoint on ...
6 years, 5 months ago (2014-06-29 04:40:08 UTC) #10
abarth-chromium
The CQ bit was checked by abarth@chromium.org
6 years, 5 months ago (2014-06-29 04:40:15 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/abarth@chromium.org/345853005/40001
6 years, 5 months ago (2014-06-29 04:40:59 UTC) #12
commit-bot: I haz the power
Change committed as 177172
6 years, 5 months ago (2014-06-29 04:41:33 UTC) #13
ojan
https://codereview.chromium.org/345853005/diff/1/Tools/GardeningServer/gom2.html File Tools/GardeningServer/gom2.html (right): https://codereview.chromium.org/345853005/diff/1/Tools/GardeningServer/gom2.html#newcode1 Tools/GardeningServer/gom2.html:1: <!-- This should use the new minimal copyright? https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui/ct-unexpected-failures.html ...
6 years, 5 months ago (2014-06-29 04:48:25 UTC) #14
ojan
Just saw your other comments...I agree that landing and collaborating with less initial test-coverage is ...
6 years, 5 months ago (2014-06-29 04:49:59 UTC) #15
abarth-chromium
On 2014/06/29 at 04:48:25, ojan wrote: > https://codereview.chromium.org/345853005/diff/1/Tools/GardeningServer/gom2.html > File Tools/GardeningServer/gom2.html (right): > > https://codereview.chromium.org/345853005/diff/1/Tools/GardeningServer/gom2.html#newcode1 ...
6 years, 5 months ago (2014-06-29 05:36:32 UTC) #16
ojan
https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui/ct-sheriff-o-matic.html File Tools/GardeningServer/ui/ct-sheriff-o-matic.html (right): https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui/ct-sheriff-o-matic.html#newcode33 Tools/GardeningServer/ui/ct-sheriff-o-matic.html:33: <paper-tabs selected="{{selected}}"> I've been thinking more about the UI ...
6 years, 5 months ago (2014-06-29 16:51:12 UTC) #17
abarth-chromium
On 2014/06/29 at 16:51:12, ojan wrote: > I've been thinking more about the UI we ...
6 years, 5 months ago (2014-06-29 20:06:32 UTC) #18
esprehn
6 years, 5 months ago (2014-07-08 16:25:06 UTC) #19
Message was sent while issue was closed.
Lots of random nits, lgtm though.

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
File Tools/GardeningServer/ui/ct-commit-data.html (right):

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
Tools/GardeningServer/ui/ct-commit-data.html:14: firstChanged: function() {
You can use computed properties for this. Make one that depends on both
properties and then add a change listener.

computed: {
  state: "[first, last]",
}

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
Tools/GardeningServer/ui/ct-commit-data.html:22: update_: function() {
stateChanged: function() {

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
File Tools/GardeningServer/ui/ct-commit-list.html (right):

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
Tools/GardeningServer/ui/ct-commit-list.html:10: <polymer-element
name="ct-commit-list" attributes="first last" noscript>
Missing commitData

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
File Tools/GardeningServer/ui/ct-failure-analyzer.html (right):

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
Tools/GardeningServer/ui/ct-failure-analyzer.html:20:
model.analyzeUnexpectedFailures(function(failureAnalysis, total) {
return model.analyzeUnexpectedFailures(...)

that way the top level Promise will also reject if the thing explodes.

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
Tools/GardeningServer/ui/ct-failure-analyzer.html:27: }.bind(this));
You drop errors on the floor which is going to make this super hard to debug.
They'll just get swallowed. You need:

.catch(function(e) { 
  console.log(e);
});

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
File Tools/GardeningServer/ui/ct-failure-grouper.html (right):

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
Tools/GardeningServer/ui/ct-failure-grouper.html:31: this.groups[i] =
map[key].sort(this.failureComparator.bind(this));
binding the comparator just makes this code slow, it's stateless so I'd avoid
binding it. You might even make it a free function instead.

(function() {
  function compare(a, b) {
    return ...;
  }

  Polymer({
    ...
  });
})();

See that pattern here:
https://github.com/esprehn/chromium-codereview/blob/master/ui/components/cr-k...

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
File Tools/GardeningServer/ui/ct-failure-stream.html (right):

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
Tools/GardeningServer/ui/ct-failure-stream.html:12: <hr>
<hr> sucks, I'd have just used divs, same thing with the <br> below.

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
File Tools/GardeningServer/ui/ct-sheriff-o-matic.html (right):

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
Tools/GardeningServer/ui/ct-sheriff-o-matic.html:24: <polymer-element
name="ct-sheriff-o-matic">
You almost certainly want attributes="selected" I think?

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
File Tools/GardeningServer/ui/ct-unexpected-failures.html (right):

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
Tools/GardeningServer/ui/ct-unexpected-failures.html:16: paper-toast {
You probably meant to add :host { display: block; } to most of these elements.
The default of inline is rarely what oyu want.

https://codereview.chromium.org/345853005/diff/40001/Tools/GardeningServer/ui...
Tools/GardeningServer/ui/ct-unexpected-failures.html:28: <ct-failure-stream
groups="{{failureGroups}}"></ct-failure-stream>
Some of these seem to be data sources and some are UI controls, it's nice if you
group the sources together at the top or bottom and add an extra new line to
separate them.

Powered by Google App Engine
This is Rietveld 408576698