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

Issue 5694001: Rework how bookmark bar folder menus and submenus are layed out when scrollin... (Closed)

Created:
10 years ago by mrossetti
Modified:
9 years, 7 months ago
Reviewers:
mafv, John Grabowski
CC:
chromium-reviews, Paweł Hajdan Jr., pam+watch_chromium.org, ben+cc_chromium.org
Visibility:
Public.

Description

Rework how bookmark bar folder menus and submenus are layed out when scrolling, adding and removing bookmarks and during drag and drop operations. Make a subfolder menu appear as much on screen as possible. Changed to the BookmarkBarFolderWindow.xib: Added view (visibleView_) between the window's content view and the rest of the content. Added scroll-up arrow and scroll-down arrow views. Added connections to controller of all views within the window. BUG=54701 TEST=Test submenu appearance by creating a folder menu with lots of items with the bottom-most item being a sub-folder with several bookmark items of its own. Place the browser window such that the bookmark button for the sub-folder will appear near the bottom of the screen. Pop up the folder menu then pop up the sub-menu and verify that the sub-menu is shown on screen and does not require scrolling. In all following cases of adding or removing bookmarks, either by using the contextual menus (cut/copy/paste/delete) or by dragging and dropping, verify that the top of the folder menu and the menu items (bookmark buttons) above the location of the addition/removal remain in the same position vertically on the screen; menu items below the affected bookmark should move upward (for a removal) or downward (for an addition) and the scroll-up arrow (the one at the bottom of the menu) should hide or show as appropriate. Verify that dragging or pasting a wide menu item into a narrow folder menu causes the menu to widen. Verify that cutting or deleting a wide menu item from a folder menu will cause the menu to narrow. Perform the listed tests for each of the folder menu arrangements. Folder menu arrangements ------------------------ 1. Folder with no items (one showing 'empty') 2. Folder with just a few items and neither the scroll-up or scroll-down arrow showing. 3. Folder with enough items such that adding one more should cause the scroll-up arrow to show. 4. Folder with enough items and the scroll-up arrow showing such that removing one item should cause the scroll-up arrow to hide. 5. Folder with enough items that the scroll-up arrow shows but after fully scrolling the menu fits completely on screen without any scrolling arrows showing. 6. Folder with enough items that the scroll-up arrow shows and can be scrolled up such that both scroll-up and scroll-down arrows can show with plenty of extra items. Tests ----- 1. Cut a bookmark menu item. 2. Paste an item. 3. Paste another item. 4. Drag an item to a different place within the same folder menu. 5. Drag an item to a different folder menu (one each of those listed above). 6. Cut the first item. 7. Cut the last item. 8. Paste to the last item. For scrollable arrangements #5 and #6: 9. Scroll up only a little (such that the scroll-down arrow does not appear) and cut an item. 10. Scroll up only a little (such that the scroll-down arrow does not appear) and paste an item. For scrollable arrangement #6: 11. Scroll up so that both the scroll-up and scroll-down arrows appear and cut an item. 12. Scroll up so that both the scroll-up and scroll-down arrows appear and paste an item. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=71059

Patch Set 1 #

Patch Set 2 : '' #

Patch Set 3 : '' #

Patch Set 4 : '' #

Patch Set 5 : '' #

Patch Set 6 : '' #

Patch Set 7 : '' #

Patch Set 8 : '' #

Patch Set 9 : '' #

Patch Set 10 : '' #

Patch Set 11 : '' #

Patch Set 12 : '' #

Patch Set 13 : '' #

Patch Set 14 : '' #

Patch Set 15 : '' #

Patch Set 16 : '' #

Patch Set 17 : '' #

Patch Set 18 : '' #

Patch Set 19 : '' #

Patch Set 20 : '' #

Patch Set 21 : '' #

Total comments: 17

Patch Set 22 : '' #

Patch Set 23 : '' #

Total comments: 8

Patch Set 24 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1297 lines, -526 lines) Patch
M chrome/app/nibs/BookmarkBarFolderWindow.xib View 1 2 3 4 5 6 7 8 9 10 11 12 13 28 chunks +631 lines, -71 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_constants.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +11 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 6 chunks +39 lines, -12 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 chunks +491 lines, -269 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 14 chunks +104 lines, -94 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +5 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_window.mm View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +12 lines, -70 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
mrossetti
Finally! This is ready for review.
9 years, 11 months ago (2011-01-06 01:09:05 UTC) #1
John Grabowski
Pretty good. As an overall comment, it's hard to scan the code and tell if ...
9 years, 11 months ago (2011-01-06 23:30:17 UTC) #2
mrossetti
http://codereview.chromium.org/5694001/diff/107001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h File chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h (right): http://codereview.chromium.org/5694001/diff/107001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h#newcode77 chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.h:77: IBOutlet BookmarkBarFolderWindow* shadowWindow_; On 2011/01/06 23:30:18, John Grabowski wrote: ...
9 years, 11 months ago (2011-01-08 01:45:33 UTC) #3
John Grabowski
Almost done http://codereview.chromium.org/5694001/diff/118001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm File chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm (right): http://codereview.chromium.org/5694001/diff/118001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm#newcode53 chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm:53: BOOL couldScrollUp; difference between couldScrollUp and canScrollUp? ...
9 years, 11 months ago (2011-01-11 02:34:20 UTC) #4
mrossetti
Thanks John, I believe I've addressed your concerns. http://codereview.chromium.org/5694001/diff/118001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm File chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm (right): http://codereview.chromium.org/5694001/diff/118001/chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm#newcode53 chrome/browser/ui/cocoa/bookmarks/bookmark_bar_folder_controller.mm:53: BOOL ...
9 years, 11 months ago (2011-01-11 04:12:17 UTC) #5
John Grabowski
9 years, 11 months ago (2011-01-11 04:32:51 UTC) #6
LGTM if trybots pass

Powered by Google App Engine
This is Rietveld 408576698