Deletion confirmation modal differs between groups and projects
Problem
When deleting a group or project, it is necessary to delete the group or project in question twice to ensure it is completely deleted. This is because deletion protection is enabled by default for all groups and projects.
When using the deletion action, the user is shown a confirmation modal, which requires to type in the group path to actually start the deletion process. This is a safeguarding measure.
The messaging in this modal is quite different between groups and projects.
Current states
Projects via project settings
Groups via group settings
Projects via Admin Area project overview
Groups via Admin Area group overview
Organization via Organization project overview
Organization via Organization group overview
Proposal
For Settings > General: Update text for groups and project screens and ensure stats are always shown also for groups (just like for projects).
-
Align the messaging between groups and projects. -
Ensure the colour in the messages is consistent between groups and projects. -
Ensure stats are always shown also for groups (just like for projects). This means also when the group is empty and has zero counts for the listed items, and also during the first deletion step. This is currently only implemented during the second deletion step and when the group is not empty.
Update deletion modal as follows:
Groups
Important note
The text This action will place this group, including all its resources, in a pending deletion state for 7 days, and delete it permanently on YYYY-MM-DD.
will vary based on the state to align with #397033 (closed).
- Groups - free deletion:
This action will permanently delete this group, including its subgroups and projects.
- Groups - paid deletion first step:
This action will place this group, including its subgroups and projects, in a pending deletion state for 7 days, and delete it permanently on **YYYY-MM-DD**.
- Groups - paid deletion second step:
This group is scheduled for deletion on **YYYY-MM-DD**. This action will permanently delete this group, including its subgroups and projects, **immediately**. This action cannot be undone.
Projects
Important note
The text This action will place this project, including all its resources, in a pending deletion state for 7 days, and delete it permanently on YYYY-MM-DD.
will vary based on the state to align with #397033 (closed).
- Projects - free deletion:
This action will permanently delete this project, including all its resources.
- Projects - paid deletion first step:
This action will place this project, including all its resources, in a pending deletion state for 7 days, and delete it permanently on **YYYY-MM-DD**.
- Projects - paid deletion second step:
This project is scheduled for deletion on **YYYY-MM-DD**. This action will permanently delete this project, including all its resources, **immediately**. This action cannot be undone.
Implementation guide
- Update app/helpers/groups_helper.rb#L122 to include zero counts
- Update message in app/helpers/groups_helper.rb#L105
- Update message in ee/app/helpers/ee/groups_helper.rb#L33
- Update copy and styling in app/assets/javascripts/projects/components/shared/delete_modal.vue
- In app/assets/javascripts/vue_shared/components/confirm_danger/confirm_danger_modal.vue
- Update
CONFIRM_DANGER_PHRASE_TEXT
to sayEnter the following to confirm:
and make that text bold. Note that this was accidentally changed in !146938 (merged) so there is currently a bug where it saysTo proceed with the transfer, type
when deleting a group. This bug is tracked in #397039 but it probably makes sense to fix as part of this issue. - Change the
size
prop ongl-modal
tomd
- Update