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

Unified Diff: chrome/browser/resources/md_history/history.js

Issue 1864023002: MD History: Add spinners when new data is loading or searching (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: import paper-spinner in toolbar 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
Index: chrome/browser/resources/md_history/history.js
diff --git a/chrome/browser/resources/md_history/history.js b/chrome/browser/resources/md_history/history.js
index 72aecafbc29c9dae800ea9c19dee33d8b8b571fc..4d2cfe3a8689e9c778790905be3e55c7df905198 100644
--- a/chrome/browser/resources/md_history/history.js
+++ b/chrome/browser/resources/md_history/history.js
@@ -66,6 +66,7 @@ window.addEventListener('delete-selected', function() {
window.addEventListener('search-changed', function(e) {
$('toolbar').setSearchTerm(e.detail.search);
/** @type {HistoryListElement} */($('history-list')).setLoading();
+ /** @type {HistoryToolbarElement} */($('toolbar')).searching_ = true;
chrome.send('queryHistory', [e.detail.search, 0, 0, 0, RESULTS_PER_PAGE]);
});
@@ -90,6 +91,7 @@ function historyResult(info, results) {
waitForUpgrade(listElem).then(function() {
var list = /** @type {HistoryListElement} */(listElem);
list.addNewResults(results, info.term);
+ $('toolbar').searching_ = false;
tsergeant 2016/04/18 01:26:36 Nit: Add the /** @type {HistoryToolbarElement} */
lshang 2016/04/22 01:25:03 Done.
if (info.finished)
list.disableResultLoading();
// TODO(tsergeant): Showing everything as soon as the list is ready is not

Powered by Google App Engine
This is Rietveld 408576698