HomePhabricator

Improve Differential behavior when scrolling with anchors

Description

Improve Differential behavior when scrolling with anchors

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)

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12779

Differential Revision: https://secure.phabricator.com/D18052

Details

Provenance
epriestleyAuthored on May 31 2017, 12:41 AM
epriestleyPushed on May 31 2017, 12:56 AM
Reviewer
chad
Differential Revision
D18052: Improve Differential behavior when scrolling with anchors
Parents
rPc5bb69fd7d79: Use a list view for DiffusionHistory
Branches
Unknown
Tags
Unknown
Tasks
T12779: File anchor links can load scrolled to the wrong file
Build Status
Buildable 17328
Build 23224: Run Core Tests