openproject
openproject copied to clipboard
[#70480] Remove unused `ConfirmDialogService` form augmentation, `ConfirmationDialogHelper`
Ticket
https://community.openproject.org/wp/70480
This pull request removes the unused ConfirmationDialogHelper Ruby module and simplifies the Angular ConfirmDialogService by eliminating legacy Rails form augmentation logic.
Code cleanup and modernization:
- Removed the entire
ConfirmationDialogHelperRuby module, which was previously used to render confirmation dialogs for Rails forms but is now obsolete. - In
ConfirmDialogService(confirm-dialog.service.ts), removed the logic for listening to Rails form submissions and augmenting them with confirmation dialogs, as this integration is no longer needed. [1] [2] - Switched to using Angular's
injectfunction for dependency injection inConfirmDialogService, further simplifying the service. - Improved error handling in the
confirmmethod by rejecting with anErrorobject when the dialog is cancelled, instead of a bare rejection.
Screenshots
There should be no visual changes.
What approach did you choose and why?
Merge checklist
- [ ] Added/updated tests
- [ ] Added/updated documentation in Lookbook (patterns, previews, etc)
- [ ] Tested major browsers (Chrome, Firefox, Edge, ...)
[!CAUTION] The provided work package version does not match the core version
Details:
- Work package URL: https://community.openproject.org/wp/70480
- Work package version: not set
- Core version: 17.1.0
Please make sure that:
- The work package version OR your pull request target branch is correct