Closed Bug 521528 Opened 15 years ago Closed 1 month ago

Inconsistent behavior with collections' selections and contents of Bookmark Info panel when switching collections

Categories

(Camino Graveyard :: Bookmarks, defect)

All
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED INCOMPLETE

People

(Reporter: alqahira, Unassigned)

Details

When switching collections with the Bookmark Info panel visible, we're inconsistent about what we do with the contents of the Info panel.

1. Open Bookmarks, select an item in the Bookmarks Menu collection, Get Info
2. Switch to Bookmarks Bar collection, click on a bookmark
--> Info window shows info for newly-selected bookmark
3. Switch to Address Book collection, click on "selected" bookmark
--> Info window still shows info for bookmark in step 2
4. Select another bookmark in the Address Book collection
--> Info window now shows info for the newly-selected bookmark
5. Switch to an empty collection (perhaps Bonjour) or a collection with fewer bookmarks than the row of the bookmark selected in step 4
--> Info window cleared of previous contents (now blank)

As Chris has noted a couple of times on irc, we don't store a per-collection selection; instead, we seem to store the row index and hope it translates to a bookmark in the other collection.  (There's some weirdness related to folders; expand the first folder in the Menu, select the first item, and switch to the Bar; the second item--a folder, currently--is selected. Then switch back to Menu, and the 8th item--a folder, and the 2nd item when folder 1 is not expanded--is selected.  I've also somehow been able to get the selection in the Menu to move down all the way into the "top level" bookmarks in that collection somehow, just switching back and forth like this--but I can't repro on demand.)

However, even if there is a bookmark in the new collection at the row index of the last selection, we won't update the info window even when clicking on the "selected" bookmark.  And if there's not an item at the row index (i.e., fewer items, or fewer items in the expanded state, in the new collection than the old), we throw away the row index and thus the selection everywhere, and blank the Info panel.

Persisting selection per collection (and having a default selection of item 1 on first use) probably would go a long way towards fixing all of this, but there may be additional cleanup needed to make switching collections and updating the Info panel contents work consistently ("always re-read the selection and update the panel, if visible, when switching collections").
Status: NEW → RESOLVED
Closed: 1 month ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.