Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Confirmation Dialog for Critical Actions #250

Open
inF1704 opened this issue Jan 17, 2025 · 4 comments
Open

Feature Request: Confirmation Dialog for Critical Actions #250

inF1704 opened this issue Jan 17, 2025 · 4 comments

Comments

@inF1704
Copy link

inF1704 commented Jan 17, 2025

I would like to propose a new feature for ESP Dash/ESP Dash Pro regarding the implementation of a confirmation mechanism for critical actions. Current Situation
Currently, when users interact with buttons that trigger critical operations (such as data deletion), the action is executed immediately upon the first click without any safeguard mechanism. Proposed Enhancement
Implementation of a two-step confirmation process for critical actions:

Add a confirmation popup/dialog that appears after the initial button click
The actual operation should only be executed after the user confirms in this second step

Use Cases

Data deletion operations
System reset functions
Configuration changes
Any other potentially destructive or irreversible actions

Expected Behavior

User clicks the primary action button
A confirmation dialog appears with:
    Clear warning message about the action's consequences
    Confirm and Cancel options
Action only executes after explicit confirmation

This enhancement would significantly improve the user experience by preventing accidental triggering of critical operations and aligning with common UI/UX best practices for handling destructive actions.

@mathieucarbou
Copy link
Contributor

This is possible to do it if you are a dahs pro user by crafting a card which is a combination of push button, button and status.

But definitely, with the new codebase I proposed for ESP-DASH v5, with a new cleaner API, I was able to do it in 30min with only 10 lines of C++ code added in the library (and the UI component of course).

Screen.Recording.2025-01-17.at.14.42.37.mov

@inF1704
Copy link
Author

inF1704 commented Jan 17, 2025

This looks very nice. Yes I'm a pro user but still on V4.

@inF1704
Copy link
Author

inF1704 commented Jan 24, 2025

@mathieucarbou can you help me providing a basic example for V4 pro? I tried several approaches but I´m not able to cast a button with status

@mathieucarbou
Copy link
Contributor

mathieucarbou commented Jan 24, 2025

@mathieucarbou can you help me providing a basic example for V4 pro? I tried several approaches but I´m not able to cast a button with status

you need to understand how the UI works and is made in order to do that... It's just about creating a new ui card and copying content from other existing ones.

then of course a little cpp update to support a new type of card.

Ask @ayushsharma82 through his support email for a feature request ;-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants