Move comment anchor URL handling into the ReviewRequestPage.PageView.

Review Request #9122 — Created Aug. 6, 2017 and submitted

Review Board

Until now, the Issue Summary Table has been handling URLs with a
#comment123 hash and taking care of expanding the appropriate review
and jumping to the right place on the page. This meant that these URLs
wouldn't work if the Issue Summary Table wasn't being used on the page,
and was a bit redundant with the page view's own URL handling.

This change moves the handling of anchors fully into the review request
page's view, consolidating logic into one place and making the Issue
Summary Table fully self-contained.

Unit tests pass.

Tested URLs pointing to an issue in a collapsed entry, and saw that it
handled navigating to the right place.

  • 0
  • 0
  • 1
  • 1
  • 2
Description From Last Updated
  2. Can we explicitly set to null here?

  3. Would be slightly more readable as hash.contains('comment')

    1. That's not a method on strings.

    2. Sorry, meant includes:

    3. No support in IE, and it's not much better than indexOf for that. Going to stick with the current code.

    4. It's included in the babel polyfill, which makes it fall back to indexOf. It makes the code more readable even if it's "not much better"

    5. Ah okay, so long as it's polyfilled.

  1. Ship It!
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (1057380)