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

Unified Diff: dashboard/dashboard/elements/chart-title.html

Issue 1926263002: [Polymer10] Convert chart-title.html and chart-slider.html to Polymer 1.0 (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « dashboard/dashboard/elements/chart-slider.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: dashboard/dashboard/elements/chart-title.html
diff --git a/dashboard/dashboard/elements/chart-title.html b/dashboard/dashboard/elements/chart-title.html
index 06690aadb3b3230c4b39f9a181afbfde57d7ec5e..efba54b7f54be9cbe1454aaf21edeb37dcbea4ba 100644
--- a/dashboard/dashboard/elements/chart-title.html
+++ b/dashboard/dashboard/elements/chart-title.html
@@ -5,7 +5,7 @@ Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->
-<polymer-element name="chart-title" attributes="seriesGroupList">
+<dom-module id="chart-title">
<template>
<style>
.title {
@@ -26,17 +26,17 @@ found in the LICENSE file.
</style>
<h3>
- <template repeat="{{part, partIndex in titleParts}}">
+ <template is="dom-repeat" items="{{part, partIndex in titleParts}}" as="part" index-as="partIndex">
<a class="title disabled" href="javascript:void(0);"
- on-click="{{onClicked}}" disabled?="{{partIndex == currentIndex}}"
+ on-click="onClicked" disabled$="{{computeStrictEqual(partIndex, currentIndex}}"
class="title">
{{part}}
</a>
- <span hidden?="{{partIndex == titleParts.length - 1}}">/</span>
+ <span hidden$="{{computeIsLast(partIndex, titleParts)}}">/</span>
</template>
</h3>
<div>
- <template repeat="{{info in suiteDescriptions}}">
+ <template is="dom-repeat" items="{{suiteDescriptions}}" as="info">
<div><b>{{info.suite}}</b>: {{info.description}}</div>
</template>
</div>
@@ -44,7 +44,15 @@ found in the LICENSE file.
</template>
<script>
'use strict';
- Polymer('chart-title', {
+ Polymer({
+
+ is: 'chart-title',
+ properties: {
+ seriesGroupList: { notify: true }
+ },
+
+ computeIsLast: (idx, arr) => idx === arr.length - 1,
+ computeStrictEqual: (a, b) => a === b,
/**
* Sets the title of the chart based on the current state of the chart.
@@ -187,4 +195,4 @@ found in the LICENSE file.
}
});
</script>
-</polymer-element>
+</dom-module>
« no previous file with comments | « dashboard/dashboard/elements/chart-slider.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698