openproject icon indicating copy to clipboard operation
openproject copied to clipboard

[#70480] Remove unused `ConfirmDialogService` form augmentation, `ConfirmationDialogHelper`

Open myabc opened this issue 2 months ago • 1 comments

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 ConfirmationDialogHelper Ruby 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 inject function for dependency injection in ConfirmDialogService, further simplifying the service.
  • Improved error handling in the confirm method by rejecting with an Error object 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, ...)

myabc avatar Jan 12 '26 21:01 myabc

[!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

github-actions[bot] avatar Jan 12 '26 21:01 github-actions[bot]