"Remove Project" should also ask for the namespace during confirmation
### Problem to solve Being a maintainer/owner of multiple projects with the same name in different namespaces/groups (typically forks), it can be scary trying to delete one of those projects - am I absolutely sure I'm in the correct namespace? Yes, the namespace is listed in the dialog, but personally I don't really read that first line or two anyway... I just start typing the project name. ### Further details * **Why?:** Dialogs are so prevalent in everything these days that most people just ignore them. GitLab is actually good at this and doesn't overuse modal windows. Forcing a user to also type the namespace provides a double-check that the correct project is being deleted. * **Goal:** Prevent deletion of the wrong project * **Impact:** Minimal. Some users might be slightly annoyed that they have to type a few more characters to delete a project * **Benefit:** Peace of mind. Fewer sad people. * **Guesstimated Effort:** Minimal. I looked though the source code and I *think* it's just a small update to `app/views/projects/edit.html.haml`. See the patch below. ### Solution The namespace/group should be required during the delete project confirmation. |Soft delete|Permanently delete| |---|---| |![Screen_Shot_2020-08-03_at_4.10.35_PM](/uploads/c87a27c06330bc043493d5b3cebd6f70/Screen_Shot_2020-08-03_at_4.10.35_PM.png)|![Screen_Shot_2020-08-03_at_4.10.46_PM](/uploads/53a42d5b976b0d3851aa00ddaed43c9c/Screen_Shot_2020-08-03_at_4.10.46_PM.png)| ##### Proposed Dialog: Note that the **Yes, delete project** button is disabled until the `exact string` has been entered. ##### The Patch N.B.: I don't *actually* know if `full_name` is what we want. Nor do I know if anything else needs to be changed (unit tests, perhaps?). I don't know Ruby nor (Mark) HAML, so this is about as much help as I'll be able to be. :crying\_cat\_face: ```patch From eef8eab1da8ccb54b8d6a53d94acc1cb7d431ef9 Mon Sep 17 00:00:00 2001 From: Douglas Thor <doug.thor@gmail.com> Date: Thu, 27 Sep 2018 11:57:09 -0700 Subject: [PATCH] Use @project.full_name when prompting users for project deletion. --- app/views/projects/edit.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index bfd165d..019335f 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -222,4 +222,4 @@ Saving project. %p Please wait a moment, this page will automatically refresh when ready. -= render 'shared/confirm_modal', phrase: @project.path += render 'shared/confirm_modal', phrase: @project.full_name -- 2.7.4 ``` ### What does success look like, and how can we measure that? No one complains that they deleted the wrong project :smile: ### Links / references None.
issue