Add "Publish and Archive" to the review dialog.
Review Request #9220 — Created Sept. 24, 2017 and submitted
This change adds a shortcut allowing people who are publishing a review
to publish the review and archive the review request all in one shot.
Manually tested adding a comment and clicking "Publish and Archive" from
the banner. Once published, the review request is marked as archived.
Manually tested adding a comment, clicking "Edit Review" from the
banner, and clicking "Publish and Archive" from the review dialog view.
Once published, the review request is marked as archived.Added 3 unit tests, which all pass (along with all other tests). One
scenario creates a new visit and archives the review request. The other
two scenarios update existing visits from visible to visible, and
visible to archived.Added a javascript test to ensure that onPublishClicked is called with
the correct values.
Description | From | Last Updated |
---|---|---|
I think you can remove "WIP" from your summary now. |
david | |
No space between . and " |
brennie | |
Docstrings should be in the imperitive mood (i.e., they should read as instructions). e.g. "update" instead of "updates". No space … |
brennie | |
"creates" For our testing docstrings, we wrap them at 79 but we don't really follow docstring convention, e.g. it is … |
brennie | |
E501 line too long (84 > 79 characters) |
reviewbot | |
Not necessary to pull this out. |
brennie | |
E501 line too long (86 > 79 characters) |
reviewbot | |
We could also make this method return the visit object since we're using that in the tests. It would make … |
brennie | |
You can do user=user here and it will look it up by primary key. Same below. |
brennie | |
"updates" |
brennie | |
E501 line too long (100 > 79 characters) |
reviewbot | |
Not necessary to pull this out. |
brennie | |
Blank line between these. |
brennie | |
E501 line too long (106 > 79 characters) |
reviewbot | |
E501 line too long (90 > 79 characters) |
reviewbot | |
"updates" |
brennie | |
E501 line too long (100 > 79 characters) |
reviewbot | |
Not necessary to pull this out. |
brennie | |
E501 line too long (106 > 79 characters) |
reviewbot | |
E501 line too long (103 > 79 characters) |
reviewbot | |
Trailing comma |
brennie | |
Trailing comma |
brennie | |
Trailing comma |
brennie | |
The inner () should be {}. Space after :. |
brennie | |
Col: 34 Expected ')' to match '(' from line 114 and instead saw ':'. |
reviewbot | |
Col: 35 Expected ')' and instead saw 'true'. |
reviewbot | |
Col: 39 Missing semicolon. |
reviewbot | |
Col: 13 Expected an identifier and instead saw ')'. |
reviewbot | |
Col: 13 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
Col: 14 Missing semicolon. |
reviewbot | |
Col: 14 Expected an identifier and instead saw ')'. |
reviewbot | |
Col: 14 Expected an assignment or function call and instead saw an expression. |
reviewbot | |
E501 line too long (91 > 79 characters) |
reviewbot | |
Can you alphabetically sort this with the other imports? |
brennie | |
E501 line too long (81 > 79 characters) |
reviewbot | |
Blank line between these. |
brennie | |
E501 line too long (97 > 79 characters) |
reviewbot | |
E501 line too long (89 > 79 characters) |
reviewbot | |
E501 line too long (84 > 79 characters) |
reviewbot | |
E501 line too long (86 > 79 characters) |
reviewbot | |
E501 line too long (100 > 79 characters) |
reviewbot | |
E501 line too long (106 > 79 characters) |
reviewbot | |
E501 line too long (90 > 79 characters) |
reviewbot | |
E501 line too long (100 > 79 characters) |
reviewbot | |
E501 line too long (106 > 79 characters) |
reviewbot | |
E501 line too long (103 > 79 characters) |
reviewbot | |
E501 line too long (91 > 79 characters) |
reviewbot | |
E501 line too long (81 > 79 characters) |
reviewbot | |
E501 line too long (97 > 79 characters) |
reviewbot | |
E501 line too long (89 > 79 characters) |
reviewbot | |
E501 line too long (103 > 79 characters) |
reviewbot | |
E501 line too long (122 > 79 characters) |
reviewbot | |
E501 line too long (106 > 79 characters) |
reviewbot | |
E501 line too long (122 > 79 characters) |
reviewbot | |
E501 line too long (103 > 79 characters) |
reviewbot | |
E501 line too long (91 > 79 characters) |
reviewbot | |
E501 line too long (81 > 79 characters) |
reviewbot | |
E501 line too long (97 > 79 characters) |
reviewbot | |
E501 line too long (89 > 79 characters) |
reviewbot | |
It was like this before, but can you fix up this docstring? There should be no space between the """ … |
david | |
Same comments on this docstring--space, imperative mood, and "Args" documentation. |
david | |
We should include a trailing comma on this line too. |
david | |
Blank line between these two. |
david | |
Add a trailing comma here. |
david | |
This should be reviewboard.reviews.models.review_request.ReviewRequest. The reviews.models.ReviewRequest is an alias but won't necessarily link to the right place. You can wrap … |
david | |
Same here. |
david | |
See my reply to previous reviews. |
david | |
This line in too long. Can you do it as: expect(view._onPublishClicked).toHaveBeenCalledWith({ publishAndArchive: true, }); |
david | |
This is getting big enough that we should probably put each parameter on its own line. |
david | |
W291 trailing whitespace |
reviewbot | |
ReviewRequest should be aligned with reviewboard. |
brennie | |
This should be aligned like: review_request (reviewboard.reviews.models.review_request. ReviewRequest): The review request to update the visibility of. |
david | |
How about "The new visibility". |
brennie | |
This isn't a .es6.js file, so there shouldn't be a comma after the last item in the object. |
david | |
Can you put the last item on the next line to keep in wrapping in 80 columns? |
david | |
Can you change to "Unarchive a review request" |
chipx86 | |
The "Returns the visit" needs to be removed from the summary. Description also needs to be fleshed out to describe … |
chipx86 | |
Should ideally list the visibility constants. |
chipx86 | |
Can you swap these so they're in alphabetical order? |
chipx86 | |
Here, too. |
chipx86 | |
And here. |
chipx86 | |
Indentation is kinda wonky. Can you change this to: attrs: [ ... ], |
chipx86 | |
4.0? |
chipx86 | |
Looks like this is the wrong way now. |
chipx86 |
-
This looks great. You can probably remove the WIP tag :)
-
-
Docstrings should be in the imperitive mood (i.e., they should read as instructions). e.g. "update" instead of "updates".
No space around the docstring.
Should be formatted as:
"""Single line summary. Multi line description (if applicable). Args: review_request (type of review_request): ... """
If this returned something it would also need:
""" Returns: return_type: Description of returned value. """
-
"creates"
For our testing docstrings, we wrap them at 79 but we
don't really follow docstring convention, e.g. it is ok to do"""Testing some_some_very_long_method does some thing """
-
-
We could also make this method return the visit object since we're using that in the tests. It would make them shorter and involve fewer queries.
-
-
-
-
-
-
-
-
-
-
-
-
- Commit:
-
0d3d440a6186d1c24a207a3bc894654f3c8bb51bbe07e3c00c4e71080e8738353cf4abd7968fe2df
- Diff:
-
Revision 2 (+120 -21)
Checks run (1 failed, 1 succeeded)
flake8
- Commit:
-
be07e3c00c4e71080e8738353cf4abd7968fe2dff4adfb8c6ab4cc1e071ca4368576e3132931af77
- Diff:
-
Revision 3 (+125 -21)
Checks run (1 failed, 1 succeeded)
flake8
- Commit:
-
f4adfb8c6ab4cc1e071ca4368576e3132931af774cb23a759f57f84f8f51e96ebc2d08949a400241
- Diff:
-
Revision 4 (+135 -21)
Checks run (2 succeeded)
-
The substance of the change looks good. Just a few formatting/documentation comments.
-
It was like this before, but can you fix up this docstring? There should be no space between the """ and the first line, the summary line should be in the imperative mood instead of passive ("Unarchive" vs. "Unarchives"), and we should document the
review_request
parameter. -
-
-
-
- Commit:
-
4cb23a759f57f84f8f51e96ebc2d08949a4002414926b6b109621177e80b9e2c976c44308dd692ee
- Diff:
-
Revision 5 (+152 -22)
Checks run (2 succeeded)
-
-
This should be
reviewboard.reviews.models.review_request.ReviewRequest
. Thereviews.models.ReviewRequest
is an alias but won't necessarily link to the right place. You can wrap this after any period to stay within the 80-column limit. -
-
-
This line in too long. Can you do it as:
expect(view._onPublishClicked).toHaveBeenCalledWith({ publishAndArchive: true, });
-
- Commit:
-
4926b6b109621177e80b9e2c976c44308dd692ee3bfc5bbc04393724ea0ca0f8d024d30a9c5c6da4
- Diff:
-
Revision 6 (+156 -22)
Checks run (2 succeeded)
- Commit:
-
3bfc5bbc04393724ea0ca0f8d024d30a9c5c6da456a5c5fe778c71c9a1cb05ade7485db68c388c99
- Diff:
-
Revision 7 (+163 -24)
- Commit:
-
56a5c5fe778c71c9a1cb05ade7485db68c388c9961f8a0da8805fc27522501586dfc89771c334757
- Diff:
-
Revision 8 (+163 -24)
Checks run (2 succeeded)
- Commit:
-
61f8a0da8805fc27522501586dfc89771c3347579c74b098bfd0e9ce41a6e39c40512119a5fe0eb5
- Diff:
-
Revision 9 (+160 -24)
Checks run (2 succeeded)
- Commit:
-
9c74b098bfd0e9ce41a6e39c40512119a5fe0eb5291bd64635b6ba8e1db3c87b63ef6af0b629b46b
- Diff:
-
Revision 10 (+160 -24)
Checks run (2 succeeded)
- Summary:
-
[WIP] Add "Publish and Archive" to the review dialog.Add "Publish and Archive" to the review dialog.
- Commit:
-
291bd64635b6ba8e1db3c87b63ef6af0b629b46b653546b0c5b9db0e3575964e3c017510fc7621a9
- Diff:
-
Revision 11 (+161 -24)
Checks run (2 succeeded)
- Change Summary:
-
Rebase to merge with latest changes, fix up text in UI to match other options in the drop-down.
- Branch:
-
release-3.0.xrelease-4.0.x
- Commit:
-
653546b0c5b9db0e3575964e3c017510fc7621a94d8eb64060db2506cfc2209103a1433e99a24e85
- Diff:
-
Revision 12 (+165 -24)
Checks run (2 succeeded)
- Commit:
-
4d8eb64060db2506cfc2209103a1433e99a24e8592757653fd45004dce9245be1c56ab1bcd37ee68
- Diff:
-
Revision 13 (+179 -25)