Page MenuHomePhabricator

When stabilizing document scroll position for diffs, stick to anchors harder
ClosedPublic

Authored by epriestley on Jun 1 2017, 7:22 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 2, 6:03 AM
Unknown Object (File)
Fri, Mar 29, 1:34 AM
Unknown Object (File)
Feb 11 2024, 7:46 PM
Unknown Object (File)
Jan 7 2024, 1:13 AM
Unknown Object (File)
Dec 27 2023, 11:21 AM
Unknown Object (File)
Dec 21 2023, 7:20 PM
Unknown Object (File)
Dec 20 2023, 12:05 PM
Unknown Object (File)
Nov 30 2023, 4:18 AM
Subscribers
None

Details

Summary

Ref T12779. Try a little harder to get the autoscroll heuristic right, but also just stick to anchors if the URL has an anchor and the scroll position is near that anchor.

Test Plan
  • Loaded an anchored diff at a bunch of window sizes, seemed pretty sticky.
  • Added usleep(100000 * mt_rand(1, 15)) to ChangesetViewController to make changesets load slowly and in random order, reloaded a bunch of times while scrolling around, things appeared reasonable.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable