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

Issue 159286: Added menus for bookmark bar folders. (Closed)

Created:
11 years, 5 months ago by John Grabowski
Modified:
9 years, 6 months ago
CC:
chromium-reviews_googlegroups.com, John Grabowski, Ben Goodger (Google), pink (ping after 24hrs)
Visibility:
Public.

Description

Added menus for bookmark bar folders. This is NOT based on the Cole prototype; it is an attempt to get something functional in the short term, and have a visual baseline before doing something new. Added folder icons for bookmark bar folder buttons. Added an "off the side" button/menu for bookmark buttons which don't fit on the bar. Updated "Add page..." item to allow creating bookmarks in the folders (if selected over a folder button). BUG=http://crbug.com/8381 TEST=Here we go: 1) Make sure bookmark bar folders have the "folder" icon. 2) Right click on a folder --> Add Page, and add a bookmark. Make sure bookmark is now in the folder, not at the top level. 3) (Oh, you just implicitly verified you can open bookmark folders!) 4) Add 5 bookmarks then shrink the window thinner so all bookmark buttons don't fit. Make sure "off the right" button gets enabled (on right side of bar) and shows bookmarks in a pop-up menu (when clicked) that don't completely fit on the bar. 5) Make it super-wide so the all fit and make sure "off the right" button is disabled. 6) Add a bunch of bookmarks to a folder; make sure they all work. 7) Add nested folders (by editing the bookmark pref file and restarting Chrome) and make sure bookmark folder buttons have nested/cascading menus. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=21479

Patch Set 1 #

Patch Set 2 : '' #

Total comments: 7

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+509 lines, -198 lines) Patch
M chrome/app/nibs/BookmarkBar.xib View 13 chunks +120 lines, -32 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller.h View 5 chunks +18 lines, -2 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller.mm View 1 2 12 chunks +193 lines, -15 lines 0 comments Download
M chrome/browser/cocoa/bookmark_bar_controller_unittest.mm View 1 5 chunks +148 lines, -18 lines 0 comments Download
D chrome/browser/cocoa/bookmark_bar_view.h View 1 chunk +0 lines, -25 lines 0 comments Download
D chrome/browser/cocoa/bookmark_bar_view.mm View 1 chunk +0 lines, -22 lines 0 comments Download
D chrome/browser/cocoa/bookmark_bar_view_unittest.mm View 1 chunk +0 lines, -58 lines 0 comments Download
M chrome/browser/cocoa/bookmark_menu_bridge.mm View 1 2 2 chunks +3 lines, -23 lines 0 comments Download
M chrome/browser/cocoa/bookmark_menu_cocoa_controller.h View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm View 1 2 2 chunks +21 lines, -0 lines 0 comments Download
M chrome/chrome.gyp View 3 chunks +2 lines, -3 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
John Grabowski
+cc pink for milestone tracking +cc thomasvl for l10n issue tracking
11 years, 5 months ago (2009-07-23 20:39:33 UTC) #1
TVL
http://codereview.chromium.org/159286/diff/1001/1002 File chrome/app/nibs/BookmarkBar.xib (right): http://codereview.chromium.org/159286/diff/1001/1002#newcode64 Line 64: <int key="NSfFlags">16</int> why do you have to set ...
11 years, 5 months ago (2009-07-23 21:05:20 UTC) #2
John Grabowski
I didn't set the font explicitly; I think this is an artifact of the button ...
11 years, 5 months ago (2009-07-23 21:14:35 UTC) #3
rohitrao (ping after 24h)
LGTM http://codereview.chromium.org/159286/diff/1001/1004 File chrome/browser/cocoa/bookmark_bar_controller.mm (right): http://codereview.chromium.org/159286/diff/1001/1004#newcode282 Line 282: // Add the given bookmark node (and ...
11 years, 5 months ago (2009-07-23 22:23:35 UTC) #4
John Grabowski
11 years, 5 months ago (2009-07-23 23:16:18 UTC) #5
Note this includes a change to remove the font setting on the button (a la tvl's
comments)

http://codereview.chromium.org/159286/diff/1001/1004
File chrome/browser/cocoa/bookmark_bar_controller.mm (right):

http://codereview.chromium.org/159286/diff/1001/1004#newcode282
Line 282: // Add the given bookmark node (and all it's children) to menu, one
On 2009/07/23 22:23:35, rohitrao wrote:
> s/it's/its/
> 
> Can you say "Recursively add..." in the comment, to make it explicit?

Yes; done.

http://codereview.chromium.org/159286/diff/1001/1004#newcode506
Line 506: if (!favicon.isNull()) {
On 2009/07/23 22:23:35, rohitrao wrote:
> Is there a fallback for missing favicons?  Should we put in a stock icon?

It's a bit more complicated.  At this point, favicons may not be available yet
(delayed load for launch speed).  See nodeFavIconLoaded:node: lower in this file
for the callback when the icon gets loaded.

I am doubtful adding a stock icon is good here, since icons will "flash wrong"
on launch.

http://codereview.chromium.org/159286/diff/1001/1005
File chrome/browser/cocoa/bookmark_menu_cocoa_controller.mm (right):

http://codereview.chromium.org/159286/diff/1001/1005#newcode29
Line 29: // TODO(jrg): add a better heuristic?  I'd really like to trim this
On 2009/07/23 22:23:35, rohitrao wrote:
> Can you use one of the text elider functions?  See app/gfx/text_elider.h.

Ooh... yes I can!

Powered by Google App Engine
This is Rietveld 408576698