Perf - More fixes for cluster-page.
Bug: skia:9219
Change-Id: Id8346c5523b8d8141987f8c8500921d305379076
Reviewed-on: https://skia-review.googlesource.com/c/buildbot/+/233362
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Commit-Queue: Joe Gregorio <jcgregorio@google.com>
diff --git a/perf/modules/commit-detail-panel-sk/commit-detail-panel-sk.js b/perf/modules/commit-detail-panel-sk/commit-detail-panel-sk.js
index 36e1eb0..9a28104 100644
--- a/perf/modules/commit-detail-panel-sk/commit-detail-panel-sk.js
+++ b/perf/modules/commit-detail-panel-sk/commit-detail-panel-sk.js
@@ -89,6 +89,7 @@
this.selected = +ele.dataset['id']
const commit = this._details[this.selected];
const detail = {
+ selected: this.selected,
description: `${commit.author} - ${commit.message}`,
commit: commit,
}
diff --git a/perf/modules/commit-detail-picker-sk/commit-detail-picker-sk.js b/perf/modules/commit-detail-picker-sk/commit-detail-picker-sk.js
index 88c7c08..da02215 100644
--- a/perf/modules/commit-detail-picker-sk/commit-detail-picker-sk.js
+++ b/perf/modules/commit-detail-picker-sk/commit-detail-picker-sk.js
@@ -23,15 +23,16 @@
import { ElementSk } from '../../../infra-sk/modules/ElementSk'
import dialogPolyfill from 'dialog-polyfill'
+const NO_COMMIT_SELECTED_MSG = 'Choose a commit.';
function _titleFrom(ele) {
const index = ele.selected;
if (index === -1) {
- return 'Choose a commit.';
+ return NO_COMMIT_SELECTED_MSG;
}
const d = ele._details[index];
if (!d) {
- return 'Choose a commit.';
+ return NO_COMMIT_SELECTED_MSG;
}
return `${d.author} - ${d.message}`;
}
@@ -48,7 +49,6 @@
constructor() {
super(template);
this._details = [];
- this._title = 'Choose a commit.';
}
connectedCallback() {
@@ -60,7 +60,6 @@
}
_panelSelect(e) {
- this._title = e.detail.description;
this.selected = e.detail.selected;
this._render();
}