Looking good so far! This will really open up the review possibilities with RB, especially once the extension hook stuff is in. What could be cool as well, are DiffUIs for mimetypes. The file attachments and screenshot's aren't really versioned like the diffs, but if they were you could do the same sort of thing (Think overlayed images, side-by-sides etc.). Or you could diff against binary files in the repo (once rbtools gets the binary support of course). Just a thought I had while reviewing :D
Add the beginnings of review UI support.
Review Request #3337 — Created Sept. 20, 2012 and submitted
Add the beginnings of review UI support. This introduces the basic support for building review UIs. This allows Review Board and extensions to register special UIs for reviewing certain file attachments. An example would be a special UI for reviewing XML files, or PDF files. There's a base ReviewUI class that forms the base for anything that provides review functionality for something else. It knows how to do the basic rendering and grab the list of current comments. In time, we may even want to move the diff viewer to this. Then there's FileAttachmentReviewUI, which is where the magic will really happen for us. It looks at registered handlers and tries to find one that best matches the mimetype we're looking for. This is the same logic as thumbnail renderer matching. (And we may want to consolidate that logic in time.) Review UIs are currently displayed in their own page, but they will later be able to specify that they can review inline. In this case, we'll just pop up a lightbox and load in the HTML for the review UI. Right now, there's only one review UI, and that's for screenshots. This is not a FileAttachmentReviewUI. I have one in-progress for image file attachments. However, scanning for review UIs doesn't actually work in practice very well, because it requires that the file defining the class is imported. This will be fixed up for the first review UI. Screenshot support has moved entirely over to this. While not complete, this is a good base for the feature, and should get us started so that students can start poking at code, and we can start fine-tuning the support.
* Moved the mimeparse import. The rest are known things that I'm not too worried about right now, as this code is in development and they'll be addressed.
Revision 2 (+247 -111)