Adds support for a "todo" marker within each Markdown field indicating unresolved items that require attention. These markers are denoted using an inline tag which has an optional notes field:
{todo}
{todo|description goes here}
The intention of this addition is to expedite the report review process, particularly for long documents or templated content containing placeholders. Unlike other tags, these markers are not rendered in the final report; they are instead diplayed in the editor UI in the following places:
Component and finding edit views, displayed as an icon next to the affected field's label. This icon is updated on page load and blur (e.g. loss of focus/clicking out of the field). Notably, it is currently not updated on component save to avoid hooking all keyUp events.
Report edit view, displayed as an icon next to the component's title. This icon indicates that one or more of the component's fields has a {todo} tag; clicking on the icon will display a modal which enumerates these fields. In the case of the Findings and Findings (Abridged) components, this list will denote the finding name as well as the affected field.
Findings status view, displayed as an icon within the table which otherwise indicates that the finding is complete or not yet started (using a checkmark or 'X', respectively).
Component review status view, displayed similar to the report edit view above.
Currently, modals which list the affected field use Writehat's internal representation of the field (e.g. a Markdown component diplays a list item indicating text). The "friendly name" associated with these fields is found only within the component's form. In the future this value should be read from the form, but currently the logic used to dereference fields within the model prevents such an addition.
Notably, this PR does not make any changes to Writehat's models, and makes only class-level changes to components. All other additions are either client-side or contained within the Django templates.
Adds support for a "todo" marker within each Markdown field indicating unresolved items that require attention. These markers are denoted using an inline tag which has an optional notes field:
{todo}
{todo|description goes here}
The intention of this addition is to expedite the report review process, particularly for long documents or templated content containing placeholders. Unlike other tags, these markers are not rendered in the final report; they are instead diplayed in the editor UI in the following places:
{todo}
tag; clicking on the icon will display a modal which enumerates these fields. In the case of the Findings and Findings (Abridged) components, this list will denote the finding name as well as the affected field.Currently, modals which list the affected field use Writehat's internal representation of the field (e.g. a Markdown component diplays a list item indicating
text
). The "friendly name" associated with these fields is found only within the component's form. In the future this value should be read from the form, but currently the logic used to dereference fields within the model prevents such an addition.Notably, this PR does not make any changes to Writehat's models, and makes only class-level changes to components. All other additions are either client-side or contained within the Django templates.