Skip to content
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

Submit location form: bug + UX snag with observed on + fruiting status #621

Open
wbazant opened this issue Nov 29, 2024 · 3 comments · May be fixed by #651
Open

Submit location form: bug + UX snag with observed on + fruiting status #621

wbazant opened this issue Nov 29, 2024 · 3 comments · May be fixed by #651
Labels
bug Unexpected problems or unintended behavior

Comments

@wbazant
Copy link
Collaborator

wbazant commented Nov 29, 2024

We have a validation rule to expect observation date whenever fruiting status is populated. This produces friction: a user chooses "ripe fruit" or so, tries to submit, and it doesn't work. The user might then notice observed on went red, and fill it out, but the button is still disabled (except actually, it's possible to submit).

Lots of wrong here, and some options I see are:

  • make the "observed on" always required, if not unconfirmed
  • default the "observed on" to the review's date once fruiting status is set
  • remove the validation rule entirely, and add the default value when interpreting the data
  • add an error message just under "Submit" explaining the validation rule we have, and fix the bug with the button (still some friction but reduced as far as we can)

@ezwelty what do you think about this one? Do you e.g. know how often the review date matches observation date?

@wbazant wbazant added the bug Unexpected problems or unintended behavior label Nov 29, 2024
@ezwelty
Copy link
Collaborator

ezwelty commented Nov 29, 2024

@wbazant Ah yes, I noticed that the date picker needs to lose focus before the form validation recognizes the form as valid.

default the "observed on" to the review's date once fruiting status is set
remove the validation rule entirely, and add the default value when interpreting the data

According to the database, about 20% of observations have an observed date different from the created date. So not the most common use case, but an important distinction for when people post locations or reviews (e.g. based on a gallery of accumulated photos), where assuming today would result in a very wrong phenological observation. This is valuable information for future seasonality filters, so I hesitate to collect a bunch of ambiguously dated phenology observations ("maybe it was observed on the date it was posted, maybe not").

Perhaps we could add a little button to the right of the date picker that covers the most common case: "today". If we wanted to get fancy, we could extract CaptureTime from the EXIF of uploaded photos, and if different from "today", add that to the "quick select" options. Depending on the source of the image, capture time in EXIF may be absent or very wrong. A special case is if the photo is directly from device camera, which would make "today" very likely, but not sure if that's something we want to attempt to distinguish.

@wbazant
Copy link
Collaborator Author

wbazant commented Nov 30, 2024

Sure, it makes sense as conditionally required then! One more idea I have for how to achieve it is to disable Fruiting Status until Observation Date is populated, with some kind of note about what is conditionally required - then there's no way to fill it out wrong.

@wbazant
Copy link
Collaborator Author

wbazant commented Dec 26, 2024

the date picker needs to lose focus before the form validation recognizes the form as valid

I've learned we've intentionally set validateOnChange=false in Formik, maybe for performance reasons in the past. Proposed resolution to this issue is to enable validateOnChange - then after setting fruiting status, the observation field immediately goes red, and although the rule is not explained anywhere it might be enough to let users observe it.

If we see users struggle, we can do more on this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Unexpected problems or unintended behavior
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants