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

Delete and overwrite operations should ask for a confirmation #348

Open
Cosebdd opened this issue May 31, 2024 · 3 comments
Open

Delete and overwrite operations should ask for a confirmation #348

Cosebdd opened this issue May 31, 2024 · 3 comments

Comments

@Cosebdd
Copy link
Contributor

Cosebdd commented May 31, 2024

Describe the bug
When the user presses Delete or Overwrite in the Edit mode (I'm not sure if there are other destructive operations), these operations fire immediately without any confirmation prompt.

To Reproduce
Steps to reproduce the behavior:

  1. Open an image
  2. Press Delete

Or

  1. Open an image
  2. Press E
  3. Press Overwrite

Expected behavior
I expect that I will be prompted with a dialog asking for confirmation. This would almost eliminate the possibility of removing/overwriting something by mistake, and if someone doesn't like it there could be a "never ask me again" checkbox.

Desktop (please complete the following information):

  • OS: Windows 10
  • Version 0.8.22
@woelper
Copy link
Owner

woelper commented May 31, 2024

This is of course a good suggestion. The UI library I am using makes modal dialogs hard - this is the main reason this is not done. Maybe I can come up with a smart way to do it.

@woelper
Copy link
Owner

woelper commented May 31, 2024

This seems to be an option:

https://lib.rs/crates/egui-modal

@Stoppedpuma
Copy link
Collaborator

Depending on how hard this would be to implement, holding to confirm dangerous actions such as overwriting or deleting is a pretty good way of handling accidental actions. Below is a design I've made, the darker red at the left is showing the progress, when the progress bar completes then the action is fulfilled, 1500ms should be a good default time:

1718246940

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

3 participants