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
F15531916: D18060.id43438.diff
Wed, Apr 23, 1:47 PM
F15525602: D18060.id.diff
Mon, Apr 21, 3:35 PM
F15521148: D18060.diff
Sun, Apr 20, 11:37 AM
F15475779: D18060.id43438.diff
Sun, Apr 6, 11:32 PM
F15429772: D18060.id43445.diff
Mar 24 2025, 4:13 AM
F15423201: D18060.id43438.diff
Mar 22 2025, 1:53 PM
F15420806: D18060.id.diff
Mar 21 2025, 5:50 PM
F15416671: D18060.diff
Mar 20 2025, 12:54 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable