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
F18935854: D18060.id43445.diff
Nov 10 2025, 7:06 PM
F18902729: D18060.id43438.diff
Nov 8 2025, 2:28 AM
F18878173: D18060.diff
Nov 6 2025, 3:29 PM
F18851934: D18060.diff
Oct 31 2025, 5:28 AM
F18821227: D18060.id43438.diff
Oct 22 2025, 8:39 PM
F18759527: D18060.id.diff
Oct 6 2025, 4:23 AM
F18737539: D18060.diff
Oct 1 2025, 11:18 AM
F18733629: D18060.id.diff
Sep 30 2025, 10:38 PM
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
Branch
scroll1
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 17351
Build 23255: Run Core Tests
Build 23254: arc lint + arc unit