chipx86 got a fish trophy!
Rewrite the review dialog.
Review Request #4224 — Created June 8, 2013 and submitted
Rewrite the review dialog. The review dialog has had a full rewrite. It's no longer just a container for a server-side rendered form, which was done in a very hacky way and could be slow to load for large changes. Now it displays instantly and fetches the comments itself, rendering them one at a time. This looks the same as the old form, but with one improvement: File attachment thumbnails are now rendered as well. They appear just like screenshot thumbnails do. Previously, we'd only render the caption or filename. Unit tests were added for this.
Unit tests pass. Tested all three types of comments. Tested modifying every type of field on the reviews and comments and making sure they persisted on save. Tested publishing. Tested discarding the draft. Tested creating a brand new review from scratch with the Review button, and publishing that.
Description | From | Last Updated |
---|---|---|
For now (until we use require.js), can we wrap everything in an anonymous function to avoid polluting the global namespace? |
david | |
If this gets called before render() it'll raise an exception. Can you check whether these are null? |
david | |
Can we use this.listenTo? |
david | |
this.listenTo? |
david | |
this.listenTo? |
david | |
alert? |
david |
- Change Summary:
-
* Added a closure around the file. * Switched to listenTo(). * Removed an alert for error reporting. We'll just fall back on the RB.apiCall error handling.
- Diff:
-
Revision 2 (+1107 -436)
-
This is a review from Review Bot. Tool: PEP8 Style Checker Processed Files: reviewboard/reviews/views.py reviewboard/settings.py reviewboard/reviews/urls.py Ignored Files: reviewboard/static/rb/js/views/draftReviewBannerView.js reviewboard/static/rb/css/reviews.less reviewboard/static/rb/js/views/tests/draftReviewBannerViewTests.js reviewboard/static/rb/js/views/tests/reviewDialogViewTests.js reviewboard/static/rb/js/views/reviewDialogView.js reviewboard/static/rb/js/reviews.js reviewboard/templates/reviews/review_draft_inline_form.html