Add legacy attributes on ReviewablePageView for extensions.

Review Request #9438 - Created Dec. 14, 2017 and submitted

Christian Hammond
Review Board
release-3.0.x
c16a300...
reviewboard

The view/model cleanup for the reviewable pages removed some attributes
needed by extensions. The reviewRequest attribute was previously
fixed, but the pendingReview attribute remained broken. This adds this
attribute back, and listens for any changes on the model in order to
update the view (which currently does not happen, but this might change
for pending reviews as things become more dynamic).

Tested that Power Pack and rbstopwatch both worked. Previously, rbstopwatch
was broken.

Unit tests pass.

  • 0
  • 0
  • 1
  • 1
  • 2
Description From Last Updated
David Trowbridge
  1. 
      
  2. Probably a bit better as:

    ```javascript
    ['reviewRequest', 'pendingReview'].forEach(attrName => {
    ...
    });

  3. I'm not sure this comment actually adds anything. That line of code is pretty self explanatory.

    1. I was trying to separate sections of code (this was before the _.each() loop). However, I think it's worth adding if you don't know what that class does. At least, I don't think it hurts.

    2. Very well.

  4. 
      
Christian Hammond
David Trowbridge
  1. Ship It!
  2. 
      
Christian Hammond
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to release-3.0.x (02b03f8)
Loading...