WIP: Dynamic Review UI Rendering
Review Request #10758 — Created Oct. 20, 2019 and updated — Latest diff uploaded
Overview:
Add in functionality to allow review UIs to provide a list of (relative) URLs they want to register, along with the methods that will be handling requests to those URLs.
Task specifications can be found here
This task has been separated into 4 subtasks:
1. Base(1): Review UI URLs - Adding the ability for a ReviewUI subclass to provide URLs they want to make available. Assigned to Nicole.
2. Text(1): Built-In Render URLs - Adding a standard_render/
URL forTextBasedReviewUI
. This would ultimately take atype=
argument specifying (source
orrendered
), which could be passed by the caller. Assigned to Nicole.
3. Text(2): Rendering Options Template Block - Updatereviewboard/templates/reviews/ui/text.html
template to provide a{% block "render_options" %}
that subclasses of the template can use to add new UI. This would be blank by default, meaning it's entirely optional, and can be used only by the review UIs that need it. Assigned to Adil.
4. Text(3): Render Requests in JavaScript - WrapRB.apiCall
in a new method to provide Review UIs with the ability to make requests for custom rendering options and backend rendering implementations. Assigned to Adil
Adil's Testing for Tasks 3 and 4:
- Ran JavaScript unit tests.
- Tested manually to make sure that the element to update actually gets
updated by using a mock endpoint.- Tested manually to make sure comments are correctly reattached after
a request is finished.