Skip to content

Allow dismissal reasons to be edited and deleted

Problem to solve

Currently, we can add reasons (comments) to dismissals. However, we cannot edit or delete them. You can undo the dismissal then re-dismiss it as a workaround, but it's not ideal.

This was planned in 11.11 but was deemed out of scope for the initial MVC. Please see the original issue (#10364 (closed)) for more information, but I've put the relevant information for this below:

Intended users

Proposal

The Backend work for this has already been started in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/11963 so this issue will only cover the frontend work required to make this happen.

We need to create the buttons in the UI, create the necessary Vuex actions and tie them together.

Note: the Toast implementation will be handled in #11720 (closed)

Design

Editing a comment

GIF
Dismissal_comment_-_editing_comment
Modal - Dismissed with comment Modal - edit comment popover Modal - editing comment
comment-added editing-comment-popover editing-comment-active
Toast - Edit comment
Screen_Shot_2019-04-13_at_2.09.00_PM
  • After user clicks Saves comment:

  • If the user clicks Cancel:

    • They will be returned to the modal state with the original comment shown.

Deleting a comment

GIF
Dismissal_comment_-_deleting_comment
Modal - with comment - delete hoverstate Modal - with comment - Deletion confirmation
delete-popover delete-comment-confirm
Toast
Screen_Shot_2019-04-13_at_2.21.10_PM
  • After user clicks Saves comment:

    • Modal closes
    • Toast Comment deleted fires following our toast guidelines.
    • Modal state returns to Dismissed with no comment.
  • If the user clicks Cancel:

    • They will be returned to the modal state with the original comment shown.

Permissions and Security

Again, see #10364 (closed) for more information, but anyone with the permissions to dismiss a vulnerability should be able to edit it or delete it. Regardless of who wrote the initial dismissal reason.