• 
      

    Fix the display of the Add Comment button in the Review Dialog.

    Review Request #8855 — Created March 27, 2017 and submitted

    Information

    Review Board
    release-3.0.x
    fb33fc4...

    Reviewers

    The Review Dialog's Add Comment button (used for general comments)
    required a flag to be passed during construction. The "Review" action on
    the review request passed this action in, but the "Edit Review" button
    on the review banner did not.

    Rather than fix up the review banner (plumbing the state through several
    more objects), we now have a RB.EnabledFeatures dictionary where we can
    set the enabled state for features we care about. The Review Dialog
    accesses this directly, instead of taking in an option during
    construction.

    The dialog also no longer tries to load general comments if the feature
    is disabled. This was causing an error before, given that the API would
    not be accessible.

    Unit tests were added to test both the enabled and disabled states.

    Tested with the feature enabled and disabled. I only saw the Add Comment
    dialog when the feature was enabled, and loading comments no longer
    failed when disabled.

    Unit tests pass with the feature enabled and disabled.

    Description From Last Updated

    "they are shown first"

    brenniebrennie

    Col: 2 Expected a string and instead saw %.

    reviewbotreviewbot

    Col: 4 Expected ':' and instead saw 'load'.

    reviewbotreviewbot

    Col: 9 Expected a JSON value.

    reviewbotreviewbot

    Col: 9 Expected '}' and instead saw 'djblets_js'.

    reviewbotreviewbot

    Col: 9 Unrecoverable syntax error. (0% scanned).

    reviewbotreviewbot

    Col: 9 Unrecoverable syntax error. (0% scanned).

    reviewbotreviewbot

    Col: 9 Expected '}' and instead saw 'djblets_js'.

    reviewbotreviewbot

    Col: 9 Expected a JSON value.

    reviewbotreviewbot

    Col: 4 Expected ':' and instead saw 'load'.

    reviewbotreviewbot

    Col: 2 Expected a string and instead saw %.

    reviewbotreviewbot
    Checks run (1 failed, 2 succeeded)
    JSHint failed.
    PEP8 Style Checker passed.
    Pyflakes passed.

    JSHint

    brennie
    1. 
        
    2. Show all issues

      "they are shown first"

    3. 
        
    chipx86
    Review request changed
    Change Summary:

    Made gooder a strings.

    Commit:
    ecb239fc747cc026e3f9311b34f6b030acb6c55b
    fb33fc42de73369a3994c8ebbf23451b3befeaff

    Checks run (1 failed, 2 succeeded)

    JSHint failed.
    PEP8 Style Checker passed.
    Pyflakes passed.

    JSHint

    chipx86
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to release-3.0.x (f0a7dee)