-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
🪟 🐛 Fix input validation on blur and cleanup signup error handling #14724
Merged
Merged
Changes from 5 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
242149c
Cleanup LabeledInput props and prop assignment
edmundito badc038
Fix Input component focus and blur handlers
edmundito fbeaf49
Disable validateOnChange for signin and signup form
edmundito 2f90d68
Fix error wording for empty and email input errors
edmundito 094104a
Add focus / blur tests to Input test
edmundito 2ca3924
Update focused from toggle to state in Input component
edmundito 05b9715
Add Input tests to verify that focus class is set
edmundito File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
30 changes: 16 additions & 14 deletions
30
airbyte-webapp/src/components/LabeledInput/LabeledInput.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,8 +26,8 @@ | |
"form.continue": "Continue", | ||
"form.yourEmail": "Your email", | ||
"form.email.placeholder": "[email protected]", | ||
"form.email.error": "This email address doesn’t seem correct.", | ||
"form.empty.error": "Field is required", | ||
"form.email.error": "Enter a valid email", | ||
"form.empty.error": "Required", | ||
"form.selectConnector": "Type to search for a connector", | ||
"form.searchName": "search by name...", | ||
"form.noResult": "No result", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're touching this right now: Could we maybe change this
useToggle
into auseState
and actually useonFocus
/onBlur
to set the focused state correctly. Most of the times it shouldn't be a problem, but I've encountered in the past some weird edge-cases whereonFocus
/onBlur
might be called twice (e.g. when browser window focus changes in a weird way), in which case the toggle solution might lose correct track of actual focus.