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
- Sasha, Software Developer, https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas#sasha-software-developer
- Sam, Security Analyst, https://about.gitlab.com/handbook/marketing/product-marketing/roles-personas#sam-security-analyst
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 |
---|
Modal - Dismissed with comment | Modal - edit comment popover | Modal - editing comment |
---|---|---|
Toast - Edit comment |
---|
-
After user clicks
Saves comment
:- Modal closes
- Toast
Comment edited
fires following our toast guidelines.
-
If the user clicks
Cancel
:- They will be returned to the modal state with the original comment shown.
Deleting a comment
GIF |
---|
Modal - with comment - delete hoverstate | Modal - with comment - Deletion confirmation |
---|---|
Toast |
---|
-
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.