feat: extract and reuse email field as a separate component #1255
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Extracted an EmailField component that includes the usual good practices for email fields -
type=email
,inputMode="email"
, andautoComplete="email"
.Closes #1155
Motivation and context
This makes the forms that use them a bit cleaner and enforces consistency.
Related to: #1120
Testing
Steps to test
The impact of the changes is very small, it's more of a code refactor rather than a feature.
Some things to test are if the login forms don't behave unexpected due to the browser's built-in email validation. I tested that manually and it looks good.
Affected urls
All pages that have an email field
/forgotten-password
/campaigns/[slug]/donation/[slug]
- the one time donation steps/profile
and/profile/[slug]
- the update email form in the personal info tab/register
/contact
/admin/irregularities/create
and/admin/irregularities/[id]
Environment
New environment variables:
None
New or updated dependencies:
None