Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Change DangerConfirmationDialog usages to DangerDialog

Alexander Brandon Coles5a93ced1fe70
diff --git a/app/components/admin/custom_fields/hierarchy/delete_item_dialog_component.html.erb b/app/components/admin/custom_fields/hierarchy/delete_item_dialog_component.html.erb
index 06663bac5b2..1fcb44cdad9 100644
--- a/app/components/admin/custom_fields/hierarchy/delete_item_dialog_component.html.erb
+++ b/app/components/admin/custom_fields/hierarchy/delete_item_dialog_component.html.erb
@@ -28,7 +28,7 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<%=
- render(Primer::OpenProject::DangerConfirmationDialog.new(
+ render(Primer::OpenProject::DangerDialog.new(
form_arguments:,
size: :large,
test_selector: TEST_SELECTOR
diff --git a/lookbook/docs/patterns/14-danger-confirmation-dialog.md.erb b/lookbook/docs/patterns/14-danger-dialog.md.erb
similarity index 83%
rename from lookbook/docs/patterns/14-danger-confirmation-dialog.md.erb
rename to lookbook/docs/patterns/14-danger-dialog.md.erb
index cacf3e51203..bae3e7beb81 100644
--- a/lookbook/docs/patterns/14-danger-confirmation-dialog.md.erb
+++ b/lookbook/docs/patterns/14-danger-dialog.md.erb
@@ -1,12 +1,12 @@
-The DangerConfirmationDialog is used to get a second layer of confirmation from the user before they execute a potentially breaking, non-reversible action such as deletion.
+The DangerDialog is used to get a second layer of confirmation from the user before they execute a potentially breaking, non-reversible action such as deletion.
The dial will inform the user that the action is not reversible and require one additional interaction before the user can confirm the deletion.
-The DangerConfirmationDialog is a sub-component of FeedbackDialog.
+The DangerDialog is a sub-component of FeedbackDialog.
### Overview
-<%= embed Patterns::DangerConfirmationDialogPreview, :default, panels: %i[source] %>
+<%= embed Patterns::DangerDialogPreview, :default, panels: %i[source] %>
### Anatomy
@@ -50,7 +50,7 @@ If you need a variant with a different structure, please contact the UX and Fron
### Used in
-The DangerConfirmationDialog will replace the traditional Rails danger zone area in at least these places:
+The DangerDialog will replace the traditional Rails danger zone area in at least these places:
- work_packages: bulk/destroyusers: deletion
- repositories: destroy
@@ -71,5 +71,5 @@ The confirmation dialog should also be used where we are currently using browser
### Technical notes
* In order to actually delete some object, you will most likely need a form which the "delete" button then submits. We have two ways to achieve that:
- * ([`With form_arguments`](../../inspect/primer/open_project/danger_confirmation_dialog/with_form))
- * ([`With a form builder`](../../inspect/primer/open_project/danger_confirmation_dialog/with_form_builder_form))
+ * ([`With form_arguments`](../../inspect/primer/open_project/danger_dialog/with_form))
+ * ([`With a form builder`](../../inspect/primer/open_project/danger_dialog/with_form_builder_form))
diff --git a/lookbook/previews/patterns/danger_confirmation_dialog_preview.rb b/lookbook/previews/patterns/danger_dialog_preview.rb
similarity index 70%
rename from lookbook/previews/patterns/danger_confirmation_dialog_preview.rb
rename to lookbook/previews/patterns/danger_dialog_preview.rb
index aa5aacf7a5c..872d6aebd49 100644
--- a/lookbook/previews/patterns/danger_confirmation_dialog_preview.rb
+++ b/lookbook/previews/patterns/danger_dialog_preview.rb
@@ -2,7 +2,7 @@
module Patterns
# @hidden
- class DangerConfirmationDialogPreview < ViewComponent::Preview
+ class DangerDialogPreview < ViewComponent::Preview
# @display min_height 400px
def default
render_with_template
diff --git a/lookbook/previews/patterns/danger_confirmation_dialog_preview/default.html.erb b/lookbook/previews/patterns/danger_dialog_preview/default.html.erb
similarity index 80%
rename from lookbook/previews/patterns/danger_confirmation_dialog_preview/default.html.erb
rename to lookbook/previews/patterns/danger_dialog_preview/default.html.erb
index a5fec152f04..ac8a3c7f14d 100644
--- a/lookbook/previews/patterns/danger_confirmation_dialog_preview/default.html.erb
+++ b/lookbook/previews/patterns/danger_dialog_preview/default.html.erb
@@ -1,5 +1,5 @@
<%=
- render(Primer::OpenProject::DangerConfirmationDialog.new(open: true)) do |dialog|
+ render(Primer::OpenProject::DangerDialog.new(open: true)) do |dialog|
dialog.with_confirmation_message do |message|
message.with_heading(tag: :h2) { "Are you sure?" }
message.with_description_content( "You are going to delete the whole project and all it's WorkPackages!" )
diff --git a/modules/meeting/app/components/meetings/delete_dialog_component.html.erb b/modules/meeting/app/components/meetings/delete_dialog_component.html.erb
index 17de1f160a1..c7ba57188ec 100644
--- a/modules/meeting/app/components/meetings/delete_dialog_component.html.erb
+++ b/modules/meeting/app/components/meetings/delete_dialog_component.html.erb
@@ -28,7 +28,7 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<%=
- render(Primer::OpenProject::DangerConfirmationDialog.new(
+ render(Primer::OpenProject::DangerDialog.new(
id:,
title:,
form_arguments: {
diff --git a/modules/meeting/app/components/recurring_meetings/delete_dialog_component.html.erb b/modules/meeting/app/components/recurring_meetings/delete_dialog_component.html.erb
index 3533491c400..594868c95f4 100644
--- a/modules/meeting/app/components/recurring_meetings/delete_dialog_component.html.erb
+++ b/modules/meeting/app/components/recurring_meetings/delete_dialog_component.html.erb
@@ -28,7 +28,7 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<%=
- render(Primer::OpenProject::DangerConfirmationDialog.new(
+ render(Primer::OpenProject::DangerDialog.new(
id:,
title:,
form_arguments: {
diff --git a/modules/meeting/app/components/recurring_meetings/delete_scheduled_dialog_component.html.erb b/modules/meeting/app/components/recurring_meetings/delete_scheduled_dialog_component.html.erb
index 321a4d087f9..507bf168a88 100644
--- a/modules/meeting/app/components/recurring_meetings/delete_scheduled_dialog_component.html.erb
+++ b/modules/meeting/app/components/recurring_meetings/delete_scheduled_dialog_component.html.erb
@@ -28,7 +28,7 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<%=
- render(Primer::OpenProject::DangerConfirmationDialog.new(
+ render(Primer::OpenProject::DangerDialog.new(
id:,
title:,
confirm_button_text:,
diff --git a/modules/meeting/app/components/recurring_meetings/end_series_dialog_component.html.erb b/modules/meeting/app/components/recurring_meetings/end_series_dialog_component.html.erb
index 2dcb8feeb77..eb74fa1a283 100644
--- a/modules/meeting/app/components/recurring_meetings/end_series_dialog_component.html.erb
+++ b/modules/meeting/app/components/recurring_meetings/end_series_dialog_component.html.erb
@@ -28,7 +28,7 @@ See COPYRIGHT and LICENSE files for more details.
++#%>
<%=
- render(Primer::OpenProject::DangerConfirmationDialog.new(
+ render(Primer::OpenProject::DangerDialog.new(
id: "recurring-meetings-end-series-dialog",
confirm_button_text: I18n.t(:label_recurring_meeting_series_end_now),
title: I18n.t("recurring_meeting.end_series_dialog.title"),