covidwatchorg / portal

Covid Watch Portal web app for diagnosis verification
Apache License 2.0
8 stars 3 forks source link

Custom Safari desktop date picker #494

Closed jcolla-holla closed 4 years ago

jcolla-holla commented 4 years ago

closes #491 #410

Safari desktop doesn't support a calendar picker unfortunately (lame).

More robust solution is to populate a calendar picker no matter the browser, which is done here using ReactDatePicker. I tested the whole workflow on Safari and all works as expected (same as Chrome).

Note that Safari mobile has a much better date picker UX. I was concerned about this as it seems many users will be on mobile and Safari is the default browser for iPhones. No need to adjust for this, thankfully (see screenshot below from my own iPhone on Safari):

IMG_A7E7458123B1-1

colbymorrison commented 4 years ago

I think replacing the <input DatePicker with a package such as react-datepicker is the right way to go. For us, this resolves the Safari issue, and will likely resolve #435, and possibly #489.

colbymorrison commented 4 years ago

I think this closes #494 as well. The picker forces a valid date to be set.

jcolla-holla commented 4 years ago

Requires some frontend tests to be updated before merging.

Additionally, we should make sure that this doesn't undo this recently-merged fix.

@ibeckermayer frontend tests refactored and passing (Colby and I reviewed these together). Re: the other branch, I believe this should be ok to merge as it will just overwrite what's there -- no merge conflict issues are highlighted by Github.

Once you approve feel free to merge and we can have the QA folks try to break it in staging.

ibeckermayer commented 4 years ago

@ibeckermayer frontend tests refactored and passing (Colby and I reviewed these together). Re: the other branch, I believe this should be ok to merge as it will just overwrite what's there -- no merge conflict issues are highlighted by Github.

I meant we should make sure it doesn't undo the functionality of the fix. I just checked and everything is running smoothly.