open-formulieren / open-forms

Smart and dynamic forms
https://open-forms.readthedocs.io
Other
37 stars 26 forks source link

Feature/4798 custom confirmation modal #4814

Closed robinmolen closed 3 days ago

robinmolen commented 1 week ago

Closes #4798

Changes

Replacing all window.confirm(...) confirmations with a new custom React hook (useConfirm). This new hook is using our Modal component to display the confirmation message. These changes happend to keep the application UI uniform.

Checklist

Check off the items that are completed or not relevant.

codecov[bot] commented 1 week ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 96.57%. Comparing base (51f9713) to head (022d950). Report is 12 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #4814 +/- ## ======================================= Coverage 96.57% 96.57% ======================================= Files 748 748 Lines 25448 25448 Branches 3369 3369 ======================================= Hits 24576 24576 Misses 608 608 Partials 264 264 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

stevenbal commented 1 week ago

@robinmolen can you fix the merge conflicts? Also not sure if the failing tests are related to the code changes?

robinmolen commented 1 week ago

There is a new window.confirm added in a recent commit, in the /form_design/form-creation-form.js. I'll replace that one now with the new useConfirm

robinmolen commented 1 week ago

I've replaced the .../form_design/form-creation-form.js window.confirm with the useConfirm. With that, all window.confirm's have been replaced :)