Page MenuHomePhabricator

For the diff banner, detect the current changeset better
ClosedPublic

Authored by epriestley on May 20 2017, 11:30 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Nov 20, 8:31 PM
Unknown Object (File)
Oct 17 2024, 3:40 AM
Unknown Object (File)
Sep 21 2024, 2:07 AM
Unknown Object (File)
Sep 1 2024, 10:19 PM
Unknown Object (File)
Aug 26 2024, 12:49 AM
Unknown Object (File)
Aug 25 2024, 6:00 PM
Unknown Object (File)
Aug 9 2024, 2:39 PM
Unknown Object (File)
Aug 6 2024, 6:33 AM
Subscribers
None

Details

Summary

Ref T12733. Currently, we detect the changeset which is in the middle of the screen as the current changeset.

This doesn't always get us the most intuitive changeset, particularly after a navigation from the scroll objective list: when you jump to changeset "X", you'd tend to expect "X" to be shown in the header, but the next changeset may be shown if "X" is too short.

Instead, select the changeset near the top of the screen (spanning an invisible line slightly below the banner).

Test Plan

Scrolled and jumped through a document with long and short changesets, saw a more intuitive changeset selected by the banner.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Here's an example:

Screen Shot 2017-05-20 at 4.30.34 AM.png (611×1 px, 108 KB)

The old code would have shown "changeset-view.css" in the banner. The new code shows "packages.php" in the banner, which I think aligns better with expectation.

This revision is now accepted and ready to land.May 20 2017, 1:52 PM
This revision was automatically updated to reflect the committed changes.