Fish Trophy

brennie got a fish trophy!

Set the correct root URL in RB.TextBasedReviewableView

Review Request #10701 — Created Sept. 7, 2019 and submitted

brennie
Review Board
master
10699
reviewboard

The RB.TextBasedReviewableView was using an incorrect root path
Instead of just being the path relative to the FQDN, it was using the
entire URL. This resulted in Backbone never matching URLs since it was
trying to match fragments against full URLs. The view would then be
stuck in the rendered view mode at all times.

Verified that the TextBasedReviewableView can switch between rendered
and source modes on Python 2.7, 3.5, 3.6, and 3.7.

Summary
Set the correct root URL in RB.TextBasedReviewableView
Description From Last Updated

Good opportunity to add a unit test :)

chipx86chipx86

Can you pull the this.model.get('fileAttachmentID') out into its own variable? I don't mind template literals but they're a lot easier ...

chipx86chipx86

Col: 67 Missing semicolon.

reviewbotreviewbot

Col: 42 Missing semicolon.

reviewbotreviewbot

Col: 67 Missing semicolon.

reviewbotreviewbot

Col: 42 Missing semicolon.

reviewbotreviewbot

Just one blank line here.

chipx86chipx86
chipx86
  1. 
      
  2. Good opportunity to add a unit test :)

  3. Can you pull the this.model.get('fileAttachmentID') out into its own variable? I don't mind template literals but they're a lot easier to read and manage if they're pretty limited in what they execute.

  4. 
      
brennie
brennie
Review request changed

Commits:

Summary
-
Set the correct root URL in RB.TextBasedReviewableView
+
Set the correct root URL in RB.TextBasedReviewableView

Diff:

Revision 3 (+188 -2)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 passed.
JSHint failed.

JSHint

brennie
Review request changed

Commits:

Summary
-
Set the correct root URL in RB.TextBasedReviewableView
+
Set the correct root URL in RB.TextBasedReviewableView

Diff:

Revision 4 (+182 -2)

Show changes

Checks run (1 failed, 1 succeeded)

flake8 passed.
JSHint failed.

JSHint

brennie
chipx86
  1. 
      
  2. Just one blank line here.

  3. 
      
brennie
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (47444c9)
Loading...