Consolidate simple confirmation dialogs into a common reusable pattern
- Dominant language
- JavaScript
- Stars
- 400
- Forks
- 89
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 146
Description
We have roughly 8 confirmation dialogs that all do the same thing: show a title, a warning message, and confirm/cancel buttons. Each is its own component file with its own template, despite being functionally identical.
## Dialogs in scope
* `ConfirmApplicationDeleteDialog` (`pages/application/Settings/dialogs/`)
* `ConfirmInstanceDeleteDialog` (`pages/instance/Settings/dialogs/`)
* `ConfirmDeviceDeleteDialog` (`pages/device/Settings/dialogs/`)
* `ConfirmTeamDeleteDialog` (`pages/team/dialogs/`)
* `ConfirmTeamSuspendDialog` (`pages/team/dialogs/`)
* `ConfirmTeamUserRemoveDialog` (`pages/team/dialogs/`)
* `ConfirmTeamManualBillingDialog` (`pages/team/dialogs/`)
* `ConfirmAdminGrantDialog` (`pages/admin/Users/dialogs/`)
## What should happen
* These should not need custom components at all. Most can be replaced with a direct `Dialog.show()` call passing the title and message text.
* For cases where we still want a lightweight shared component (e.g. a confirmation dialog that asks the user to type a name to confirm deletion), create a common namespace at `components/dialogs/common/` for these reusable dialog content components.
* Remove the individual confirmation dialog files once migrated.
Part of #8122.
Contributor guide
Assessment
This issue has not been assessed yet.