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

Draft Lookbook documentation

Parimal Satyalbeaa49bfb627
diff --git a/lookbook/docs/patterns/14-danger-confirmation-dialog.md.erb b/lookbook/docs/patterns/14-danger-confirmation-dialog.md.erb
new file mode 100644
index 00000000000..c9a516267de
--- /dev/null
+++ b/lookbook/docs/patterns/14-danger-confirmation-dialog.md.erb
@@ -0,0 +1,76 @@
+The Danger Confirmation Dialog is used to get a second layer of confirmation before they execute a potentially breaking, non-reversible action such as deletion.
+
+The goal of the dialog is to inform the user that the action is not reversible and require one additional interaction before the user can confirm the deletion.
+
+The Danger Confirmation Dialog is a sub-component of Feedback Dialog.
+
+### Overview
+
+[EMBED CODE EXAMPLE HERE]
+
+### Anatomy
+
+The Feedback Dialog is a variation of Feedback Dialog. It consists of:
+
+- A red warning icon
+- A heading with a confirmation question such as "Permanently delete?"
+- A content slot. By default this will contain text: "This action is not reversible. Please proceed with caution."
+- A confirmation checkbox with text: "I understand that this deletion cannot be reversed"
+- Footer actions: "Cancel" and "Delete permanently" (danger red)
+
+The "Delete permanently" button is disabled until the user checks the confirmation checkbox
+
+The Content area can be replaced with other options, such as different text, a list of work packages or additional interaction.
+
+### Options
+
+Three elements can be customised:
+
+- The heading text
+- The contents of the content slot
+- The text of the confirmation checkbox
+
+If you need a variant with a different structure, please contact the UX and Front-end Primer teams.
+
+### Best practices
+
+#### Do:
+
+- Give the user relevant detail possible. For example, when bulk deleting, list the work packages that will be deleted.f
+- Use the simplest variant that will do the job, usually the default with customised text tailored to the specific context. Only choose variations or add additional elements if absolutely required.
+
+#### Don't:
+
+- Overload the content slot with too much information or additional interactions; we want the user to read and understand the consequences of this action. If the context that is needed is particularly complicated, consult the Design team for help on how to proceed.
+- Use it to provide feedback. Use the Feedback Dialog instead.
+- Add additional margins or spacing.
+- Change the danger icon
+
+### Used in
+
+The Danger Confirmation Dialog will replace the traditional Rails danger zone area in at least these places:
+
+- work_packages: bulk/destroyusers: deletion
+- repositories: destroy
+- projects: change identifier
+- placeholder_users: deletion
+- projects: destroy
+- storages: destroy
+- openid_connect: destroy
+- ldap_groups/synchronized_filters: destroy
+- ldap_groups/synchronized_groups: destroy
+- saml/providers: destroy
+
+The confirmation dialog should also be used where we are currently using browser dialogs or a non-Primer modal for high-risk operations, such as:
+
+- Bulk deleting wo- rk packages
+- Deleting a custom field
+
+### Technical notes
+
+[Add technical notes here, if any]
+
+
+### Examples
+
+[Add examples here]
\ No newline at end of file