Page MenuHomePhabricator

Improve Differential behavior when scrolling with anchors
ClosedPublic

Authored by epriestley on May 31 2017, 12:43 AM.
Tags
None
Referenced Files
F18508890: D18052.id.diff
Fri, Sep 5, 3:05 AM
F18501177: D18052.diff
Thu, Sep 4, 9:35 PM
F18443615: D18052.id.diff
Sun, Aug 31, 7:05 PM
F18410662: D18052.diff
Sat, Aug 30, 5:11 AM
F18094704: D18052.diff
Aug 7 2025, 10:18 PM
F17941097: D18052.id43414.diff
Jul 31 2025, 5:02 AM
F17857851: D18052.id.diff
Jul 27 2025, 6:57 PM
F17829983: D18052.id.diff
Jul 26 2025, 10:34 AM
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.