Skip to content

Use danger variant for project delete modal

Tom Quirk requested to merge 344157-no-repo-delete-modal-ui-polish into master

What does this MR do and why?

For the "delete projects" modal in app/views/projects/no_repo.html.haml:

  • Uses danger variant for modal button
  • Updates modal button text

#344157 (closed) (for &6854 (closed)).

Two follow-up issues have been created for this template:

Screenshots or screen recordings

Before After
Screen_Shot_2022-02-09_at_4.28.42_pm Screen_Shot_2022-02-09_at_4.17.01_pm

How to set up and validate locally

  1. Enable feature flag Feature.enable(:bootstrap_confirmation_modals)
  2. Apply this diff:
diff --git a/app/controllers/projects_controller.rb b/app/controllers/projects_controller.rb
index d2e3c7d0272..f486973a18d 100644
--- a/app/controllers/projects_controller.rb
+++ b/app/controllers/projects_controller.rb
@@ -349,6 +349,7 @@ def unfoldered_environment_names
   #
   # pages list order: repository readme, wiki home, issues list, customize workflow
   def render_landing_page
+    return render 'projects/no_repo'
     if can?(current_user, :download_code, @project)
       return render 'projects/no_repo' unless @project.repository_exists?
 
  1. Go to any project. The "no repo" template should render.
  2. Click "delete project". Observe modal.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #344157 (closed)

Edited by Tom Quirk

Merge request reports

Loading