Closed Bug 1747200 Opened 3 years ago Closed 3 years ago

The new "Show In Folder" features does not bring into focus the location in the bookmark list? At present, the result can be far below and out of sight if the result is in a folder with lots of bookmarks, requiring to scroll to find it.

Categories

(Firefox :: Bookmarks & History, enhancement, P3)

Firefox 95
enhancement

Tracking

()

VERIFIED FIXED
98 Branch
Tracking Status
firefox98 --- verified
firefox99 --- verified

People

(Reporter: smayer97, Assigned: lebar)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:95.0) Gecko/20100101 Firefox/95.0

Steps to reproduce:

Search for a bookmark. Select new "Show In Folder" option implemented from the following:
https://bugzilla.mozilla.org/show_bug.cgi?id=469441

Actual results:

The result can be far below and out of sight if the result is in a folder with lots of bookmarks, requiring to scroll off the screen to find it.

Expected results:

Bring into focus the location in the bookmark list so you do not have to scroll off the screen to find it.

Type: enhancement → defect

P.S. As per Marco Bonardo comment #81
"...I was sort-of expecting that to work already..."

Component: Untriaged → Bookmarks & History

I could also confirm the searched bookmarked is not scrolled in view on the latest Firefox Nightly 97, tested on MacOS. Marking this as an enhancement as per the last comment from Bug 469441.

Status: UNCONFIRMED → NEW
Type: defect → enhancement
Ever confirmed: true

I tested this myself; Firefox 95.0.1 on Ubuntu 18.04.

I thought I actually saw this work before, but at least for now it is not. I'd really appreciate this change as well.

Yes, this is important for the feature to feel right.
Any help is welcome, if you think you can fix this, please do.

Afaict, selectNode is actually invoking ensureRowIsVisible (https://searchfox.org/mozilla-central/rev/07c3bd159f79f81f86050d5e002a14ed741f34f7/browser/components/places/content/places-tree.js#538,574) but selectItems doesn't... and I'm not sure why we use selectItems here when we have the node.

Severity: -- → N/A
Priority: -- → P3
Depends on: 469441

selecNode doesn’t seem to work in this case since we have the node only from the search context, which throws an error in selectNode’s further calls to treeIndexForNode, and subsequent _getRowForNode (since there are no ancestors in this context). selectItems works since it can have bookmarkGuid passed into it.

I have a fix that basically just calls ensureRowIsVisible explicitly after the folder is opened in the tree (after the call to selectItems). I can submit this in Phabricator unless you (:mak) would prefer/suggest a different approach.

Flags: needinfo?(mak)
Assignee: nobody → lebar
Status: NEW → ASSIGNED

Created D135672 for review.

Flags: needinfo?(mak)
Pushed by mak77@bonardo.net:
https://hg.mozilla.org/integration/autoland/rev/360f7b73656c
Added call to ensureRowIsVisible to make sure that selected node is in view after showInFolder. r=mak
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 98 Branch
QA Whiteboard: [qa-98b-p2]

Managed to reproduce the issue on an older version of Nightly (2021-12-21) using macOS 10.15.
Retested everything using Firefox 98.0b8 and Nightly 99.0a1 on the same OS. The issue is not reproducing anymore.

Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: