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

Unified Diff: chrome/browser/resources/md_bookmarks/types.js

Issue 2972963003: MD Bookmarks: Prevent flash of folder contents when changing search term (Closed)
Patch Set: Created 3 years, 5 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 | « chrome/browser/resources/md_bookmarks/reducers.js ('k') | chrome/browser/resources/md_bookmarks/util.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/md_bookmarks/types.js
diff --git a/chrome/browser/resources/md_bookmarks/types.js b/chrome/browser/resources/md_bookmarks/types.js
index cf857680ae282fa7e9f48d8c77ccec5376b85497..6361f9dc7c678c6f958fa0be464b0d517bc79778 100644
--- a/chrome/browser/resources/md_bookmarks/types.js
+++ b/chrome/browser/resources/md_bookmarks/types.js
@@ -37,10 +37,20 @@ var NodeMap;
var SelectionState;
/**
+ * Note:
+ * - If |results| is null, it means no search results have been returned. This
+ * is different to |results| being [], which means the last search returned 0
+ * results.
+ * - |term| is the last search that was performed by the user, and |results| are
+ * the last results that were returned from the backend. We don't clear
+ * |results| on incremental searches, meaning that |results| can be 'stale'
+ * data from a previous search term (while |inProgress| is true). If you need
+ * to know the exact search term used to generate |results|, you'll need to
+ * add a new field to the state to track it (eg, SearchState.resultsTerm).
* @typedef {{
* term: string,
* inProgress: boolean,
- * results: !Array<string>,
+ * results: ?Array<string>,
* }}
*/
var SearchState;
« no previous file with comments | « chrome/browser/resources/md_bookmarks/reducers.js ('k') | chrome/browser/resources/md_bookmarks/util.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698