-
-
Notifications
You must be signed in to change notification settings - Fork 62
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
Resolving #32: implement a warning modal on deleting a file/folder while s… #60
Conversation
…canning add keypress handler for warning_modal update apps ui state of warning modal implement autoclose functionality for warningmodal
Hey @mhdmhsni, good job finding how to make this disappear with the Event mechanism. That's exactly the right way - sorry I wasn't around to make this easier. :) I tested this branch and found a bug. While loading, if I try to delete a file, then dismiss the message by pressing ENTER, then try to delete the same file again quickly, everything gets stuck (might have to do this a few times fast). |
Hey @imsnif. Oops! I didn't see that bug coming. What comes to my mind about this situation is that maybe this ‘WarningTimeout‘ event should be cancellable. I mean if we close the warning modal manually, the timeout event keeps going (but it has to be cancelled automatically). |
Sounds good. So do you want to remove the cancellation timeout and make it only dismissable through the user pressing any key? |
yes. i think regarding to the current situation this is the best approach. but maybe we can investigate about the auto close problem in another issue or something. |
Hey @mhdmhsni - changes look good. I'm going to take a closer look tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great, thanks for the work and the changes!
I changed the deletion key to DELETE, since we already changed that in main. :)
Sorry, i forgot to change it myself after merging main branch into this one. thanks a lot. |
Hi @imsnif, this commit resolves #32.
WarningBox
to modals module.WarningTimeout
variant to yourEvent
enum. this event waits for 5 seconds then resets the ui state usingInstruction::ResetUiMode
.please let me know if anything needs to change.