Commit e8d53ff9 authored by ojan@chromium.org's avatar ojan@chromium.org

Fix a bunch of UI nits in sheriff-o-matic.

-Add back the dividers between failure cards.
The wall of text and buttons was overwhelming.
-Fix the heights of things so that the page contents
isn't all overflowing out of height:0 containers.
-Remove the useless divider in ct-builder-grid.
-Make the buttons look like esprehn's codereview tool.
-Add a new sheriff-friendly favicon.
-Have the results panel consist of two overflow:auto
regions. One for the menu and one for the results.
-Get rid of tabs on top. Instead have a header that
converts to a "go back" button when you are in the
results page.
-Have ct-tree-status be collapsed to 0 height when it's empty.
To make this work, have the default status be the empty
string so that the status attribute isn't removed when the value
is open.
-Fix ellipsizing CSS in ct-tree-status

NOTRY=true
R=abarth@chromium.org

Review URL: https://codereview.chromium.org/400353006

git-svn-id: svn://svn.chromium.org/blink/trunk@178539 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 2aa6452a
...@@ -13,13 +13,13 @@ James, a web developer from Birmingham, UK. ...@@ -13,13 +13,13 @@ James, a web developer from Birmingham, UK.
<meta name="viewport" content="width=device-width, user-scalable=no"> <meta name="viewport" content="width=device-width, user-scalable=no">
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,700"> <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,700">
<style> <style>
html { html, body {
overflow-y: scroll; height: 100%;
} }
body { body {
font-family: 'Open Sans'; font-family: 'Open Sans';
font-size: 14px; font-size: 14px;
margin: 0px; margin: 0px;
} }
</style> </style>
<script src="bower_components/platform/platform.js"></script> <script src="bower_components/platform/platform.js"></script>
......
...@@ -17,10 +17,6 @@ found in the LICENSE file. ...@@ -17,10 +17,6 @@ found in the LICENSE file.
width: 350px; width: 350px;
} }
tbody tr {
border-top: 1px solid #eee;
}
tbody td:first-child { tbody td:first-child {
width: 20%; width: 20%;
} }
......
...@@ -15,23 +15,53 @@ found in the LICENSE file. ...@@ -15,23 +15,53 @@ found in the LICENSE file.
display: flex; display: flex;
} }
/* FIXME: All this paper-button styling should go in a cr-button component so that
we can use buttons in different places and have them all look the same. */
paper-button { paper-button {
background: papayawhip; -webkit-user-select: none;
background: #f5f5f5;
border-radius: 2px;
border: 1px solid #dcdcdc;
color: #444;
padding: 0 16px;
text-align: center;
}
paper-button:focus {
border: 1px solid #4d90fe;
outline: none;
}
paper-button:active {
box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.3);
}
paper-button:active, paper-button:hover {
background: #f8f8f8;
border-color: #c6c6c6;
box-shadow: 0px 1px 1px rgba(0, 0, 0, 0.1);
color: #222;
} }
ct-builder-grid { ct-builder-grid {
margin-right: 10px; margin-right: 10px;
} }
.failure {
flex: 1;
}
#examine {
align-self: flex-start;
}
</style> </style>
<ct-builder-grid failures="{{failures}}"></ct-builder-grid> <ct-builder-grid failures="{{failures}}"></ct-builder-grid>
<div style="flex: 1"> <div class="failure">
<ct-test-list tests="{{failures|testNames}}"></ct-test-list> <ct-test-list tests="{{failures|testNames}}"></ct-test-list>
<ct-commit-list first="{{failures[0].newestPassingRevision + 1}}" <ct-commit-list first="{{failures[0].newestPassingRevision + 1}}"
last="{{failures[0].oldestFailingRevision}}"></ct-commit-list> last="{{failures[0].oldestFailingRevision}}"></ct-commit-list>
</div> </div>
<div> <paper-button id="examine" on-tap="{{examine}}">Examine</paper-button>
<paper-button id="examine" on-tap="{{examine}}">Examine</paper-button>
</div>
</template> </template>
<script> <script>
Polymer({ Polymer({
......
...@@ -16,6 +16,7 @@ found in the LICENSE file. ...@@ -16,6 +16,7 @@ found in the LICENSE file.
ct-failure-card { ct-failure-card {
margin: 5px; margin: 5px;
padding: 5px; padding: 5px;
border-top: 1px solid lightgrey;
} }
</style> </style>
<template repeat="{{failures in groups}}"> <template repeat="{{failures in groups}}">
......
...@@ -13,7 +13,8 @@ found in the LICENSE file. ...@@ -13,7 +13,8 @@ found in the LICENSE file.
<template> <template>
<style> <style>
:host { :host {
display: block; display: flex;
flex-direction: column;
} }
paper-item.core-selected { paper-item.core-selected {
...@@ -21,21 +22,41 @@ found in the LICENSE file. ...@@ -21,21 +22,41 @@ found in the LICENSE file.
} }
.message { .message {
text-align: center;
margin: 20px; margin: 20px;
text-align: center;
}
core-menu {
box-shadow: 0 3px 3px #ccc;
/* Override /deep/ selector in core-menu.css. */
margin: 0 !important;
max-height: 20%;
min-height: 150px;
overflow: auto;
/* So the box-shadow goes on top of the results. */
z-index: 1;
}
.results {
/* Stay below the box shadow of the core-menu. */
padding-top: 6px;
flex: 1;
overflow: auto;
} }
</style> </style>
<template if="{{!failures.length}}"> <template if="{{ !failures.length }}">
<div class="message">No results to display.</div> <div class="message">No results to display.</div>
</template> </template>
<template if="{{failures.length}}"> <template if="{{ failures.length }}">
<core-menu selected="{{selected}}"> <core-menu selected="{{ selected }}">
<template repeat="{{failure in failures}}"> <template repeat="{{ failure in failures }}">
<paper-item label="{{failure.testName}}"></paper-item> <paper-item label="{{ failure.testName }}"></paper-item>
</template> </template>
</core-menu> </core-menu>
<ct-embedded-flakiness-dashboard test="{{failures[selected].testName}}"></ct-embedded-flakiness-dashboard> <div class="results">
<ct-results-by-builder failure="{{failures[selected]}}"></ct-results-by-builder> <ct-embedded-flakiness-dashboard test="{{ failures[selected].testName }}"></ct-embedded-flakiness-dashboard>
<ct-results-by-builder failure="{{ failures[selected] }}"></ct-results-by-builder>
</div>
</template> </template>
</template> </template>
<script> <script>
......
...@@ -17,27 +17,51 @@ found in the LICENSE file. ...@@ -17,27 +17,51 @@ found in the LICENSE file.
<link rel="import" href="../bower_components/core-animated-pages/core-animated-pages.html"> <link rel="import" href="../bower_components/core-animated-pages/core-animated-pages.html">
<link rel="import" href="../bower_components/core-animated-pages/transitions/slide-from-right.html"> <link rel="import" href="../bower_components/core-animated-pages/transitions/slide-from-right.html">
<link rel="import" href="../bower_components/paper-tabs/paper-tab.html">
<link rel="import" href="../bower_components/paper-tabs/paper-tabs.html">
<link rel="import" href="ct-results-panel.html"> <link rel="import" href="ct-results-panel.html">
<link rel="import" href="ct-unexpected-failures.html"> <link rel="import" href="ct-unexpected-failures.html">
<polymer-element name="ct-sheriff-o-matic"> <polymer-element name="ct-sheriff-o-matic">
<template> <template>
<style> <style>
paper-tabs { :host {
background-color: #00bcd4; display: flex;
color: #fff; flex-direction: column;
box-shadow: 0px 3px 2px rgba(0, 0, 0, 0.2); height: 100%;
}
header {
-webkit-user-select: none;
align-items: center;
background-color: #212121;
color: white;
cursor: default;
display: flex;
font-size: 1.1em;
}
header a, header span {
color: white;
display: inline-block;
padding: 0.25em 4px;
text-decoration: none;
}
core-animated-pages {
flex: 1;
} }
</style> </style>
<paper-tabs selected="{{selected}}">
<paper-tab>Unexpected Failures</paper-tab> <header>
<paper-tab>Results</paper-tab> <template if="{{ selected == 0 }}">
</paper-tabs> <span><img src="../favicon.ico"> Auto-sheriff-o-maticon</span>
<core-animated-pages selected="{{selected}}" transitions="slide-from-right"> </template>
<ct-unexpected-failures on-ct-examine-failures="{{onExamine}}"></ct-unexpected-failures> <template if="{{ selected == 1 }}">
<ct-results-panel failures="{{currentFailures}}"></ct-results-panel> <a on-click="{{ onBack }}">
&lt;&lt; Go back
</a>
</template>
</header>
<core-animated-pages selected="{{ selected }}" transitions="slide-from-right">
<ct-unexpected-failures on-ct-examine-failures="{{ onExamine }}"></ct-unexpected-failures>
<ct-results-panel failures="{{ currentFailures }}"></ct-results-panel>
</core-animated-pages> </core-animated-pages>
</template> </template>
<script> <script>
...@@ -45,6 +69,10 @@ found in the LICENSE file. ...@@ -45,6 +69,10 @@ found in the LICENSE file.
selected: 0, selected: 0,
currentFailures: [], currentFailures: [],
onBack: function() {
this.selected = 0;
},
onExamine: function(event) { onExamine: function(event) {
this.currentFailures = event.detail; this.currentFailures = event.detail;
this.selected = 1; this.selected = 1;
......
...@@ -69,7 +69,7 @@ asyncTest("basic", 10, function() { ...@@ -69,7 +69,7 @@ asyncTest("basic", 10, function() {
}) })
]).then(function() { ]).then(function() {
requestAnimationFrame(function() { requestAnimationFrame(function() {
ok(!opentree.shadowRoot.textContent.trim()); ok(!opentree.shadowRoot.textContent.has("open-tree-project"));
ok(throttledtree.shadowRoot.textContent.has("throttled-tree-project")); ok(throttledtree.shadowRoot.textContent.has("throttled-tree-project"));
ok(closedtree.shadowRoot.textContent.has("closed-tree-project")); ok(closedtree.shadowRoot.textContent.has("closed-tree-project"));
start(); start();
......
...@@ -6,26 +6,30 @@ found in the LICENSE file. ...@@ -6,26 +6,30 @@ found in the LICENSE file.
<polymer-element name="ct-tree-status"> <polymer-element name="ct-tree-status">
<template> <template>
<template if="{{ message }}"> <style>
<style> :host {
:host { display: flex;
display: flex; }
whitespace: nowrap;
overflow: hidden;
text-overflow: ellispis;
}
:host([status=throttled]) { :host([status=throttled]) {
background-color: khaki; background-color: #fffc6c;
} }
:host([status=closed]), :host([status=closed]),
:host([status=closed]) a { :host([status=closed]) a {
color: white; color: white;
background-color: tomato; background-color: #e98080;
} }
</style>
<div style="flex: 1">{{ project }}: {{ message }}</div> .message {
flex: 1;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
</style>
<template if="{{ message }}">
<div class="message">{{ project }}: {{ message }}</div>
<div style="padding: 0 5px;">[ <a href="{{ project | _url }}">details</a> ]</div> <div style="padding: 0 5px;">[ <a href="{{ project | _url }}">details</a> ]</div>
</template> </template>
</template> </template>
...@@ -35,7 +39,7 @@ found in the LICENSE file. ...@@ -35,7 +39,7 @@ found in the LICENSE file.
project: '', project: '',
message: '', message: '',
status: { status: {
value: 'open', value: '',
reflect: true, reflect: true,
}, },
}, },
......
...@@ -20,9 +20,22 @@ found in the LICENSE file. ...@@ -20,9 +20,22 @@ found in the LICENSE file.
left: 10px; left: 10px;
} }
ct-tree-status, ct-failing-builders { ct-failing-builders {
margin: 5px; margin: 5px;
} }
ct-tree-status {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin: 5px;
padding: 3px;
}
ct-tree-status[status=open] {
margin: 0;
padding: 0;
}
</style> </style>
<ct-failure-analyzer id="analyzer" status="{{ analyzerStatus }}" failures="{{ failures }}"></ct-failure-analyzer> <ct-failure-analyzer id="analyzer" status="{{ analyzerStatus }}" failures="{{ failures }}"></ct-failure-analyzer>
<ct-failure-grouper failures="{{ failures.unexpected }}" groups="{{ failureGroups }}"></ct-failure-grouper> <ct-failure-grouper failures="{{ failures.unexpected }}" groups="{{ failureGroups }}"></ct-failure-grouper>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment