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

Unnecessary 'invalidWhenUntouched' props in forms #571

Closed
wbazant opened this issue Nov 7, 2024 · 0 comments · Fixed by #572
Closed

Unnecessary 'invalidWhenUntouched' props in forms #571

wbazant opened this issue Nov 7, 2024 · 0 comments · Fixed by #572

Comments

@wbazant
Copy link
Collaborator

wbazant commented Nov 7, 2024

Ethan points out in #557 (comment)
that they produce a surprise and a negative reaction: "how have I done something wrong, I've not done anything yet". Let's review them (and probably remove them all).

Location form: seasonality "from" -> "to", doesn't seem to do anything. Remove

Review form: date box: necessary - it makes the date box go red if 'Fruiting status' is set (I accidentally merged its removal in c360c8f)

AccountPage: current password - seems necessary for the current implementation, and I was remembering it to always show up in red because of browser autocompleting the current password into the new password field. It turns out we can turn it off: https://developer.mozilla.org/en-US/docs/Web/Security/Practical_implementation_guides/Turning_off_form_autocompletion

ReportModal: set on problem type - it has the effect of making problem type red if the user started to fill out the description first, but the field is always required, so it's not needed

Proposed resolution:

  • remove 'from' and 'to' invalidWhenUntouched, it doesn't seem to do anything - maybe they were requiring one another once?
  • add autocomplete="new-password" to account page new password fields
  • remove invalidWhenUntouched from problem type
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant