Page MenuHomePhabricator

Improve Differential behavior when scrolling with anchors
ClosedPublic

Authored by epriestley on May 31 2017, 12:43 AM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 12, 10:35 PM
Unknown Object (File)
Thu, Dec 12, 10:35 PM
Unknown Object (File)
Thu, Dec 12, 10:35 PM
Unknown Object (File)
Wed, Dec 11, 7:34 PM
Unknown Object (File)
Tue, Dec 10, 3:25 AM
Unknown Object (File)
Sat, Dec 7, 10:12 PM
Unknown Object (File)
Fri, Dec 6, 4:43 PM
Unknown Object (File)
Wed, Dec 4, 12:41 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.