Page MenuHomePhabricator

Improve Differential behavior when scrolling with anchors
ClosedPublic

Authored by epriestley on May 31 2017, 12:43 AM.
Tags
None
Referenced Files
F14034111: D18052.diff
Sat, Nov 9, 10:14 PM
F14019510: D18052.diff
Tue, Nov 5, 10:32 PM
F14011468: D18052.id.diff
Fri, Nov 1, 1:56 AM
F13958268: D18052.id.diff
Mon, Oct 14, 1:43 PM
Unknown Object (File)
Oct 9 2024, 11:02 AM
Unknown Object (File)
Sep 13 2024, 9:07 AM
Unknown Object (File)
Sep 12 2024, 2:34 PM
Unknown Object (File)
Sep 10 2024, 7:29 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.