a-mabe / OpenHIIT

:weight_lifting: :medal_sports: Open-source, cross platform HIIT and Tabata interval timer. Pull requests are appreciated!
MIT License
36 stars 9 forks source link

[Feature/Improvement] Confirmation on workout deletion #104

Closed a-mabe closed 7 months ago

a-mabe commented 7 months ago

Purpose: As a user, I would like to be asked for confirmation before a workout is deleted.

More details: Some more details on the feature/improvement

Currently, it is easy to accidentally delete a workout as workouts are immediately deleted upon tapping the delete icon.

Implement something similar to the alert dialog shown here: https://medium.com/multiverse-software/alert-dialog-and-confirmation-dialog-in-flutter-8d8c160f4095

Acceptance Criteria:

gantanikhilraj commented 7 months ago

Hi @a-mabe ,I would like to work on this, Assign this to me.

a-mabe commented 7 months ago

Hello @gantanikhilraj, thank you for contributing to the project, I will assign the issue to you

gantanikhilraj commented 7 months ago

@a-mabe Can you provide some more information about the issue ?

a-mabe commented 7 months ago

Sure @gantanikhilraj, there is a delete button that is accessible after tapping on a timer, shown in the screenshot below:

Screenshot 2023-11-25 at 2 37 30 PM

When the user taps this button, the timer is immediately deleted. This makes it easily to accidentally tap the icon and delete the timer without intending to.

Instead of immediately deleting the timer, there should be a pop-up that asks for confirmation to delete the timer. This way, on an accidental tap of the delete button, the user is able to undo their action and keep the timer.

The pop-up can be something like the AlertDialogue shown in this blog post: https://medium.com/multiverse-software/alert-dialog-and-confirmation-dialog-in-flutter-8d8c160f4095

Something like:

Are you sure you would like to delete <timer name>?

Cancel        Delete
a-mabe commented 7 months ago

Thank you for the contribution @gantanikhilraj! Closed in #107