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

🪟🐛 Connector builder: Fix validation race condition #21378

Merged
merged 3 commits into from
Jan 17, 2023

Conversation

flash1293
Copy link
Contributor

This PR fixes a small problem with the validation I noticed when running e2e tests. The error message for a field is shown if there is an error (which comes from the validation and the field is touched as well).

As the validation is debounced by 200ms, a fast user can run into the following situation:

  • Typing in a required field - during typing no validation is triggered because new change events are constantly coming in
  • The field is initially in the error state because the field is required but not set
  • The user stops typing and in under 200ms blurs the field by hitting tab
  • Hitting tab causes the field to become touched, which means the error message is shown
  • After 200ms, the validation is rerun and realizes the field is set now and no error message needs to be shown
  • The error message disappears

What the user is seeing is a briefly blinking error message.

This PR is fixing this by doing an additional validation run on blur

@flash1293 flash1293 marked this pull request as ready for review January 13, 2023 13:37
Copy link
Contributor

@lmossman lmossman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Funny, I just ran into this issue myself today right before I looked at this PR, thanks for putting up the fix!

LGTM, tested locally and it fixed the issue.

@lmossman lmossman merged commit 2440071 into master Jan 17, 2023
@lmossman lmossman deleted the flash1293/fix-validation-race-condition branch January 17, 2023 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/frontend Related to the Airbyte webapp team/extensibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants