Add ?include-text-types= to the API to replace ?include-raw-text-fields.

Review Request #6553 — Created Nov. 3, 2014 and submitted — Latest diff uploaded


Review Board


The new review dialog demonstrated a need to have not just HTML-forced
text in API payloads, but Markdown-forced as well. The API didn't
previously provide a way to make this happen.

This change introduces a new option for including multiple text types in
one payload. This directly replaces ?include-raw-text-fields, allowing
for the client to request raw text, HTML, Markdown, and/or plain text in
one request. These all end up in their own container fields in the
payload (such as markdown_text_fields, raw_text_fields, etc.). It also
works pretty well as a replacement for ?force-text-type= in most cases,
though does not necessarily warrant deprecating that option.

Documentation was updated for this support, with a note on the
deprecation of ?include-raw-text-fields=.

Python and JavaScript unit tests pass.

Tested manually with the older ?include-raw-text-fields=1 and
with different combinations and values for ?include-text-types=.
Verified the payload contents match what I'd expect.

Tested different review request fields and replies in the UI with
fields with rich text on and off, and with the user option on and