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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃獰馃悰 Connector form: Show success message right away #20354

Merged
merged 4 commits into from Dec 16, 2022

Conversation

flash1293
Copy link
Contributor

What

This PR is fixing a little visual bug when submitting an unsaved connector form. When doing so, the loading bar would be shown while the connection test is running. If the test succeeds, the UI reverts back to the submit button for a short amount of time before changing again to the "connection test succeeded" message:

Kapture.2022-12-12.at.11.25.31.mp4

After this change, it behaves like a user would expect: loading -> success -> navigate away:

Kapture.2022-12-12.at.11.30.58.mp4

How

This behavior was caused by the fact that the connection success message is only shown if the "hasSuccess" flag passed down from the page component rendering the form is truthy. However, this flag is not about the connection test, but the success of the request actually saving the connection.

As this is not really related to each other (and doesn't matter for the user), I removed this prop being passed down and only check whether the connection test succeeded.

As a side note: We don't catch errors happening when creating a new source or destination which means they are caught by the default error boundary. This is a bad behavior because it means that the data provided by the user gets lost. I will open a separate issue for this.

@octavia-squidington-iv octavia-squidington-iv added the area/platform issues related to the platform label Dec 12, 2022
@flash1293 flash1293 marked this pull request as ready for review December 12, 2022 14:22
@flash1293 flash1293 requested a review from a team as a code owner December 12, 2022 14:22
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.

Nice refactor, a lot of duplicate code removed and the solution ended up being super simple!

Tested locally and it seems to resolve the issue correctly for me

@flash1293 flash1293 merged commit 8f5516d into master Dec 16, 2022
@flash1293 flash1293 deleted the flash1293/show-success-message branch December 16, 2022 09:59
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 area/platform issues related to the platform team/extensibility
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants