]> git.ipfire.org Git - thirdparty/patchwork.git/commit
patch-detail: add label and button for comment addressed status
authorRaxel Gutierrez <raxel@google.com>
Fri, 20 Aug 2021 04:50:29 +0000 (04:50 +0000)
committerDaniel Axtens <dja@axtens.net>
Mon, 23 Aug 2021 12:12:05 +0000 (22:12 +1000)
commit59112f1d88f690ecc6f8d69046c78b7ec545ae74
tree87f036942fd209012e231d43527835f357724567
parent5b03443c1be174958d998e7cc9b8f028b3a7825f
patch-detail: add label and button for comment addressed status

Add new label to patch and cover comments to show the status of whether
they are addressed or not and add an adjacent button to allow users to
change the status of the comment. Only users that can edit the patch
(i.e. patch author, delegate, project maintainers) as well as comment
authors can change the status of a patch comment. For cover comments,
there are no delegates, so only maintainers and cover/cover comment
authors can edit the status of the cover comment. Before [1] and after
[2] images for reference.

Use new comment detail REST API endpoint to update the addressed field
value when "Addressed" or "Unaddressed" buttons are clicked. After a
successful request is made, the appearance of the comment status label
and buttons are toggled appropriately. For unsuccessful requests (e.g.
network errors prevents reaching the server), the error message is
populated to the page. A future improvement on this behavior is to add
a spinner to the button to provide a feedback that the request is in a
pending state until it's handled.

[1] https://imgur.com/3ZKzgjN
[2] https://imgur.com/hWZrrnM

Signed-off-by: Raxel Gutierrez <raxel@google.com>
Signed-off-by: Daniel Axtens <dja@axtens.net>
htdocs/css/style.css
htdocs/js/submission.js
patchwork/templates/patchwork/submission.html
patchwork/views/patch.py