Make the file index dock into the unified banner.

Review Request #12941 — Created April 5, 2023 and submitted — Latest diff uploaded

Information

Review Board
release-6.x

Reviewers

One common request we've had over the years is to be able to know what
file is currently being viewed when scrolling through the diffviewer.
It's easy to lose track of the current file in the middle of a long
diff.

This change makes it so the file list docks into the unified banner once
the user scrolls past it. The view there is filtered to show only the
entries corresponding to any diff file blocks visible in the current
viewport. There's a 50px buffer area at the top and bottom in which we
calculate a partial vertical offset and height so it looks like the file
list is scrolling along with the page.

This does not yet allow users to pop open the entire file list in order
to quickly scroll to a specific file, but that's coming in a future
change.

Spent a ton of time scrolling around a large diff and verifying that the
docked file list looked correct. Paid particular attention to the
boundary at which we convert the file list from undocked -> docked and
vice-versa, and the boundaries where files were scrolling on or off the
page at both the top and bottom.

Commits

Files

    Loading...