Page MenuHomePhabricator

Improve Differential behavior when scrolling with anchors
ClosedPublic

Authored by epriestley on May 31 2017, 12:43 AM.
Tags
None
Referenced Files
F19941186: D18052.diff
Wed, Apr 15, 8:44 AM
F19896848: D18052.diff
Sun, Mar 29, 5:20 AM
F19829668: D18052.id43415.diff
Mar 10 2026, 7:29 AM
F19755634: D18052.diff
Feb 17 2026, 5:19 PM
F19554382: D18052.id43414.diff
Jan 29 2026, 9:20 PM
F19181247: D18052.id.diff
Dec 16 2025, 2:40 AM
F18829153: D18052.diff
Oct 24 2025, 8:12 PM
F18809840: D18052.id43414.diff
Oct 19 2025, 5:15 PM
Subscribers
None

Details

Summary

Fixes T12779. Currently, we scroll down if the midline of the changeset is above the midline of the viewport.

This rule can cause us to scroll improperly when loading changesets after jumping to their anchors, since the changeset we want to look at will likely have a midpoint above the document midline. That is, we follow an anchor to X.c, then it loads, then we scroll past it.

Instead, scroll only if the changeset is (almost) entirely above the viewport.

Test Plan

Followed an anchor to PHUIFeedStoryExample:

Screen Shot 2017-05-30 at 5.41.36 PM.png (989×1 px, 221 KB)

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

This revision is now accepted and ready to land.May 31 2017, 12:54 AM
This revision was automatically updated to reflect the committed changes.