Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connection Form Refactor - Part Two (airbytehq#16748)
* Work started * Minor cleanup * Some cleanup * Lots moved into context * WIP, stepping in the right direction * WIP testing * Post-merge fix * Observables! * WIP tests * Tests! * CI test * CI? * perhaps * Only show name field during create * Fix Build * Fix build * Fixing a bug * Fix failing test * Fixes e2e * Type consolidation * useCallback, improvements to connection create onAfter, and removing dirty tracking * cleanup * Removing an unused prop * errorStatusMessage and mapFormPropsToOperation tests * useUniqueFormId and useInitialValues tests * Cleanup, onFrequencySelect is moved to its use location, better test wrapper, and expanding use of FormError * Better formSubmit handling for new connection * Commenting and some cleanup * Comments! * Fixing errors from the merge * mock data cleanup * Better TODO * onFrequencySelect is now always called * Edmundo CR * Remove whitespace * Move connection into state so it gets updated * Consolidate on connection object * Remove ModalCancel throw + form clearing in create submit function * Some cleanup * Fixing error * Fixing build error * Rename file * Bridging changes to bring things inline * Builds and tests run * replication view almost works as expected * About to embark on another huge change! Committing here before I break more things. * slowly, unity * Code appears to be working * Some minor cleanup * Form dirty change tracking * WIP styling moving and fixing * skip refresh on update if status !== active * Fixing styles * Minor * More cleanup and improvements * Rename CreateConnectionContent -> CreateConnection * refreshSchema moved into the connection form service * Re-add TODO * schemaErrorStatus => schemaError * CreateConnectionName -> CreateConnectionNameField * Logic for readonly vs edit * Added TODO, fixed a re-initialize issue * Remove unused ConnectionForm component * Improved refresh schema logic * undoing some of the cancel work as it felt like the wrong place to do it * No longer need to know if the status is updating, that info is available from the form edit context * Move close modal & confirmation modal logic to where it's used * Remove unnecessary useUnmount * Cleanup and removal of unused * Somehow missed removing this * Fixing failing test * Added missing initialvalues logic. Added connection form service tests. * Connection Edit tests! * connection replication test pt 1 * Moving files to make master merge easier * Remove snapshot * non-default export * Remove unused * Minor improvements * Edmundo CR. * name now optional for connection editing * Schema refresh errors handled on connection replication view * schema refreshing logic, confirm catalog dialog abstraction * CreateConnection -> CreateConnectionForm * form config test cleanup * connection replication tab tests * Create Connection Form Tests * Better jest mocking! * Fixing issue setting schedule type to manual * Tests fixed, and test-utils is better! * Changing back to Once * Fixing build from master merge * Updating snapshots. If these change a lot it may be worth altering the tests to avoid snapshots. * Edmundo & Lake Code Review Comments * Tim CR * Fixing a styling issue * ?? is less clever than I thought * Form change tracking has been improved to not leave dirty forms around. As well as it has been moved into ConnectionFormFields for DRY purposes * Update airbyte-webapp/src/hooks/services/ConnectionForm/ConnectionFormService.tsx Co-authored-by: Lake Mossman <lake@airbyte.io> * Update airbyte-webapp/src/hooks/services/ConnectionEdit/ConnectionEditService.test.tsx Co-authored-by: Lake Mossman <lake@airbyte.io> * Update airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/ConnectionReplicationTab.tsx Co-authored-by: Lake Mossman <lake@airbyte.io> * DRY out tests * remove unknowns and fix mocked hook to be patch-style (airbytehq#17698) Co-authored-by: Krishna (kc) Glick <krishna@airbyte.io> * Self-CR * idk why this was an issue but whatever * Update airbyte-webapp/src/hooks/services/ConnectionForm/ConnectionFormService.test.tsx Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM> * Update airbyte-webapp/src/hooks/services/ConnectionEdit/ConnectionEditService.test.tsx Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM> Co-authored-by: Lake Mossman <lake@airbyte.io> Co-authored-by: tealjulia <teal@airbyte.io> Co-authored-by: Teal Larson <LARSON.TEAL@GMAIL.COM>
- Loading branch information