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

Side by Side 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, 10 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 unified diff | Download patch
OLDNEW
1 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html"> 1 <link rel="import" href="chrome://resources/polymer/v1_0/polymer/polymer.html">
2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.htm l"> 2 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.htm l">
3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout.html"> 3 <link rel="import" href="chrome://resources/polymer/v1_0/iron-flex-layout/iron-f lex-layout.html">
4 <link rel="import" href="chrome://history/history_item.html"> 4 <link rel="import" href="chrome://history/history_item.html">
5 5
6 <dom-module id="history-card"> 6 <dom-module id="history-card">
7 <template> 7 <template>
8 <style> 8 <style>
9 :host { 9 :host {
10 @apply(--layout-center); 10 @apply(--layout-center);
11 @apply(--layout-vertical); 11 @apply(--layout-vertical);
12 padding: 0 24px 20px 24px; 12 padding: 0 24px 20px 24px;
13 } 13 }
14 14
15 :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
16 display: none !important;
17 }
18
15 #main-container { 19 #main-container {
16 @apply(--shadow-elevation-2dp); 20 @apply(--shadow-elevation-2dp);
17 background: #fff; 21 background: #fff;
18 border-radius: 2px; 22 border-radius: 2px;
19 max-width: 960px; 23 max-width: 960px;
20 width: 100%; 24 width: 100%;
21 } 25 }
22 26
23 #time-gap-separator { 27 #time-gap-separator {
24 -webkit-border-start: 1px solid #888; 28 -webkit-border-start: 1px solid #888;
(...skipping 13 matching lines...) Expand all
38 font-weight: 500; 42 font-weight: 500;
39 height: 48px; 43 height: 48px;
40 } 44 }
41 45
42 #history-item-list { 46 #history-item-list {
43 padding: 8px 0; 47 padding: 8px 0;
44 } 48 }
45 </style> 49 </style>
46 50
47 <div id="main-container"> 51 <div id="main-container">
48 <div id="date-accessed">[[historyDate]]</div> 52 <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!
53 <div id="date-accessed">
54 {{searchResultTitle_(historyItems.length,searchTerm)}}
tsergeant 2016/02/02 02:57:36 Nit: space after comma
hsampson 2016/02/03 02:37:58 Done.
55 </div>
56 </template>
57 <template is="dom-if" if="{{isNotSearchResult_(searchTerm)}}">
58 <div id="date-accessed">[[historyDate]]</div>
59 </template>
49 <div id="history-item-list"> 60 <div id="history-item-list">
50 <template is="dom-repeat" items="{{historyItems}}" 61 <template is="dom-repeat" items="{{historyItems}}"
51 as="historyItem"> 62 as="historyItem">
52 <history-item time-accessed="{{historyItem.dateTimeOfDay}}" 63 <history-item time-accessed="{{historyItem.dateTimeOfDay}}"
53 website-title="{{historyItem.title}}" 64 website-title="{{historyItem.title}}"
54 website-domain="{{historyItem.domain}}" 65 website-domain="{{historyItem.domain}}"
55 website-url="{{historyItem.url}}" 66 website-url="{{historyItem.url}}"
56 starred="{{historyItem.starred}}" 67 starred="{{historyItem.starred}}"
57 selected="{{historyItem.selected}}" 68 selected="{{historyItem.selected}}"
58 timestamp="{{historyItem.time}}"> 69 timestamp="{{historyItem.time}}"
70 search-term="[[searchTerm]]">
59 </history-item> 71 </history-item>
60 <template is="dom-if" if="{{needsTimeGap_(index, historyItem)}}"> 72 <template is="dom-if" if="{{needsTimeGap_(index, historyItem)}}">
61 <div id="time-gap-separator"></div> 73 <div id="time-gap-separator"></div>
62 </template> 74 </template>
63 </template> 75 </template>
64 </div> 76 </div>
65 </div> 77 </div>
66 </template> 78 </template>
67 <script src="chrome://history/history_card.js"></script> 79 <script src="chrome://history/history_card.js"></script>
68 </dom-module> 80 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698