Add "buoyant" headers to Differential

Summary:
As you scroll through a diff, add a fixed-position header to the top of the
document to provide context. This is particularly useful with keyboard
navigation.

The technical implementation is that we seed the document with invisible
markers. When the user scrolls past one, we show a header with that text until
they scroll past another.

Test Plan:
Scrolled through a revision, was presented with context.

https://secure.phabricator.com/file/data/5xhh2jmoon6ukr5qjkh3/PHID-FILE-463ituscyhyw7utnox7m/Screen_Shot_2012-02-22_at_2.48.19_PM.png

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, epriestley

Maniphest Tasks: T696

Differential Revision: https://secure.phabricator.com/D1673
This commit is contained in:
epriestley
2012-02-23 12:26:14 -08:00
parent cdd55eda14
commit bf3dd8663c
6 changed files with 235 additions and 86 deletions

View File

@@ -106,6 +106,8 @@ class DifferentialChangesetListView extends AphrontView {
array());
}
Javelin::initBehavior('buoyant', array());
$output = array();
$mapping = array();
$repository = $this->repository;