Remove leading and trailing blank lines in review comments.
Review Request #4561 — Created Sept. 12, 2013 and submitted
Remove leading and trailing blank lines in review comments.
When a user submits a review comment, leading and trailing
blank lines are saved as part of the comment. We want to strip
these blank lines before saving the comment to the database.Reviewed at https://reviews.reviewboard.org/r/4561/
Fix for issue 2933
Created new review request and manually tested:
-review
-review reply
-diff comment
-reply diff comment
-file attachment comment
-reply file attachment commentUnit tests pass.
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
reviewboard/reviews/templatetags/reviewtags.py
Ignored Files:
-
Great to see the first UCOSP review request for the term, congratulations!
I feel like this would be better handled by actually stripping the whitespace
before the comment is saved to the database. That way we don't have this extra
whitespace hanging around, especially since the comment will be rendered in
multiple places, such as when review board sends out notification emails.Also, you should fill out the "Testing Done" section on your review requests
to tell us what you tested, and how you tested it.Really happy to see you getting started! :D
Change Summary:
Trim whitespace before saving the comment to the database instead of trimming when rendering.
Description: |
|
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
||||||||||||||||||||||||
Diff: |
Revision 2 (+1) |
-
This is a review from Review Bot.
Tool: PEP8 Style Checker
Processed Files:
Ignored Files:
reviewboard/static/rb/js/views/reviewReplyEditorView.js
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
Ignored Files:
reviewboard/static/rb/js/views/reviewReplyEditorView.js
-
This looks like it will work for replies to reviews, but not for the initial comments on any given line. We probably want a similar change in commentDialogView.js
Change Summary:
Remove extra whitespace in initial comments.
Summary: |
|
||||
---|---|---|---|---|---|
Diff: |
Revision 3 (+6 -5) |
Change Summary:
Handle whitespace trimming in the Web API level instead of the JS level.
Description: |
|
||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Diff: |
Revision 4 (+9 -7) |
-
This is a review from Review Bot.
Tool: PEP8 Style Checker
Processed Files:
reviewboard/webapi/resources/review_reply_file_attachment_comment.py
reviewboard/webapi/resources/review_file_attachment_comment.py
reviewboard/webapi/resources/review_screenshot_comment.py
reviewboard/webapi/resources/base_review.py
reviewboard/webapi/resources/review_reply_diff_comment.py
reviewboard/webapi/resources/review_reply_screenshot_comment.py
reviewboard/webapi/resources/review_diff_comment.py
reviewboard/webapi/resources/review_reply.py
Ignored Files: -
reviewboard/webapi/resources/review_screenshot_comment.py (Diff revision 4) Col: 80
E501 line too long (84 > 79 characters)
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
reviewboard/webapi/resources/review_reply_file_attachment_comment.py
reviewboard/webapi/resources/review_file_attachment_comment.py
reviewboard/webapi/resources/review_screenshot_comment.py
reviewboard/webapi/resources/base_review.py
reviewboard/webapi/resources/review_reply_diff_comment.py
reviewboard/webapi/resources/review_reply_screenshot_comment.py
reviewboard/webapi/resources/review_diff_comment.py
reviewboard/webapi/resources/review_reply.py
Ignored Files:
Change Summary:
Fix wrapping.
-
This is a review from Review Bot.
Tool: PEP8 Style Checker
Processed Files:
reviewboard/webapi/resources/review_reply_file_attachment_comment.py
reviewboard/webapi/resources/review_file_attachment_comment.py
reviewboard/webapi/resources/review_screenshot_comment.py
reviewboard/webapi/resources/base_review.py
reviewboard/webapi/resources/review_reply_diff_comment.py
reviewboard/webapi/resources/review_reply_screenshot_comment.py
reviewboard/webapi/resources/review_diff_comment.py
reviewboard/webapi/resources/review_reply.py
Ignored Files:
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
reviewboard/webapi/resources/review_reply_file_attachment_comment.py
reviewboard/webapi/resources/review_file_attachment_comment.py
reviewboard/webapi/resources/review_screenshot_comment.py
reviewboard/webapi/resources/base_review.py
reviewboard/webapi/resources/review_reply_diff_comment.py
reviewboard/webapi/resources/review_reply_screenshot_comment.py
reviewboard/webapi/resources/review_diff_comment.py
reviewboard/webapi/resources/review_reply.py
Ignored Files:
Summary: |
|
|||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Testing Done: |
|
|||||||||||||||||||||||||||||||||||||||||||||
Bugs: |
|
-
-
reviewboard/webapi/resources/base_review.py (Diff revision 5) There should be a blank line separating the if block from the setattr.
Change Summary:
Fix spacing.
Diff: |
Revision 6 (+11 -7)
|
---|
-
This is a review from Review Bot.
Tool: PEP8 Style Checker
Processed Files:
reviewboard/webapi/resources/review_reply_file_attachment_comment.py
reviewboard/webapi/resources/review_file_attachment_comment.py
reviewboard/webapi/resources/review_screenshot_comment.py
reviewboard/webapi/resources/base_review.py
reviewboard/webapi/resources/review_reply_diff_comment.py
reviewboard/webapi/resources/review_reply_screenshot_comment.py
reviewboard/webapi/resources/review_diff_comment.py
reviewboard/webapi/resources/review_reply.py
Ignored Files:
-
This is a review from Review Bot.
Tool: Pyflakes
Processed Files:
reviewboard/webapi/resources/review_reply_file_attachment_comment.py
reviewboard/webapi/resources/review_file_attachment_comment.py
reviewboard/webapi/resources/review_screenshot_comment.py
reviewboard/webapi/resources/base_review.py
reviewboard/webapi/resources/review_reply_diff_comment.py
reviewboard/webapi/resources/review_reply_screenshot_comment.py
reviewboard/webapi/resources/review_diff_comment.py
reviewboard/webapi/resources/review_reply.py
Ignored Files: