Fix preserving commit ranges when paginating in the diff viewer.

Review Request #14292 — Created Jan. 15, 2025 and updated

Information

Review Board
release-7.x

Reviewers

When paginating in the diff viewer, we were inadvertently resetting the
commit ranges. This was due to merely specifying the new page to load
from without passing in the existing ranges that were selected, causing
those to reset.

Now, when handling a page selection, we fetch any existing commit range
information and pass it to _navigate().

Unit tests were added to ensure this doesn't regress.

Unit tests passed.

Manually tested with a diff containing multiple pages and commits.

Summary ID
Fix preserving commit ranges when paginating in the diff viewer.
When paginating in the diff viewer, we were inadvertently resetting the commit ranges. This was due to merely specifying the new page to load from without passing in the existing ranges that were selected, causing those to reset. Now, when handling a page selection, we fetch any existing commit range information and pass it to `_navigate()`. Unit tests were added to ensure this doesn't regress.
876aaa4a5c1a0f2cc33f6e60fc1957afbec5701f
Checks run (2 succeeded)
flake8 passed.
JSHint passed.
maubin
  1. Ship It!
  2. 
      
david
  1. Ship It!
  2.