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.
Verified that screenshot review still worked as it did before. Tested with a branch for image review. The basics worked, except our JavaScript really is not built to make image review outside of screenshot classes work very well.
- Change Summary:
-
* 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.
- Diff:
-
Revision 2 (+247 -111)