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

Issue 102713002: Support folders in bookmark search (Closed)

Created:
7 years ago by d.halman
Modified:
6 years, 11 months ago
CC:
chromium-reviews, tfarina, browser-components-watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Visibility:
Public.

Description

Strip top level folders from bookmark search Bookmarks Bar and Other Bookmarks are the only top level folders in the bookmarks tree, they are not user-created and do not support move/delete functionality. Including folders in bookmark searches also included the top level folders, and would require extra logic to block move/delete actions on these folders. Since they are top level, they cannot be collapsed in the bookmark tree on the left pane of the bookmark manager (always visible). Showing them in search results as well can be considered redundant, and removing them from search results avoids extra context menu logic as well as edge cases that were ignored when search was originally restricted to urls and not folders. Also update search results whenever an item in the search results is cut/deleted/restored. BUG=324231 BUG=329144 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=246417

Patch Set 1 #

Total comments: 3

Patch Set 2 : Update search results on delete (test pending) #

Patch Set 3 : Add test coverage and improve result refresh #

Total comments: 8

Patch Set 4 : Refresh through backend instead of ui + unit_test coverage #

Patch Set 5 : Handle single node restoration and only update once per batch delete #

Total comments: 1

Patch Set 6 : Improve search test comments #

Patch Set 7 : Support cut command #

Patch Set 8 : Improve removal efficiency #

Patch Set 9 : Resolve conflicts with master + .cc handling of clipboard #

Unified diffs Side-by-side diffs Delta from patch set Stats (+133 lines, -26 lines) Patch
M chrome/browser/bookmarks/bookmark_utils.cc View 1 2 3 4 5 6 7 8 3 chunks +29 lines, -6 lines 0 comments Download
M chrome/browser/bookmarks/bookmark_utils_unittest.cc View 1 2 3 4 5 6 7 8 2 chunks +18 lines, -10 lines 0 comments Download
M chrome/browser/resources/bookmark_manager/js/main.js View 1 2 3 4 5 6 7 8 4 chunks +60 lines, -3 lines 0 comments Download
M chrome/test/data/extensions/api_test/bookmarks/test.js View 1 2 5 chunks +26 lines, -7 lines 0 comments Download

Messages

Total messages: 45 (0 generated)
d.halman
Please review changes in chrome/browser/bookmarks/bookmark_utils.cc
7 years ago (2013-12-03 19:50:35 UTC) #1
tfarina
https://codereview.chromium.org/102713002/diff/1/chrome/browser/bookmarks/bookmark_utils.cc File chrome/browser/bookmarks/bookmark_utils.cc (right): https://codereview.chromium.org/102713002/diff/1/chrome/browser/bookmarks/bookmark_utils.cc#newcode87 chrome/browser/bookmarks/bookmark_utils.cc:87: bool IsTopLevel(const BookmarkNode *n1) { do not use abbreviations. ...
7 years ago (2013-12-03 21:19:04 UTC) #2
sky
https://codereview.chromium.org/102713002/diff/1/chrome/browser/bookmarks/bookmark_utils.cc File chrome/browser/bookmarks/bookmark_utils.cc (right): https://codereview.chromium.org/102713002/diff/1/chrome/browser/bookmarks/bookmark_utils.cc#newcode87 chrome/browser/bookmarks/bookmark_utils.cc:87: bool IsTopLevel(const BookmarkNode *n1) { Use BookmarkModel::is_permanent_node, also, update ...
7 years ago (2013-12-03 21:19:06 UTC) #3
d.halman
Switched to using model->is_permanent_node(node), and confirmed expected behavior. Writing BookmarkSearchFolder test now, ran into another ...
7 years ago (2013-12-05 19:00:59 UTC) #4
sky
On 2013/12/05 19:00:59, d.halman wrote: > Switched to using model->is_permanent_node(node), and confirmed expected > behavior. ...
7 years ago (2013-12-05 20:42:36 UTC) #5
d.halman
Sorry for being unclear. The children of the deleted folder are deleted and removed from ...
7 years ago (2013-12-05 21:04:44 UTC) #6
d.halman
Fixed issue where children of deleted parents remained in search results until refreshed. Can't find ...
7 years ago (2013-12-07 00:32:04 UTC) #7
d.halman
Sky + tfarina: Updated test coverage and added result refresh to prevent edge cases. Tests ...
7 years ago (2013-12-10 23:35:38 UTC) #8
tfarina
Minimal changes in chrome/browser/bookmarks lgtm. https://codereview.chromium.org/102713002/diff/40001/chrome/browser/resources/bookmark_manager/js/main.js File chrome/browser/resources/bookmark_manager/js/main.js (right): https://codereview.chromium.org/102713002/diff/40001/chrome/browser/resources/bookmark_manager/js/main.js#newcode830 chrome/browser/resources/bookmark_manager/js/main.js:830: function updateSearchResults() { you ...
7 years ago (2013-12-10 23:59:32 UTC) #9
d.halman
+ dbeam: please review changes in c/b/resources/bookmark_manager/js c/test/data/extensions/api_test/bookmarks
7 years ago (2013-12-11 00:14:32 UTC) #10
sky
Please add test coverage
7 years ago (2013-12-11 00:22:03 UTC) #11
Dan Beam
-dbeam@/+arv@ because there's too much black magic here (where does |list| even come from, for ...
7 years ago (2013-12-11 00:30:01 UTC) #12
tfarina
yeah, I missed that. You should be able add a test in bookmark_utils_unittests.cc showing that ...
7 years ago (2013-12-11 00:31:09 UTC) #13
tfarina
Although I see you have coverage and is testing it indirectly in chrome/test/data/extensions/api_test/bookmarks/test.js
7 years ago (2013-12-11 00:32:45 UTC) #14
d.halman
dbeam: I'd like to address the black magic issue. I referenced list from other functions ...
7 years ago (2013-12-11 01:35:56 UTC) #15
d.halman
+arv: please advise on comments regarding c/b/resources/bookmark_manager/js/main.js per dbeam's request.
7 years ago (2013-12-11 01:54:47 UTC) #16
sky
I am not a good reviewer for the JS side. As to test coverage, add ...
7 years ago (2013-12-11 14:54:52 UTC) #17
tfarina
Halman, yes, as you are changing the behavior of GetBookmarksContainingText(), it would be good to ...
7 years ago (2013-12-11 15:52:11 UTC) #18
arv (Not doing code reviews)
Why is this one CL instead of two? I feel like change to not include ...
7 years ago (2013-12-11 16:41:37 UTC) #19
d.halman
Thank you for the input and review, arv. I'll attempt to refactor updateSearchResults to manipulate ...
7 years ago (2013-12-13 21:04:07 UTC) #20
arv (Not doing code reviews)
https://codereview.chromium.org/102713002/diff/40001/chrome/browser/resources/bookmark_manager/js/main.js File chrome/browser/resources/bookmark_manager/js/main.js (right): https://codereview.chromium.org/102713002/diff/40001/chrome/browser/resources/bookmark_manager/js/main.js#newcode892 chrome/browser/resources/bookmark_manager/js/main.js:892: updateSearchResults(); On 2013/12/13 21:04:07, d.halman wrote: > Would there ...
7 years ago (2013-12-13 22:08:13 UTC) #21
d.halman
Looking through bookmark_list.js that you linked previously, I see a reload() function that handles list ...
7 years ago (2013-12-13 23:11:15 UTC) #22
arv (Not doing code reviews)
On 2013/12/13 23:11:15, d.halman wrote: > Looking through bookmark_list.js that you linked previously, I see ...
7 years ago (2013-12-16 17:12:30 UTC) #23
d.halman
On 2013/12/16 17:12:30, arv wrote: > This still breaks selection, doesn't it? On delete, the ...
7 years ago (2013-12-16 21:15:02 UTC) #24
arv (Not doing code reviews)
On 2013/12/16 21:15:02, d.halman wrote: > On 2013/12/16 17:12:30, arv wrote: > > This still ...
7 years ago (2013-12-16 23:33:21 UTC) #25
d.halman
On 2013/12/16 23:33:21, arv wrote: > I was hoping we could just update the data ...
7 years ago (2013-12-17 03:05:43 UTC) #26
arv (Not doing code reviews)
On Mon, Dec 16, 2013 at 10:05 PM, <d.halman@gmail.com> wrote: > On 2013/12/16 23:33:21, arv ...
7 years ago (2013-12-17 15:09:31 UTC) #27
d.halman
> I think we should just go ahead and reload the search view. If people ...
7 years ago (2013-12-17 20:51:31 UTC) #28
arv (Not doing code reviews)
LGTM
7 years ago (2013-12-17 21:02:26 UTC) #29
d.halman
sky: test coverage sufficient?
7 years ago (2013-12-17 21:33:16 UTC) #30
sky
Minor nits, LGTM otherwise https://codereview.chromium.org/102713002/diff/80001/chrome/browser/bookmarks/bookmark_utils_unittest.cc File chrome/browser/bookmarks/bookmark_utils_unittest.cc (right): https://codereview.chromium.org/102713002/diff/80001/chrome/browser/bookmarks/bookmark_utils_unittest.cc#newcode68 chrome/browser/bookmarks/bookmark_utils_unittest.cc:68: // Ensure Bookmark Bar and ...
7 years ago (2013-12-17 22:46:32 UTC) #31
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/d.halman@gmail.com/102713002/90001
7 years ago (2013-12-17 22:59:14 UTC) #32
commit-bot: I haz the power
Failed to apply patch for chrome/browser/bookmarks/bookmark_utils.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years ago (2013-12-17 22:59:23 UTC) #33
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/d.halman@gmail.com/102713002/110001
7 years ago (2013-12-17 23:09:28 UTC) #34
commit-bot: I haz the power
Failed to apply patch for chrome/browser/bookmarks/bookmark_utils.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years ago (2013-12-17 23:09:31 UTC) #35
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/d.halman@gmail.com/102713002/130001
7 years ago (2013-12-17 23:27:53 UTC) #36
commit-bot: I haz the power
Failed to apply patch for chrome/browser/bookmarks/bookmark_utils.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years ago (2013-12-17 23:27:56 UTC) #37
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/d.halman@gmail.com/102713002/140001
7 years ago (2013-12-17 23:34:36 UTC) #38
commit-bot: I haz the power
Failed to apply patch for chrome/browser/bookmarks/bookmark_utils.cc: While running patch -p1 --forward --force --no-backup-if-mismatch; patching file ...
7 years ago (2013-12-17 23:34:39 UTC) #39
d.halman
+tom for reviewer working on same area of code. Added support for the cut command ...
7 years ago (2013-12-21 00:37:44 UTC) #40
Tom Cassiotis
On 2013/12/21 00:37:44, d.halman wrote: > +tom for reviewer working on same area of code. ...
7 years ago (2013-12-22 15:06:29 UTC) #41
d.halman
Will look into implementing before the writeToClipboard command in copyToClipboard.
6 years, 11 months ago (2014-01-06 19:27:04 UTC) #42
d.halman
Tom: I handled copyToClipboard from the .cc side with a filter similar to the one ...
6 years, 11 months ago (2014-01-22 19:06:41 UTC) #43
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/d.halman@gmail.com/102713002/270001
6 years, 11 months ago (2014-01-22 19:34:26 UTC) #44
commit-bot: I haz the power
6 years, 11 months ago (2014-01-22 21:36:20 UTC) #45
Message was sent while issue was closed.
Change committed as 246417

Powered by Google App Engine
This is Rietveld 408576698