Closed Bug 1767434 Opened 2 years ago Closed 2 years ago

Library window is not scrolled and focused onto the selected bookmark when sorting is used after landing patch from bug #1471546

Categories

(Firefox :: Bookmarks & History, defect, P1)

Firefox 101
x86_64
Windows 7
defect

Tracking

()

VERIFIED FIXED
102 Branch
Tracking Status
firefox-esr91 --- unaffected
firefox100 --- unaffected
firefox101 + verified
firefox102 + verified

People

(Reporter: Virtual, Assigned: jteow)

References

(Regression)

Details

(Keywords: nightly-community, regression, reproducible)

Attachments

(2 files)

Attached video screencast.mp4

Library window is not scrolled and focused onto the selected bookmark when sorting is used after landing patch from bug #1471546.

Regression range pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=2e154dcda079ad6ca50bc5d18cbd0991386c5989&tochange=2ca189b8925dba3f28a1cefdc3e6f143ffbee290

mozillaregression-GUI points that regression is caused by:
Narrowed integration regression window from [78ae535c, 2ca189b8] (3 builds) to [2e154dcd, 2ca189b8] (2 builds) (~1 steps left)
Found commit message:
Bug 1471546 - Scroll to bookmark in bookmark library on initial selection when it's not visible r=mak

Differential Revision:
https://phabricator.services.mozilla.com/D139905

Steps to reproduce:

  1. Open latest Mozilla Firefox Nighty 102.0a1 (2022-05-03) (64-bit)
  2. Open Library
  3. Sort bookmarks
  4. Select bookmark
  5. Notice that Library window is not scrolled and focused onto the selected bookmark

Observed results:
Library window is not scrolled and focused onto the selected bookmark when sorting is used.

Expected results:
Library window is scrolled and focused onto the selected bookmark when sorting is used.

Flags: needinfo?(jteow)

apparently the view is scrolled back to the top... likely .bookmarkIndex is broken if it's not a naturally sorted bookmark folder?

Yes, upon checking it locally bookmarkIndex doesn't get updated when a list is re-sorted from the default. I was using it as a shortcut so that I wouldn't always have to commit to a lookup but for accuracy maybe we should always do ContentArea.currentView.view.treeIndexForNode(view.selectedNode); and scrap using bookmarkIndex. What do you think Marco?

Flags: needinfo?(jteow) → needinfo?(mak)

(In reply to James Teow [:jteow] from comment #2)

Yes, upon checking it locally bookmarkIndex doesn't get updated when a list is re-sorted from the default. I was using it as a shortcut so that I wouldn't always have to commit to a lookup but for accuracy maybe we should always do ContentArea.currentView.view.treeIndexForNode(view.selectedNode); and scrap using bookmarkIndex. What do you think Marco?

If we want to keep the shortcut for perf reasons, I think you could check PlacesUtils.nodeIsFolder(...view.result.root), it would only apply in that case.

Flags: needinfo?(mak)

The problem with my previous solution for bug 1471546 was that bookmarkIndex is
not updated when a user sorts the list of bookmarks. So my solution is to always
use the treeIndex since its more reliable.

I've also added two tests: the first checks if the row the visible after clicking
a bookmark that's close to the bottom of the viewable area, and the second does the
same after re-sorting the list.

Assignee: nobody → jteow
Status: NEW → ASSIGNED
Severity: -- → S3
Priority: -- → P3

Changing the priority to P1 as the bug is tracked by a release manager for the current beta.
See Triage for Bugzilla for more information.
If you disagree, please discuss with a release manager.

Priority: P3 → P1

The severity field for this bug is set to S3. However, the bug is marked as tracked for firefox102 (nightly) and tracked for firefox101 (beta).
:jteow, could you consider increasing the severity of this tracked bug?

For more information, please visit auto_nag documentation.

Flags: needinfo?(jteow)
Pushed by jteow@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/7b1519f1aea8
Make updateDetailsPane always retrieve treeIndex r=mak

Comment on attachment 9275079 [details]
Bug 1767434 - Make updateDetailsPane always retrieve treeIndex r?mak

Beta/Release Uplift Approval Request

  • User impact if declined: Upon sorting a list of items in the Library window, clicking additional items in that window won't result in window scrolling to the correct item that was clicked.
  • Is this code covered by automated tests?: Yes
  • Has the fix been verified in Nightly?: Yes
  • Needs manual test from QE?: Yes
  • If yes, steps to reproduce: Please read bug info: https://bugzilla.mozilla.org/show_bug.cgi?id=1767434#c0
  • List of other uplifts needed: None
  • Risk to taking this patch: Low
  • Why is the change risky/not risky? (and alternatives if risky): The changes to the code should only affect the Library window and tests related to clicking an item within a Library window.
  • String changes made/needed:
  • Is Android affected?: No
Flags: needinfo?(jteow)
Attachment #9275079 - Flags: approval-mozilla-beta?
Flags: qe-verify+
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 102 Branch
QA Whiteboard: [qa-triaged]

I managed to reproduce this issue on Windows 7 on Firefox 101.0b7(20220515185854). Verified as fixed on Nightly 102.0a1(20220517092745) on Windows 7.

Comment on attachment 9275079 [details]
Bug 1767434 - Make updateDetailsPane always retrieve treeIndex r?mak

Approved for 101.0b8.

Attachment #9275079 - Flags: approval-mozilla-beta? → approval-mozilla-beta+

I managed to reproduce this issue on Windows 7 on Firefox 101.0b7(20220515185854). Verified as fixed on Firefox 101.0b8(20220517185920) on Windows 7.

Status: RESOLVED → VERIFIED
QA Whiteboard: [qa-triaged]
Flags: qe-verify+

As OP, I'm also confirming that bug is fixed in Mozilla Firefox Nightly 102.0a1 (2022-05-17).
Thank you very much! \o/

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: