Fix the display of the Add Comment button in the Review Dialog.
Review Request #8855 — Created March 27, 2017 and submitted
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" |
brennie | |
Col: 2 Expected a string and instead saw %. |
reviewbot | |
Col: 4 Expected ':' and instead saw 'load'. |
reviewbot | |
Col: 9 Expected a JSON value. |
reviewbot | |
Col: 9 Expected '}' and instead saw 'djblets_js'. |
reviewbot | |
Col: 9 Unrecoverable syntax error. (0% scanned). |
reviewbot | |
Col: 9 Unrecoverable syntax error. (0% scanned). |
reviewbot | |
Col: 9 Expected '}' and instead saw 'djblets_js'. |
reviewbot | |
Col: 9 Expected a JSON value. |
reviewbot | |
Col: 4 Expected ':' and instead saw 'load'. |
reviewbot | |
Col: 2 Expected a string and instead saw %. |
reviewbot |
- Change Summary:
-
Made gooder a strings.
- Commit:
-
ecb239fc747cc026e3f9311b34f6b030acb6c55bfb33fc42de73369a3994c8ebbf23451b3befeaff
- Diff:
-
Revision 2 (+108 -62)