rokwire / illinois-app

Source code repository of "Illinois" App - the official mobile app of the University of Illinois.
https://app.illinois.edu/
Apache License 2.0
23 stars 20 forks source link

[BUG] Event End Date Can't be Deleted #4233

Open kpecknold opened 2 months ago

kpecknold commented 2 months ago

End dates are not required for events, but if you accidentally add one, you can't delete it. It then suddenly becomes required. You should be able to delete this non-required field. This is an issue in both the app and the web admin. Related to admin Git issue: https://github.com/rokwire/illinois_admin/issues/658

mihail-varbanov commented 2 months ago

Yes, currently there is no way to clear the end date or time once entered.

The end date or time becomes required once you enter any part of it, i.e. if the user enters the end date he or she should also enter the end time as well, and vice versa. I consider that this might look a bit confusing but this is what I come up with for the case when only one part of the end date and time is entered.

Ideally I would resolve this in the Date and Time picker dialogs (that are standard built in Flutter components) by providing an option for selecting null value, or simply adding a Clear button around OK and Cancel, but unfortunately such options are not supported.

The other way that I see is to add a "Clear" button that would clear the end date and time once entered. The problem is that the event date and time controls are very dense and there is almost no room for such a button. I tried this layout that I did not like much:

Screenshot 2024-07-12 at 12 30 41 PM

So, I need a design for adding the ability to clear the end date and time. I am also open to suggestions for better logic to indicate that when only one component of the end datetime is entered, the required actions are either to also enter the other component, or to clear both of them (somehow). I guess I should address these questions to @vburgett.

vburgett commented 2 months ago

How does the attached work? @mihail-varbanov Screenshot 2024-07-12 at 9 31 42 AM

mihail-varbanov commented 2 months ago

@vburgett, looks good to me. Implemented in version 6.0.27.

vburgett commented 2 months ago

This update worked for me in 6.0.27. (@kpecknold you won't see the clear option until you enter an end date or time.)