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

Unified Diff: chrome/browser/resources/md_history/history_card.html

Issue 1643693003: MD History: Implement search functionality. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@patch_to_be_uploaded
Patch Set: Hide cards that haven't been rerendered from previous chrome.send(). Created 4 years, 11 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_card.html
diff --git a/chrome/browser/resources/md_history/history_card.html b/chrome/browser/resources/md_history/history_card.html
index 18b9cf8eb88094a121610122aa7f7828fea4aece..c7c84ec76c97c3267d333b7c295b0ea1ceb66dd7 100644
--- a/chrome/browser/resources/md_history/history_card.html
+++ b/chrome/browser/resources/md_history/history_card.html
@@ -12,6 +12,10 @@
padding: 0 24px 20px 24px;
}
+ :host([hidden]) {
tsergeant 2016/02/02 02:57:36 Is this needed? I can't see you setting hidden any
hsampson 2016/02/03 02:37:58 Yes this is needed so that the iron-list can hide
+ display: none !important;
+ }
+
#main-container {
@apply(--shadow-elevation-2dp);
background: #fff;
@@ -45,7 +49,14 @@
</style>
<div id="main-container">
- <div id="date-accessed">[[historyDate]]</div>
+ <template is="dom-if" if="{{!isNotSearchResult_(searchTerm)}}">
tsergeant 2016/02/02 02:57:36 Can you get rid of the dom-ifs by having a single
hsampson 2016/02/03 02:37:58 Done.
tsergeant 2016/02/04 02:28:49 Yay!
+ <div id="date-accessed">
+ {{searchResultTitle_(historyItems.length,searchTerm)}}
tsergeant 2016/02/02 02:57:36 Nit: space after comma
hsampson 2016/02/03 02:37:58 Done.
+ </div>
+ </template>
+ <template is="dom-if" if="{{isNotSearchResult_(searchTerm)}}">
+ <div id="date-accessed">[[historyDate]]</div>
+ </template>
<div id="history-item-list">
<template is="dom-repeat" items="{{historyItems}}"
as="historyItem">
@@ -55,7 +66,8 @@
website-url="{{historyItem.url}}"
starred="{{historyItem.starred}}"
selected="{{historyItem.selected}}"
- timestamp="{{historyItem.time}}">
+ timestamp="{{historyItem.time}}"
+ search-term="[[searchTerm]]">
</history-item>
<template is="dom-if" if="{{needsTimeGap_(index, historyItem)}}">
<div id="time-gap-separator"></div>

Powered by Google App Engine
This is Rietveld 408576698