Hi guys,
My apologies for not getting back to you on this. I'm fighting a cold and have been taking it easy the past few days.
(Btw, I go by Christian, not Chris, just fyi :)
So let's go over pluggable UIs a bit.
The basic concept is that instead of some hard-coded sets of code, templates and models for reviewing different sets of content, we introduce a new architecture for reviewing "stuff." That "stuff" can be file attachments, screenshots, or diffs, but it'd be backed by a standard interface.
The bulk of what you care about will be review UIs for specific file attachments. These are intended to be registered per-mimetype, so for example there may be a review UI for image/*, one for application/x-pdf, etc.
Right now, the very basics of this infrastructure is in. There's a FileAttachmentReviewUI class (reviewboard/reviews/ui/base.py) that you will be using as a base class for any custom review UIs.
(At the moment, there's no registration mechanism, so for any testing you do, you'll want to temporarily add an import of your ReviewUI's file in FileAttachmentReviewUI.get_best_handler, until one is added).
All comments will be stored in a FileAttachmentComment. There will soon be an extra_data field you'll be able to store any useful information (coordinates, etc.) in.
What you'll need to do is create a template file that provides the rendering of the content and loads in any custom JavaScript file that provides the review UI capability. You'll need to apply my change in /r/3342 (I'm going to try to get this committed tonight, though) and build JavaScript infrastructure on top of what's there. We use jQuery, Backbone.js and Underscore.js, so google for those and take a look at the docs and what my code in that change is doing.
As for what specifically you'll do for your review UIs, that's going to depend greatly on what review UIs you'll be making. We need a discussion on that and to figure out what realistically can be built. This will require some research into any JavaScript libraries that may be useful, possible parsing of file types, representing in HTML/JavaScript, etc. There will be plenty to learn here.
Once we know specifically what will be built, we can figure out how to build it.
Christian
--
Christian Hammond -
chi...@chipx86.comReview Board -
http://www.reviewboard.org
VMware, Inc. -
http://www.vmware.com