New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 789363 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jan 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug



Sign in to add a comment

Inaccurate bookmark count

Project Member Reported by wychen@chromium.org, Nov 29 2017

Issue description

Chrome Version: M63
OS: Android

What steps will reproduce the problem?
(1) Clear all bookmarks, and create a folder "A" in "Mobile Bookmarks"
(2) Add 3 bookmarks in folder "A"
(3) Go to the root folder, and look at the bookmark count of "Mobile bookmarks".

What is the expected result?
It should show 3 bookmarks.

What happens instead?
It shows 1 bookmark.

The number of immediate child elements is shown. It should show the number of all the bookmarks in the sub-tree instead.
 
Cc: huayinz@chromium.org hannahs@chromium.org cl...@chromium.org
+huayinz@ added the sub-folder labels using a method in the native bookmarks manager (iirc)

+hannahs@/cleer@ for UX input on expected behavior for nested folders

Comment 2 by wychen@chromium.org, Nov 29 2017

If we want to count all the bookmarks (but not folders) in the sub-tree, we'll have to peek inside with TreeNode::children().
Owner: huayinz@chromium.org
Status: Assigned (was: Available)
Currently the description just simply shows the number of children inside a folder, regardless of the child being a bookmark or a folder. This is definitely not correct.

hannahs@/cleer@:

We might have two options:
1) Recursively count the total number of bookmarks in sub folders
2) Only bookmarks in that folder but not subfolders

I personally prefer the option 1 since it gives more information.

As a side, should we consider adding number of sub folders in the description?

Comment 4 by cl...@chromium.org, Dec 14 2017

Option 1 seems more accurate to me too. Are there performance implications with that (ex. a heavily nested folder hierarchy), though?

I don't think we should show the number of folders as a separate count; that seems excessive to me.
Should we still include the sub-folders in the displayed count, and perhaps use "X items" instead of "X bookmarks"? 

Consider this hierarchy:

Mobile Bookmarks/
   Recipes/
      Breakfast/
         www.bagels.com
         www.toast.com
      Lunch/
         www.pizza.com
      Dinner/
         www.spaghetti.com
      anytime-food.com
   Movies/
      www.aliens.com
   Articles/
      www.wsj.com
      www.nytimes.com
      www.cnn.com
      www.bloomberg.com

What should the count for "Mobile Bookmarks" be? How about "Recipes"?

Comment 6 by cl...@chromium.org, Dec 14 2017

My personal expectation would be that we disregard folders and show the number of bookmarks that are direct or indirect children within the folder. So in that example, the "Mobile Bookmarks" count would be 10 and the "Recipes" count would be 5. How viable is that from the technical perspective?
It's viable, I just wanted to confirm that's the desired UX.

Here's what I would see as a user:

 _____________________________
|  Bookmarks                  |
------------------------------|
| Mobile Bookmarks (10)       |
|                             |
|                             |
 _____________________________
|  <-  Mobile bookmarks       |
------------------------------|
| Recipes (5)                 |
| Movies (1)                  |
| Articles (4)                |

 _____________________________
|  <-  Recipes                |
------------------------------|
| Breakfast(2)                |
| Lunch (1)                   |
| Dinner (1)                  |
| anytime-food.com            |
Project Member

Comment 8 by bugdroid1@chromium.org, Jan 8 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/01dd07ebdcb35bee82937466756231ef5c663dc6

commit 01dd07ebdcb35bee82937466756231ef5c663dc6
Author: Becky Zhou <huayinz@chromium.org>
Date: Mon Jan 08 19:53:38 2018

[Bookmarks] Recursively count bookmarks in a folder for the description

The bookmark count for the folder description was simply number of
children in the folder before. Changing this to count number of
bookmarks recursively on sub folders.

Bug:  789363 
Change-Id: Iea0d02146cc944e035e6ae58e26b682b4361cca2
Reviewed-on: https://chromium-review.googlesource.com/826466
Reviewed-by: Theresa <twellington@chromium.org>
Commit-Queue: Becky Zhou <huayinz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#527721}
[modify] https://crrev.com/01dd07ebdcb35bee82937466756231ef5c663dc6/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkBridge.java
[modify] https://crrev.com/01dd07ebdcb35bee82937466756231ef5c663dc6/chrome/android/java/src/org/chromium/chrome/browser/bookmarks/BookmarkFolderRow.java
[modify] https://crrev.com/01dd07ebdcb35bee82937466756231ef5c663dc6/chrome/browser/android/bookmarks/bookmark_bridge.cc
[modify] https://crrev.com/01dd07ebdcb35bee82937466756231ef5c663dc6/chrome/browser/android/bookmarks/bookmark_bridge.h

Status: Fixed (was: Assigned)

Comment 10 Deleted

Sign in to add a comment