Add 'Reply' button to comments on diff screen
The last comment shown on the diff page now has a Reply button,
which will pop up the comment editor if pressed.
This change also introduces a new parent_uuid column in the
patch_comments table that maintains the ordering of comments for
each line. The first comment on any given line always has a null
value as parent_uuid.
Potential known issues with this implementation:
- When the user presses Reply and the comment editor pops up,
the Reply button remains visible. Pressing it again activates
the existing draft editor, but we might consider disabling it
(and re-enabling it if the user discards their draft comment)
- Pressing Reply, saving a draft, then returning to the same page
and discarding the draft does not restore the Reply button.
Leaving and returning to the file does however create it again.
- Two users can potentially press Reply on the same comment at
the same time, but this has no significant effect on this
implementation. These comments will end up with the same
parent_uuid but they will correctly be displayed in the UI,
sorted by their date of publication, which is the same as the
prior behavior.
- Reply does not quote the parent text, in either the comment
editor that opens or in the generated email when the comments
are published.
11 files changed