WIP: Dynamic Review UI Rendering

Review Request #10758 — Created Oct. 20, 2019 and updated — Latest diff uploaded

Information

Review Board
master

Reviewers

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 for TextBasedReviewUI. This would ultimately take a type= argument specifying (source or rendered), which could be passed by the caller. Assigned to Nicole.
3. Text(2): Rendering Options Template Block - Update reviewboard/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 - Wrap RB.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:

  1. Ran JavaScript unit tests.
  2. Tested manually to make sure that the element to update actually gets
    updated by using a mock endpoint.
  3. Tested manually to make sure comments are correctly reattached after
    a request is finished.

Commits

Files