the-via / app

GNU General Public License v3.0
917 stars 209 forks source link

Addition of confirmation dialog for button events #212

Open Cipulot opened 11 months ago

Cipulot commented 11 months ago

This commit aims to provide a confirmation dialog in the browser when clicking on a button in Custom UI This helps in cases the button is bound to some actions at the keyboard level that might cause data losses or resets.

The addition of the dialog box prevents the execution of the functions unless a confirmation is given. The action name shown in the dialog text is dynamic and takes the name associated with the button.

Here's an example:

Screenshot 2023-12-06 at 1 19 21 AM
Cipulot commented 4 months ago

Implemented a toggle that enables this feature or leaves it disabled:

Screenshot 2024-07-17 at 1 23 45 PM

The default value has been set to TRUE.

Cipulot commented 4 months ago

This PR is on hold. It was deemed more in line with the UI/UX of the app that having a dialog that follows the VIA app UI elements is more in line with the experience, instead of using a browser-based UI. As a reminder, the current dialog is provided by the browser tools and not by a dedicated render from the app.

The target is to have a dialog similar to the one that is presented when enabling the design tab for the first time.