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

Issue 1643693003: MD History: Implement search functionality. (Closed)

Created:
4 years, 11 months ago by hsampson
Modified:
4 years, 9 months ago
Reviewers:
tsergeant, calamity
CC:
arv+watch_chromium.org, chromium-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@patch_to_be_uploaded
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

MD History: Implement search functionality. Search bar in the toolbar sends dynamic search requests as the user is typing and these results are displayed on one history-card. As you scroll, if there are more results these are loaded, and the number of results found is updated. Within each item: if the title contains the search term, this is bolded. BUG=425625

Patch Set 1 #

Patch Set 2 : Hide cards that haven't been rerendered from previous chrome.send(). #

Total comments: 26

Patch Set 3 : Address reviewer comments. #

Patch Set 4 : Fix commenting. #

Total comments: 58

Patch Set 5 : Address reviewer comments. #

Patch Set 6 : Address reviewer comments. #

Total comments: 6

Patch Set 7 : Address reviewer comments. #

Patch Set 8 : Update comments. #

Patch Set 9 : Update comments. #

Total comments: 10

Patch Set 10 : Address reviewer comments. #

Patch Set 11 : Fix time-gap-separator insertion. #

Total comments: 8

Patch Set 12 : Rebase. #

Patch Set 13 : Rebase and address reviewer comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+488 lines, -22 lines) Patch
M chrome/browser/resources/md_history/compiled_resources.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/resources/md_history/history.js View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +10 lines, -1 line 0 comments Download
M chrome/browser/resources/md_history/history_item.html View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +9 lines, -3 lines 0 comments Download
M chrome/browser/resources/md_history/history_item.js View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +73 lines, -2 lines 0 comments Download
M chrome/browser/resources/md_history/history_list.html View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +24 lines, -3 lines 0 comments Download
M chrome/browser/resources/md_history/history_list.js View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +64 lines, -9 lines 0 comments Download
M chrome/browser/resources/md_history/history_toolbar.js View 1 2 3 4 5 6 7 8 9 10 11 3 chunks +40 lines, -0 lines 0 comments Download
M chrome/browser/ui/webui/md_history_ui.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +7 lines, -1 line 0 comments Download
A chrome/test/data/webui/md_history/history_card_manager_test.js View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +248 lines, -0 lines 0 comments Download
M chrome/test/data/webui/md_history/history_toolbar_test.js View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +12 lines, -1 line 0 comments Download

Depends on Patchset:

Messages

Total messages: 14 (1 generated)
hsampson
4 years, 11 months ago (2016-01-28 05:32:02 UTC) #2
hsampson
4 years, 11 months ago (2016-01-28 06:14:18 UTC) #3
tsergeant
Here's a first pass https://codereview.chromium.org/1643693003/diff/20001/chrome/browser/resources/md_history/history_card.html File chrome/browser/resources/md_history/history_card.html (right): https://codereview.chromium.org/1643693003/diff/20001/chrome/browser/resources/md_history/history_card.html#newcode15 chrome/browser/resources/md_history/history_card.html:15: :host([hidden]) { Is this needed? ...
4 years, 10 months ago (2016-02-02 02:57:36 UTC) #4
hsampson
https://codereview.chromium.org/1643693003/diff/20001/chrome/browser/resources/md_history/history_card.html File chrome/browser/resources/md_history/history_card.html (right): https://codereview.chromium.org/1643693003/diff/20001/chrome/browser/resources/md_history/history_card.html#newcode15 chrome/browser/resources/md_history/history_card.html:15: :host([hidden]) { On 2016/02/02 02:57:36, tsergeant wrote: > Is ...
4 years, 10 months ago (2016-02-03 02:37:59 UTC) #5
tsergeant
Attn: Chris, there's a question for you buried in here. https://codereview.chromium.org/1643693003/diff/20001/chrome/browser/resources/md_history/history_card.html File chrome/browser/resources/md_history/history_card.html (right): https://codereview.chromium.org/1643693003/diff/20001/chrome/browser/resources/md_history/history_card.html#newcode52 ...
4 years, 10 months ago (2016-02-04 02:28:50 UTC) #6
calamity
https://codereview.chromium.org/1643693003/diff/60001/chrome/browser/resources/md_history/history_card.js File chrome/browser/resources/md_history/history_card.js (right): https://codereview.chromium.org/1643693003/diff/60001/chrome/browser/resources/md_history/history_card.js#newcode40 chrome/browser/resources/md_history/history_card.js:40: if ((search == '') || (search == undefined)) { ...
4 years, 10 months ago (2016-02-05 02:30:10 UTC) #7
hsampson
https://codereview.chromium.org/1643693003/diff/60001/chrome/browser/resources/md_history/history_card.html File chrome/browser/resources/md_history/history_card.html (right): https://codereview.chromium.org/1643693003/diff/60001/chrome/browser/resources/md_history/history_card.html#newcode53 chrome/browser/resources/md_history/history_card.html:53: {{searchResultTitle_(historyItems.length, searchTerm, historyDate)}} On 2016/02/04 02:28:49, tsergeant wrote: > ...
4 years, 10 months ago (2016-02-08 04:40:23 UTC) #8
tsergeant
Partial code review before I run off to a meeting. Be aware that several of ...
4 years, 10 months ago (2016-02-08 22:59:01 UTC) #9
hsampson
https://codereview.chromium.org/1643693003/diff/60001/chrome/browser/resources/md_history/history_card_manager.html File chrome/browser/resources/md_history/history_card_manager.html (right): https://codereview.chromium.org/1643693003/diff/60001/chrome/browser/resources/md_history/history_card_manager.html#newcode60 chrome/browser/resources/md_history/history_card_manager.html:60: {{noResultsMessage_}} On 2016/02/08 22:59:01, tsergeant wrote: > On 2016/02/08 ...
4 years, 10 months ago (2016-02-09 02:17:51 UTC) #10
tsergeant
https://codereview.chromium.org/1643693003/diff/60001/chrome/browser/resources/md_history/history_card_manager.html File chrome/browser/resources/md_history/history_card_manager.html (right): https://codereview.chromium.org/1643693003/diff/60001/chrome/browser/resources/md_history/history_card_manager.html#newcode60 chrome/browser/resources/md_history/history_card_manager.html:60: {{noResultsMessage_}} On 2016/02/09 02:17:51, hsampson wrote: > On 2016/02/08 ...
4 years, 10 months ago (2016-02-09 04:28:54 UTC) #11
hsampson
https://codereview.chromium.org/1643693003/diff/160001/chrome/browser/resources/md_history/history_card_manager.html File chrome/browser/resources/md_history/history_card_manager.html (right): https://codereview.chromium.org/1643693003/diff/160001/chrome/browser/resources/md_history/history_card_manager.html#newcode69 chrome/browser/resources/md_history/history_card_manager.html:69: hidden$="{{noResultsAvailable_(historyDataByDay_.length, loading_)}}"> On 2016/02/09 04:28:53, tsergeant wrote: > As ...
4 years, 10 months ago (2016-02-11 02:46:26 UTC) #12
tsergeant
You need to do a rebase as well https://codereview.chromium.org/1643693003/diff/200001/chrome/browser/resources/md_history/history_card.js File chrome/browser/resources/md_history/history_card.js (right): https://codereview.chromium.org/1643693003/diff/200001/chrome/browser/resources/md_history/history_card.js#newcode59 chrome/browser/resources/md_history/history_card.js:59: if ...
4 years, 10 months ago (2016-02-12 00:03:53 UTC) #13
hsampson
4 years, 10 months ago (2016-02-12 06:45:43 UTC) #14
https://codereview.chromium.org/1643693003/diff/200001/chrome/browser/resourc...
File chrome/browser/resources/md_history/history_card.js (right):

https://codereview.chromium.org/1643693003/diff/200001/chrome/browser/resourc...
chrome/browser/resources/md_history/history_card.js:59: if (search == '' ||
search == undefined) {
On 2016/02/12 00:03:52, tsergeant wrote:
> Can search actually ever be undefined?
> Can you do
>   if (search) {
>   }
> 
> ?
> 
> Also, remove these {} or add them back on the else clause as well
> 
> (if you have braces at all, you have to have them on every branch)
> 

No I don't think it can.

https://codereview.chromium.org/1643693003/diff/200001/chrome/browser/resourc...
File chrome/browser/resources/md_history/history_card_manager.js (right):

https://codereview.chromium.org/1643693003/diff/200001/chrome/browser/resourc...
chrome/browser/resources/md_history/history_card_manager.js:41: value: false
On 2016/02/12 00:03:52, tsergeant wrote:
> Can you change to `value: true` instead of your change to history.js?

Done.

https://codereview.chromium.org/1643693003/diff/200001/chrome/browser/resourc...
chrome/browser/resources/md_history/history_card_manager.js:111: if (currentDate
== undefined)
On 2016/02/12 00:03:53, tsergeant wrote:
> I'm not sure what the intention is here? Nothing in the HistoryEntry will ever
> be undefined -- it will be something like the empty string instead.

I think this may just be leftover from a different architecture and doesn't do
anything anymore.

https://codereview.chromium.org/1643693003/diff/200001/chrome/browser/resourc...
chrome/browser/resources/md_history/history_card_manager.js:129: //
this.lastVisitedTime = historyItems[historyItems.length - 1].time;
On 2016/02/12 00:03:52, tsergeant wrote:
> Is this meant to be commented?

Done.

Powered by Google App Engine
This is Rietveld 408576698