(Complete) deletion confirmation message 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.
After the second deletion step, a message is shown to the user that:
However, in both cases the result is a complete deletion. I think we can be more consistent here and align on the colour and messaging as well.
Proposal
-
As per !147479 (comment 1844543008), where we updated this behavior in organizations, we should replace the "immediate deletion" alerts in both groups and projects with toast messages. -
We'll also update the messaging for immediate deletion of projects to what we're using in organizations: Project 'group_name / project_name' is being deleted.
-
Group messaging would follow the same pattern, but drop the project name from the message. -
Note that the alerts also need to be replaced with toast messages in admin, as well, as the behaviors in admin currently match the existing group and project alerts.
Implementation plan
- Update the project deletion message text and from flash to toast in the
projects_controller.rb
flash[:toast] = _("Project '%{project_name}' is being deleted.") % { project_name: @project.full_name }
- Update the admin project deletion message text and from flash to toast in the
admin/projects_controller.rb
flash[:toast] = _("Project '%{project_name}' is being deleted.") % { project_name: @project.full_name }
- Abstract the alert message from the redirect as well as update wording and use toast in the
groups_controller.rb
. Also ensure redirect and toast work as intended.
flash[:toast] = _("Group '%{group_name}' is being deleted.") % { group_name: @group.full_name }
redirect_to root_path, status: :found
- Abstract the alert message from the redirect as well as update wording and use toast in the
admin/groups_controller.rb
. Also ensure redirect and toast work as intended.
flash[:toast] = _("Group '%{group_name}' is being deleted.") % { group_name: @group.full_name }
redirect_to admin_groups_path, status: :found
Edited by Christina Lohr