• 
      

    Merge branch 'ucosp/dkus/dnd-inline-images' into release-3.0.x

    Review Request #8176 — Created May 23, 2016 and submitted

    Information

    Review Board
    release-3.0.x

    Reviewers

    This review request is just to sanity-check the merge of the new DnD features into release-3.0.x

    
     
    Description From Last Updated

    Should be in standard one-line summary, multi-line description format.

    chipx86chipx86

    Missing *args and **kwargs docs.

    chipx86chipx86

    Should have , optional.

    chipx86chipx86

    , optional

    chipx86chipx86

    Three of these are common between this and the dictionary above. We can build these before the file_obj condition, and …

    chipx86chipx86

    We're saving twice in the case of file_obj, since we're doing file.save(..., save=True) above, and save() here. We probably just …

    chipx86chipx86

    The mimetype setting can be one line. Probably the filename too.

    chipx86chipx86

    unicode.

    chipx86chipx86

    unicode

    chipx86chipx86

    Let's use :mimetype: for these.

    chipx86chipx86

    unicode.

    chipx86chipx86

    unicode

    chipx86chipx86

    , optional

    chipx86chipx86

    We can skip the first lookup by doing user__username=username in the second.

    chipx86chipx86

    Can we say "Drop to add an image" ?

    chipx86chipx86

    I think the type is File.

    chipx86chipx86

    File

    chipx86chipx86

    This is listed as callback in the defaults.

    chipx86chipx86

    Should use /** and Args

    chipx86chipx86

    Missing Args and Returns.

    chipx86chipx86

    Let's use :py:class: for the classes.

    chipx86chipx86

    Missing period.

    chipx86chipx86

    Same comments as above.

    chipx86chipx86
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/webapi/resources/file_attachment.py
          reviewboard/staticbundles.py
          reviewboard/webapi/tests/test_user_file_attachment.py
          reviewboard/webapi/resources/base_file_attachment.py
          reviewboard/attachments/models.py
          reviewboard/attachments/evolutions/file_attachment_uuid.py
          reviewboard/webapi/resources/base_review_request_file_attachment.py
          reviewboard/attachments/forms.py
          reviewboard/webapi/resources/user_file_attachment.py
          reviewboard/testing/testcase.py
          reviewboard/webapi/resources/draft_file_attachment.py
          reviewboard/webapi/resources/diff_file_attachment.py
          reviewboard/attachments/mimetypes.py
          reviewboard/urls.py
          reviewboard/webapi/resources/user.py
          reviewboard/webapi/tests/urls.py
          reviewboard/attachments/evolutions/__init__.py
          reviewboard/attachments/evolutions/file_attachment_ownership.py
          reviewboard/webapi/tests/mimetypes.py
          reviewboard/reviews/context.py
          reviewboard/attachments/tests.py
          reviewboard/attachments/views.py
      
      Ignored Files:
          reviewboard/static/rb/js/resources/models/tests/userFileAttachmentModelTests.js
          reviewboard/static/rb/css/ui/dnd-uploader.less
          reviewboard/static/rb/js/resources/models/userFileAttachmentModel.es6.js
          reviewboard/static/rb/js/ui/views/textEditorView.es6.js
          reviewboard/static/rb/js/views/dndUploaderView.es6.js
          reviewboard/static/rb/js/pages/views/tests/reviewablePageViewTests.js
          reviewboard/static/rb/js/views/reviewReplyEditorView.js
          reviewboard/templates/reviews/review_request_box.html
          reviewboard/static/rb/css/pages/reviews.less
          reviewboard/static/rb/js/ui/views/tests/textEditorViewTests.js
          reviewboard/static/rb/css/common.less
          reviewboard/static/rb/css/defs.less
          reviewboard/static/rb/js/views/reviewRequestEditorView.js
          reviewboard/static/rb/js/pages/views/reviewablePageView.js
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/webapi/resources/file_attachment.py
          reviewboard/staticbundles.py
          reviewboard/webapi/tests/test_user_file_attachment.py
          reviewboard/webapi/resources/base_file_attachment.py
          reviewboard/attachments/models.py
          reviewboard/attachments/evolutions/file_attachment_uuid.py
          reviewboard/webapi/resources/base_review_request_file_attachment.py
          reviewboard/attachments/forms.py
          reviewboard/webapi/resources/user_file_attachment.py
          reviewboard/testing/testcase.py
          reviewboard/webapi/resources/draft_file_attachment.py
          reviewboard/webapi/resources/diff_file_attachment.py
          reviewboard/attachments/mimetypes.py
          reviewboard/urls.py
          reviewboard/webapi/resources/user.py
          reviewboard/webapi/tests/urls.py
          reviewboard/attachments/evolutions/__init__.py
          reviewboard/attachments/evolutions/file_attachment_ownership.py
          reviewboard/webapi/tests/mimetypes.py
          reviewboard/reviews/context.py
          reviewboard/attachments/tests.py
          reviewboard/attachments/views.py
      
      Ignored Files:
          reviewboard/static/rb/js/resources/models/tests/userFileAttachmentModelTests.js
          reviewboard/static/rb/css/ui/dnd-uploader.less
          reviewboard/static/rb/js/resources/models/userFileAttachmentModel.es6.js
          reviewboard/static/rb/js/ui/views/textEditorView.es6.js
          reviewboard/static/rb/js/views/dndUploaderView.es6.js
          reviewboard/static/rb/js/pages/views/tests/reviewablePageViewTests.js
          reviewboard/static/rb/js/views/reviewReplyEditorView.js
          reviewboard/templates/reviews/review_request_box.html
          reviewboard/static/rb/css/pages/reviews.less
          reviewboard/static/rb/js/ui/views/tests/textEditorViewTests.js
          reviewboard/static/rb/css/common.less
          reviewboard/static/rb/css/defs.less
          reviewboard/static/rb/js/views/reviewRequestEditorView.js
          reviewboard/static/rb/js/pages/views/reviewablePageView.js
      
      
    2. 
        
    chipx86
    1. Some things I noticed in this pass. Most of it documentation-related, and a couple very small code cleanups.

    2. reviewboard/attachments/forms.py (Diff revision 1)
       
       
       
       
      Show all issues

      Should be in standard one-line summary, multi-line description format.

    3. reviewboard/attachments/forms.py (Diff revision 1)
       
       
       
       
       
      Show all issues

      Missing *args and **kwargs docs.

    4. reviewboard/attachments/forms.py (Diff revision 1)
       
       
      Show all issues

      Should have , optional.

    5. reviewboard/attachments/forms.py (Diff revision 1)
       
       
      Show all issues

      , optional

    6. reviewboard/attachments/forms.py (Diff revision 1)
       
       
       
       
       
       
       
      Show all issues

      Three of these are common between this and the dictionary above. We can build these before the file_obj condition, and update them in here.

    7. reviewboard/attachments/forms.py (Diff revision 1)
       
       
       
       
       
      Show all issues

      We're saving twice in the case of file_obj, since we're doing file.save(..., save=True) above, and save() here. We probably just want to remove file_attachment.save() and use FileAttachment.objects.create() in the else.

    8. reviewboard/attachments/forms.py (Diff revision 1)
       
       
       
       
       
      Show all issues

      The mimetype setting can be one line. Probably the filename too.

    9. reviewboard/attachments/forms.py (Diff revision 1)
       
       
      Show all issues

      unicode.

    10. reviewboard/attachments/mimetypes.py (Diff revision 1)
       
       
      Show all issues

      unicode

    11. reviewboard/attachments/mimetypes.py (Diff revision 1)
       
       
       
       
      Show all issues

      Let's use :mimetype: for these.

      1. I'm hesitant to use :mimetype: here because "text/text/application/pdf" is very much not a mimetype, which is exactly the problem.

      2. Sure. How about for application/octet-stream, and just double-backtick the text/text/application/pdf.

    12. reviewboard/attachments/mimetypes.py (Diff revision 1)
       
       
      Show all issues

      unicode.

    13. reviewboard/attachments/views.py (Diff revision 1)
       
       
       
       
       
      Show all issues

      unicode

    14. reviewboard/attachments/views.py (Diff revision 1)
       
       
      Show all issues

      , optional

    15. reviewboard/attachments/views.py (Diff revision 1)
       
       
       
       
       
       
      Show all issues

      We can skip the first lookup by doing user__username=username in the second.

    16. Show all issues

      Can we say "Drop to add an image" ?

    17. Show all issues

      I think the type is File.

    18. Show all issues

      File

    19. Show all issues

      This is listed as callback in the defaults.

    20. reviewboard/static/rb/js/views/reviewRequestEditorView.js (Diff revision 1)
       
       
       
       
       
       
       
       
      Show all issues

      Should use /** and Args

    21. reviewboard/testing/testcase.py (Diff revision 1)
       
       
       
       
       
       
       
       
      Show all issues

      Missing Args and Returns.

    22. reviewboard/testing/testcase.py (Diff revision 1)
       
       
      Show all issues

      Let's use :py:class: for the classes.

    23. reviewboard/testing/testcase.py (Diff revision 1)
       
       
      Show all issues

      Missing period.

    24. reviewboard/testing/testcase.py (Diff revision 1)
       
       
       
       
       
       
      Show all issues

      Same comments as above.

    25. 
        
    david
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/webapi/resources/file_attachment.py
          reviewboard/staticbundles.py
          reviewboard/webapi/tests/test_user_file_attachment.py
          reviewboard/webapi/resources/base_file_attachment.py
          reviewboard/attachments/models.py
          reviewboard/attachments/evolutions/file_attachment_uuid.py
          reviewboard/webapi/resources/base_review_request_file_attachment.py
          reviewboard/attachments/forms.py
          reviewboard/webapi/resources/user_file_attachment.py
          reviewboard/testing/testcase.py
          reviewboard/webapi/resources/draft_file_attachment.py
          reviewboard/webapi/resources/diff_file_attachment.py
          reviewboard/attachments/mimetypes.py
          reviewboard/urls.py
          reviewboard/webapi/resources/user.py
          reviewboard/webapi/tests/urls.py
          reviewboard/attachments/evolutions/__init__.py
          reviewboard/attachments/evolutions/file_attachment_ownership.py
          reviewboard/webapi/tests/mimetypes.py
          reviewboard/reviews/context.py
          reviewboard/attachments/tests.py
          reviewboard/attachments/views.py
      
      Ignored Files:
          reviewboard/static/rb/js/resources/models/tests/userFileAttachmentModelTests.js
          reviewboard/static/rb/css/ui/dnd-uploader.less
          reviewboard/static/rb/js/resources/models/userFileAttachmentModel.es6.js
          reviewboard/static/rb/js/ui/views/textEditorView.es6.js
          reviewboard/static/rb/js/views/dndUploaderView.es6.js
          reviewboard/static/rb/js/pages/views/tests/reviewablePageViewTests.js
          reviewboard/static/rb/js/views/reviewReplyEditorView.js
          reviewboard/templates/reviews/review_request_box.html
          reviewboard/static/rb/css/pages/reviews.less
          reviewboard/static/rb/js/ui/views/tests/textEditorViewTests.js
          reviewboard/static/rb/css/common.less
          reviewboard/static/rb/css/defs.less
          reviewboard/static/rb/js/views/reviewRequestEditorView.js
          reviewboard/static/rb/js/pages/views/reviewablePageView.js
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/webapi/resources/file_attachment.py
          reviewboard/staticbundles.py
          reviewboard/webapi/tests/test_user_file_attachment.py
          reviewboard/webapi/resources/base_file_attachment.py
          reviewboard/attachments/models.py
          reviewboard/attachments/evolutions/file_attachment_uuid.py
          reviewboard/webapi/resources/base_review_request_file_attachment.py
          reviewboard/attachments/forms.py
          reviewboard/webapi/resources/user_file_attachment.py
          reviewboard/testing/testcase.py
          reviewboard/webapi/resources/draft_file_attachment.py
          reviewboard/webapi/resources/diff_file_attachment.py
          reviewboard/attachments/mimetypes.py
          reviewboard/urls.py
          reviewboard/webapi/resources/user.py
          reviewboard/webapi/tests/urls.py
          reviewboard/attachments/evolutions/__init__.py
          reviewboard/attachments/evolutions/file_attachment_ownership.py
          reviewboard/webapi/tests/mimetypes.py
          reviewboard/reviews/context.py
          reviewboard/attachments/tests.py
          reviewboard/attachments/views.py
      
      Ignored Files:
          reviewboard/static/rb/js/resources/models/tests/userFileAttachmentModelTests.js
          reviewboard/static/rb/css/ui/dnd-uploader.less
          reviewboard/static/rb/js/resources/models/userFileAttachmentModel.es6.js
          reviewboard/static/rb/js/ui/views/textEditorView.es6.js
          reviewboard/static/rb/js/views/dndUploaderView.es6.js
          reviewboard/static/rb/js/pages/views/tests/reviewablePageViewTests.js
          reviewboard/static/rb/js/views/reviewReplyEditorView.js
          reviewboard/templates/reviews/review_request_box.html
          reviewboard/static/rb/css/pages/reviews.less
          reviewboard/static/rb/js/ui/views/tests/textEditorViewTests.js
          reviewboard/static/rb/css/common.less
          reviewboard/static/rb/css/defs.less
          reviewboard/static/rb/js/views/reviewRequestEditorView.js
          reviewboard/static/rb/js/pages/views/reviewablePageView.js
      
      
    2. 
        
    david
    reviewbot
    1. Tool: Pyflakes
      Processed Files:
          reviewboard/webapi/resources/file_attachment.py
          reviewboard/staticbundles.py
          reviewboard/webapi/tests/test_user_file_attachment.py
          reviewboard/webapi/resources/base_file_attachment.py
          reviewboard/attachments/models.py
          reviewboard/attachments/evolutions/file_attachment_uuid.py
          reviewboard/webapi/resources/base_review_request_file_attachment.py
          reviewboard/attachments/forms.py
          reviewboard/webapi/resources/user_file_attachment.py
          reviewboard/testing/testcase.py
          reviewboard/webapi/resources/draft_file_attachment.py
          reviewboard/webapi/resources/diff_file_attachment.py
          reviewboard/attachments/mimetypes.py
          reviewboard/urls.py
          reviewboard/webapi/resources/user.py
          reviewboard/webapi/tests/urls.py
          reviewboard/attachments/evolutions/__init__.py
          reviewboard/attachments/evolutions/file_attachment_ownership.py
          reviewboard/webapi/tests/mimetypes.py
          reviewboard/reviews/context.py
          reviewboard/attachments/tests.py
          reviewboard/attachments/views.py
      
      Ignored Files:
          reviewboard/static/rb/js/resources/models/tests/userFileAttachmentModelTests.js
          reviewboard/static/rb/css/ui/dnd-uploader.less
          reviewboard/static/rb/js/resources/models/userFileAttachmentModel.es6.js
          reviewboard/static/rb/js/ui/views/textEditorView.es6.js
          reviewboard/static/rb/js/views/dndUploaderView.es6.js
          reviewboard/static/rb/js/pages/views/tests/reviewablePageViewTests.js
          reviewboard/static/rb/js/views/reviewReplyEditorView.js
          reviewboard/templates/reviews/review_request_box.html
          reviewboard/static/rb/css/pages/reviews.less
          reviewboard/static/rb/js/ui/views/tests/textEditorViewTests.js
          reviewboard/static/rb/css/common.less
          reviewboard/static/rb/css/defs.less
          reviewboard/static/rb/js/views/reviewRequestEditorView.js
          reviewboard/static/rb/js/pages/views/reviewablePageView.js
      
      
      
      Tool: PEP8 Style Checker
      Processed Files:
          reviewboard/webapi/resources/file_attachment.py
          reviewboard/staticbundles.py
          reviewboard/webapi/tests/test_user_file_attachment.py
          reviewboard/webapi/resources/base_file_attachment.py
          reviewboard/attachments/models.py
          reviewboard/attachments/evolutions/file_attachment_uuid.py
          reviewboard/webapi/resources/base_review_request_file_attachment.py
          reviewboard/attachments/forms.py
          reviewboard/webapi/resources/user_file_attachment.py
          reviewboard/testing/testcase.py
          reviewboard/webapi/resources/draft_file_attachment.py
          reviewboard/webapi/resources/diff_file_attachment.py
          reviewboard/attachments/mimetypes.py
          reviewboard/urls.py
          reviewboard/webapi/resources/user.py
          reviewboard/webapi/tests/urls.py
          reviewboard/attachments/evolutions/__init__.py
          reviewboard/attachments/evolutions/file_attachment_ownership.py
          reviewboard/webapi/tests/mimetypes.py
          reviewboard/reviews/context.py
          reviewboard/attachments/tests.py
          reviewboard/attachments/views.py
      
      Ignored Files:
          reviewboard/static/rb/js/resources/models/tests/userFileAttachmentModelTests.js
          reviewboard/static/rb/css/ui/dnd-uploader.less
          reviewboard/static/rb/js/resources/models/userFileAttachmentModel.es6.js
          reviewboard/static/rb/js/ui/views/textEditorView.es6.js
          reviewboard/static/rb/js/views/dndUploaderView.es6.js
          reviewboard/static/rb/js/pages/views/tests/reviewablePageViewTests.js
          reviewboard/static/rb/js/views/reviewReplyEditorView.js
          reviewboard/templates/reviews/review_request_box.html
          reviewboard/static/rb/css/pages/reviews.less
          reviewboard/static/rb/js/ui/views/tests/textEditorViewTests.js
          reviewboard/static/rb/css/common.less
          reviewboard/static/rb/css/defs.less
          reviewboard/static/rb/js/views/reviewRequestEditorView.js
          reviewboard/static/rb/js/pages/views/reviewablePageView.js
      
      
    2. 
        
    chipx86
    1. Ship It!
    2. 
        
    david
    Review request changed
    Status:
    Completed
    Change Summary:
    Pushed to ucosp/dkus/dnd-inline-images (91be638)