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

Refactor the ServiceForm to not contain connector type #13056

Closed
Tracked by #14247 ...
timroes opened this issue May 20, 2022 · 3 comments · Fixed by #17597
Closed
Tracked by #14247 ...

Refactor the ServiceForm to not contain connector type #13056

timroes opened this issue May 20, 2022 · 3 comments · Fixed by #17597
Assignees
Labels
area/frontend Related to the Airbyte webapp team/platform-move technical-debt issues to fix code smell

Comments

@timroes
Copy link
Collaborator

timroes commented May 20, 2022

The ServiceForm currently contains the whole form to create a connector including the actual selection of the connector type within one Formik form. This is causing some weird side-effects, that when switching connectors we're basically exchanging all fields of an Formik form, which has several unnice side-effects (e.g. see #13052 (comment)).

I suggest we split the connector type selection off that form, and make the formik form to only be the actual connector form (Name and downwards). That way this form will only be initialized once a connector is selected and changing that connector would just render a completely different form, which should solve some of the lifecycle issues we're seeing.

The parent component would just keep track of the selected connector type and would merge it in the form values when sending the request.

@timroes timroes added area/frontend technical-debt issues to fix code smell area/frontend Related to the Airbyte webapp labels May 20, 2022
@octavia-squidington-iii
Copy link
Collaborator

cc @airbytehq/frontend

@edmundito
Copy link
Contributor

This has been attempted in #14526

@dizel852
Copy link
Contributor

Notes:
I guess "refactoring the ServiceForm to not contain connector type" it's the first part of refactoring the whole ServiceForm.
I've just got the updated design: https://www.figma.com/file/8aM4gBoW95whyshI5kwVct/01_06_SOURCES?node-id=1%3A3
and see that we need also move actions buttons outside of the Card component

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/platform-move technical-debt issues to fix code smell
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants