CCExtractor / taskwarrior-flutter

This is the repo of mobile app of taskwarrior
https://play.google.com/store/apps/details?id=com.ccextractor.taskwarriorflutter
GNU General Public License v3.0
103 stars 86 forks source link

Setting alert time clock in the past. #312

Closed Sabra-xD closed 4 months ago

Sabra-xD commented 4 months ago

Describe your issue

Right now when the user sets the time to be alerted for their task through the clock. You can set the time to be in the past, as in if it is currently 2PM. The alert time can be set to 1PM.

Steps to reproduce

None

What was the expected result?

To only be able to set the alert time in the future.

Put here any screenshots or videos (optional)

https://github.com/CCExtractor/taskwarrior-flutter/assets/52329758/ac27af8a-94d9-4595-8f7e-6ea1ec842e3d

How can we contact you (optional)

None

Would you like to work on this issue?

Yes

By submitting this issue, I have confirmed that:

cfsmp3 commented 4 months ago

I'm not 100% sure this is a bug; obviously you won't be able to do something by the due date if it's in the past, but at the same time I might have forgotten to add a task in the past and I want to add it now while maintaining the original due date, so I know how late I am.

I think I'd leave it at is. Or maybe allow it but display a dialog about it in case the user is just making a mistake.

Sabra-xD commented 4 months ago

Alright. Anyway, the due time is set to Due: - in this case which needs to be adjusted. And I think the design for over due tasks should be unique to catch the user's attention and sets it out from the current scheduled tasks.

Pavel401 commented 4 months ago

I think we should display a snack bar message if the user sets a past time instead of considering it as a bug, as mentioned by @cfsmp3.

Sabra-xD commented 4 months ago

I found a snackBar was already being used but it was not in-foucs since it used ScaffoldMessanger and we were working on the AlertDialog, so it displayed the snackBar message in the Scaffold. So, I deleted it and added FlushBar to be able to display the message in the current context.

Also I high lighted the time, if it was now or in the past, set it to red just to get user's attention. You can check out the PR. https://github.com/CCExtractor/taskwarrior-flutter/pull/314

Pavel401 commented 4 months ago

Fixed in https://github.com/CCExtractor/taskwarrior-flutter/pull/315