Introduce a file attachment image review UI.

Review Request #3441 — Created Oct. 22, 2012 and submitted

Information

Review Board
master

Reviewers

Introduce a file attachment image review UI.

This introduces the first real review UI for file attachments. There's a
few new JavaScript objects for easily dealing with
FileAttachmentComments and FileAttachment-based review UIs.

The UI is the same as what we have for screenshots. In fact, the
screenshot code has changed to just use the new image review UI code,
but with models for working with Screenshot and ScreenshotComments.

There's also some new code for registering review UIs, which will make
it easier to start developing new UIs. This includes in extensions.
Tested screenshot comment review and file attachment image comment review.

This included posting new draft comments, reloading and seeing the comments
in the right place, publishing them, and seeing them again.

It also included verifying old screenshot comments were in the right place.
Description From Last Updated

It might be more consistent as 'get_comments_json'.

SM smacleod

"commetns" -> "comments"

SM smacleod

The other formats you refer to are those supported by simplejson.dumps, correct? Is there any way we can be more …

SM smacleod
chipx86
chipx86
SM
  1. 
      
  2. reviewboard/reviews/ui/base.py (Diff revision 2)
     
     
    Show all issues
    It might be more consistent as 'get_comments_json'.
  3. reviewboard/reviews/ui/base.py (Diff revision 2)
     
     
    Show all issues
    "commetns" -> "comments"
  4. reviewboard/reviews/ui/base.py (Diff revision 2)
     
     
     
     
    Show all issues
    The other formats you refer to are those supported by simplejson.dumps, correct? Is there any way we can be more precise about what other formats entails?
  5. reviewboard/reviews/ui/base.py (Diff revision 2)
     
     
    Is the plan to allow extensions to call this directly, or will some sort of hook be added?
    1. As discussed elsewhere, this will be done separately as a student project.
  6. 
      
chipx86
david
  1. 
      
  2. What happens in the other code if it gets undefined fields? Should we log something?
    1. It'll use the default of null for the field. This is more to handle the case where it's not an int-castable value for some reason and we get NaN back. It's probably going to render wrong. This will only happen if something stores the values incorrectly, and though that may happen, it would take work, so I'm not ready to spend a lot of time on it right now.
      
      Ideally we'd log, but we don't have fallbacks for if console.log doesn't exist right now. That'll have to be done at some point.
  3. 
      
david
  1. Ship It!
  2. 
      
david
  1. After trying out this patch, I think you need to add something that imports reviewboard.reviews.ui in something that runs during initial load. Maybe reviewboard/reviews/__init__.py ?
  2. 
      
chipx86
david
  1. Ship It!
  2. 
      
chipx86
Review request changed

Status: Closed (submitted)

Change Summary:

Pushed to master (7b3a4b6)
Loading...