Don't reload the diff viewer when changing revisions.

Review Request #4630 — Created Sept. 22, 2013 and submitted — Latest diff uploaded

Information

Review Board
master

Reviewers

Don't reload the diff viewer when changing revisions.

This change adds a new API resource called "diff-context" which can take the
same revision/interdiff parameters as the diffviewer view, but will return only
the JSON data needed to replace the page.

This is wired up to some AJAX on the client side which will take the new
revision and change out all the data on the models. A backbone router will make
sure that the URL and browser history get appropriately updated.

At the moment this can be a little annoying because our UI jumps around when
things like the current-revision label get replaced. I'll be reworking some of
these UI elements to make sure that they use up the same amount of vertical
space for different diff revisions.

The next major steps, in addition to preventing things from jumping around, are
a redesign of the revision selector widget, and a redesign of how we do
pagination.

Loaded a bunch of different diff and interdiff revisions. Verified that all of
the appropriate UI elements (file index, files, revision label, revision
selector, comments hint) were updated in-place. Checked that pagination still
worked.

    Loading...