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

Issue 2645273002: [MD Bookmarks] Modify search to retain the previously selected folder. (Closed)

Created:
3 years, 11 months ago by angelayang
Modified:
3 years, 9 months ago
Reviewers:
tsergeant, calamity, jiaxi
CC:
chromium-reviews, michaelpg+watch-md-ui_chromium.org, arv+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

[MD Bookmarks] Modify search to retain the previously selected folder. This CL modifies the bookmark manager so that closing a search returns users to the previously selected folder instead of the default folder. The previous folder id also persists in the url during search. BUG=658980 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:closure_compilation

Patch Set 1 #

Total comments: 7

Patch Set 2 : Merge and move selectedId update logic into one function. #

Total comments: 2

Patch Set 3 : Move selection logic into selectFolder. #

Patch Set 4 : Add optional clearSearch parameter to select folder event. #

Patch Set 5 : Rebase #

Total comments: 3

Patch Set 6 : Rebase and update test to use selectFolder. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+122 lines, -107 lines) Patch
M chrome/browser/resources/md_bookmarks/folder_node.js View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/resources/md_bookmarks/item.js View 1 2 3 4 5 1 chunk +7 lines, -3 lines 0 comments Download
M chrome/browser/resources/md_bookmarks/router.js View 1 2 3 1 chunk +2 lines, -5 lines 0 comments Download
M chrome/browser/resources/md_bookmarks/store.js View 1 2 3 4 5 12 chunks +61 lines, -63 lines 0 comments Download
M chrome/test/data/webui/md_bookmarks/sidebar_test.js View 1 2 3 2 chunks +4 lines, -2 lines 0 comments Download
M chrome/test/data/webui/md_bookmarks/store_test.js View 1 2 3 4 5 11 chunks +47 lines, -33 lines 0 comments Download

Messages

Total messages: 17 (5 generated)
angelayang
The selectedId is now in the parameter list during search. This also means that on ...
3 years, 11 months ago (2017-01-23 06:07:03 UTC) #3
angelayang
Hi, adding tsergeant and calamity to this cl- just so you guys can take a ...
3 years, 11 months ago (2017-01-23 06:41:44 UTC) #5
tsergeant
https://codereview.chromium.org/2645273002/diff/1/chrome/browser/resources/md_bookmarks/store.js File chrome/browser/resources/md_bookmarks/store.js (right): https://codereview.chromium.org/2645273002/diff/1/chrome/browser/resources/md_bookmarks/store.js#newcode15 chrome/browser/resources/md_bookmarks/store.js:15: /** @type {?string} */ There's now no way for ...
3 years, 11 months ago (2017-01-25 00:23:18 UTC) #6
tsergeant
3 years, 11 months ago (2017-01-25 00:23:19 UTC) #7
angelayang
Hello, made a few changes to the store. Mostly i wanted the store to use ...
3 years, 10 months ago (2017-01-31 02:25:04 UTC) #10
tsergeant
https://codereview.chromium.org/2645273002/diff/60001/chrome/browser/resources/md_bookmarks/store.js File chrome/browser/resources/md_bookmarks/store.js (right): https://codereview.chromium.org/2645273002/diff/60001/chrome/browser/resources/md_bookmarks/store.js#newcode149 chrome/browser/resources/md_bookmarks/store.js:149: updateSelectedId_: function(id) { The API here is really unclear. ...
3 years, 10 months ago (2017-01-31 03:21:01 UTC) #11
angelayang
I hope that's easier to follow now, thanks~ https://codereview.chromium.org/2645273002/diff/60001/chrome/browser/resources/md_bookmarks/store.js File chrome/browser/resources/md_bookmarks/store.js (right): https://codereview.chromium.org/2645273002/diff/60001/chrome/browser/resources/md_bookmarks/store.js#newcode149 chrome/browser/resources/md_bookmarks/store.js:149: updateSelectedId_: ...
3 years, 10 months ago (2017-01-31 06:29:26 UTC) #12
angelayang
Rebased to include the item select patch. In addition, the selected-folder-event now only clears the ...
3 years, 10 months ago (2017-02-08 02:23:39 UTC) #13
tsergeant
Cool! https://codereview.chromium.org/2645273002/diff/120001/chrome/browser/resources/md_bookmarks/store.js File chrome/browser/resources/md_bookmarks/store.js (right): https://codereview.chromium.org/2645273002/diff/120001/chrome/browser/resources/md_bookmarks/store.js#newcode43 chrome/browser/resources/md_bookmarks/store.js:43: anchorIndex_: { Any particular reason why this needed ...
3 years, 10 months ago (2017-02-08 03:11:10 UTC) #14
jiaxi
There's a new commit for double click. Since we both touched onSelectedFolderChanged_, it might have ...
3 years, 10 months ago (2017-02-08 04:16:14 UTC) #15
angelayang
On 2017/02/08 04:16:14, jiaxi wrote: > There's a new commit for double click. Since we ...
3 years, 10 months ago (2017-02-08 04:35:21 UTC) #16
angelayang
3 years, 10 months ago (2017-02-09 04:17:36 UTC) #17
Hello, i pulled Charlotte's changed into this refactor.

https://codereview.chromium.org/2645273002/diff/120001/chrome/browser/resourc...
File chrome/browser/resources/md_bookmarks/store.js (right):

https://codereview.chromium.org/2645273002/diff/120001/chrome/browser/resourc...
chrome/browser/resources/md_bookmarks/store.js:43: anchorIndex_: {
On 2017/02/08 03:11:10, tsergeant wrote:
> Any particular reason why this needed to change? Nothing else in the CL
touches
> anchorIndex

Previously anchorIndex is set to null on initialization by updateSelectedDisplay
i believe which is now gone in this refactor. There is a test to check if it's
null on initialization. (It's now undefined on initialization) Perhaps I could
change test to match new behavior? what do you think?

Powered by Google App Engine
This is Rietveld 408576698