From 5aa6ea1f54fb4a2e3e0e1cc64f296f73d0fc870e Mon Sep 17 00:00:00 2001 From: Edmundo Ruiz Ghanem Date: Fri, 6 Jan 2023 16:51:16 -0500 Subject: [PATCH 1/3] Move ConnectionForm from views to components/connection Move FormCard to components/connection/ConnectionEditFormCard Move CollapsibleCard to components/ui --- .../CreateConnection/CreateConnectionForm.tsx | 11 +++++++---- .../CreateConnectionNameField.module.scss | 2 +- .../CreateConnectionNameField.tsx | 3 +-- .../CreateConnection/DataResidency.tsx | 2 +- .../connection/CatalogTree/BulkHeader.tsx | 2 +- .../connection/CatalogTree/CatalogSection.tsx | 2 +- .../connection/CatalogTree/CatalogTreeBody.tsx | 3 ++- .../CatalogTree/next/BulkEditPanel.tsx | 2 +- .../next/CatalogTreeTableHeader.tsx | 2 +- .../next/useCatalogTreeTableRowProps.test.tsx | 3 ++- .../ConnectionEditFormCard.module.scss} | 2 +- .../ConnectionEditFormCard.tsx} | 8 ++++---- .../connection/ConnectionEditFormCard/index.ts | 1 + .../ConnectionForm/ConnectionForm.module.scss | 2 +- .../ConnectionFormFields.module.scss | 0 .../ConnectionForm/ConnectionFormFields.tsx | 10 +++++----- .../ConnectionForm}/CreateControls.tsx | 0 .../ConnectionForm}/EditControls.module.scss | 4 ++-- .../ConnectionForm}/EditControls.tsx | 0 .../NamespaceDefinitionField.module.scss | 1 + .../NamespaceDefinitionField.tsx | 3 ++- ...nBreakingChangesPreferenceField.module.scss | 0 .../NonBreakingChangesPreferenceField.tsx | 0 .../NormalizationField.module.scss | 2 +- .../ConnectionForm}/NormalizationField.tsx | 0 .../ConnectionForm}/OctaviaRedFlag.tsx | 0 .../ConnectionForm}/OctaviaYellowFlag.tsx | 0 .../ConnectionForm}/OperationsSection.tsx | 0 .../ResponseMessage.module.scss | 2 +- .../ConnectionForm}/ResponseMessage.tsx | 0 .../ConnectionForm}/ScheduleField.module.scss | 0 .../ConnectionForm}/ScheduleField.tsx | 4 ++-- .../SchemaChangeBackdrop.module.scss | 0 .../ConnectionForm}/SchemaChangeBackdrop.tsx | 0 .../SchemaChangesBackdrop.test.tsx | 0 .../ConnectionForm}/Section.module.scss | 2 +- .../connection/ConnectionForm}/Section.tsx | 0 .../SyncCatalogField.module.scss | 0 .../ConnectionForm}/SyncCatalogField.tsx | 0 .../ConnectionForm}/TransformationField.tsx | 4 ++-- .../SchemaChangesBackdrop.test.tsx.snap | 0 .../__snapshots__/formConfig.test.ts.snap | 0 .../calculateInitialCatalog.test.ts | 0 .../ConnectionForm/calculateInitialCatalog.ts | 0 .../ConnectionForm/formConfig.test.ts | 0 .../connection}/ConnectionForm/formConfig.tsx | 0 ...freshSourceSchemaWithConfirmationOnDirty.ts | 0 .../ConnectionInfoCard.test.tsx | 2 +- .../SchemaChangesDetected.test.tsx | 2 +- .../SchemaChangesDetected.tsx | 2 +- .../DestinationNamespaceModal.tsx | 2 +- .../DestinationStreamNamesModal.tsx | 3 +-- .../TransformationForm.module.scss | 0 .../TransformationForm/TransformationForm.tsx | 0 .../connection}/TransformationForm/index.tsx | 0 .../TransformationForm/utils.test.ts | 0 .../connection}/TransformationForm/utils.ts | 0 .../CollapsibleCard.module.scss | 0 .../ui/CollapsibleCard}/CollapsibleCard.tsx | 0 .../ui/CollapsibleCard/index.stories.tsx | 18 ++++++++++++++++++ .../src/components/ui/CollapsibleCard/index.ts | 1 + .../ConnectionForm/ConnectionFormService.tsx | 15 ++++++++------- .../ConnectionReplicationPage.tsx | 11 +++++++---- .../ConnectionTransformationPage.tsx | 10 +++++----- .../CustomTransformationsCard.tsx | 11 ++++++----- .../NormalizationCard.tsx | 11 ++++++----- .../ConnectionForm/ScheduleField/index.ts | 1 - .../NamespaceDefinitionField.module.scss | 1 - 68 files changed, 98 insertions(+), 69 deletions(-) rename airbyte-webapp/src/{views/Connection/FormCard.module.scss => components/connection/ConnectionEditFormCard/ConnectionEditFormCard.module.scss} (68%) rename airbyte-webapp/src/{views/Connection/FormCard.tsx => components/connection/ConnectionEditFormCard/ConnectionEditFormCard.tsx} (89%) create mode 100644 airbyte-webapp/src/components/connection/ConnectionEditFormCard/index.ts rename airbyte-webapp/src/{views/Connection => components/connection}/ConnectionForm/ConnectionForm.module.scss (89%) rename airbyte-webapp/src/{views/Connection => components/connection}/ConnectionForm/ConnectionFormFields.module.scss (100%) rename airbyte-webapp/src/{views/Connection => components/connection}/ConnectionForm/ConnectionFormFields.tsx (94%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/CreateControls.tsx (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/EditControls.module.scss (89%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/EditControls.tsx (100%) create mode 100644 airbyte-webapp/src/components/connection/ConnectionForm/NamespaceDefinitionField.module.scss rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/NamespaceDefinitionField.tsx (95%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/NonBreakingChangesPreferenceField.module.scss (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/NonBreakingChangesPreferenceField.tsx (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/NormalizationField.module.scss (63%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/NormalizationField.tsx (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/OctaviaRedFlag.tsx (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/OctaviaYellowFlag.tsx (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/OperationsSection.tsx (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/ResponseMessage.module.scss (83%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/ResponseMessage.tsx (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/ScheduleField => components/connection/ConnectionForm}/ScheduleField.module.scss (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/ScheduleField => components/connection/ConnectionForm}/ScheduleField.tsx (98%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/SchemaChangeBackdrop.module.scss (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/SchemaChangeBackdrop.tsx (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/SchemaChangesBackdrop.test.tsx (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/Section.module.scss (87%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/Section.tsx (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/SyncCatalogField.module.scss (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/SyncCatalogField.tsx (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/TransformationField.tsx (94%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/__snapshots__/SchemaChangesBackdrop.test.tsx.snap (100%) rename airbyte-webapp/src/{views/Connection => components/connection}/ConnectionForm/__snapshots__/formConfig.test.ts.snap (100%) rename airbyte-webapp/src/{views/Connection => components/connection}/ConnectionForm/calculateInitialCatalog.test.ts (100%) rename airbyte-webapp/src/{views/Connection => components/connection}/ConnectionForm/calculateInitialCatalog.ts (100%) rename airbyte-webapp/src/{views/Connection => components/connection}/ConnectionForm/formConfig.test.ts (100%) rename airbyte-webapp/src/{views/Connection => components/connection}/ConnectionForm/formConfig.tsx (100%) rename airbyte-webapp/src/{views/Connection/ConnectionForm/components => components/connection/ConnectionForm}/refreshSourceSchemaWithConfirmationOnDirty.ts (100%) rename airbyte-webapp/src/{views/Connection => components/connection}/TransformationForm/TransformationForm.module.scss (100%) rename airbyte-webapp/src/{views/Connection => components/connection}/TransformationForm/TransformationForm.tsx (100%) rename airbyte-webapp/src/{views/Connection => components/connection}/TransformationForm/index.tsx (100%) rename airbyte-webapp/src/{views/Connection => components/connection}/TransformationForm/utils.test.ts (100%) rename airbyte-webapp/src/{views/Connection => components/connection}/TransformationForm/utils.ts (100%) rename airbyte-webapp/src/{views/Connection => components/ui/CollapsibleCard}/CollapsibleCard.module.scss (100%) rename airbyte-webapp/src/{views/Connection => components/ui/CollapsibleCard}/CollapsibleCard.tsx (100%) create mode 100644 airbyte-webapp/src/components/ui/CollapsibleCard/index.stories.tsx create mode 100644 airbyte-webapp/src/components/ui/CollapsibleCard/index.ts delete mode 100644 airbyte-webapp/src/views/Connection/ConnectionForm/ScheduleField/index.ts delete mode 100644 airbyte-webapp/src/views/Connection/ConnectionForm/components/NamespaceDefinitionField.module.scss diff --git a/airbyte-webapp/src/components/CreateConnection/CreateConnectionForm.tsx b/airbyte-webapp/src/components/CreateConnection/CreateConnectionForm.tsx index 3f958ed947d2..db63efa2da59 100644 --- a/airbyte-webapp/src/components/CreateConnection/CreateConnectionForm.tsx +++ b/airbyte-webapp/src/components/CreateConnection/CreateConnectionForm.tsx @@ -2,6 +2,13 @@ import { Form, Formik, FormikHelpers } from "formik"; import React, { Suspense, useCallback, useState } from "react"; import { useNavigate } from "react-router-dom"; +import { ConnectionFormFields } from "components/connection/ConnectionForm/ConnectionFormFields"; +import CreateControls from "components/connection/ConnectionForm/CreateControls"; +import { + FormikConnectionFormValues, + useConnectionValidationSchema, +} from "components/connection/ConnectionForm/formConfig"; +import { OperationsSection } from "components/connection/ConnectionForm/OperationsSection"; import LoadingSchema from "components/LoadingSchema"; import { DestinationRead, SourceRead } from "core/request/AirbyteClient"; @@ -15,10 +22,6 @@ import { useFormChangeTrackerService } from "hooks/services/FormChangeTracker"; import { useCreateConnection } from "hooks/services/useConnectionHook"; import { SchemaError as SchemaErrorType, useDiscoverSchema } from "hooks/services/useSourceHook"; import { useCurrentWorkspaceId } from "services/workspaces/WorkspacesService"; -import CreateControls from "views/Connection/ConnectionForm/components/CreateControls"; -import { OperationsSection } from "views/Connection/ConnectionForm/components/OperationsSection"; -import { ConnectionFormFields } from "views/Connection/ConnectionForm/ConnectionFormFields"; -import { useConnectionValidationSchema, FormikConnectionFormValues } from "views/Connection/ConnectionForm/formConfig"; import styles from "./CreateConnectionForm.module.scss"; import { CreateConnectionNameField } from "./CreateConnectionNameField"; diff --git a/airbyte-webapp/src/components/CreateConnection/CreateConnectionNameField.module.scss b/airbyte-webapp/src/components/CreateConnection/CreateConnectionNameField.module.scss index 5ef27259b6ec..d04462968a89 100644 --- a/airbyte-webapp/src/components/CreateConnection/CreateConnectionNameField.module.scss +++ b/airbyte-webapp/src/components/CreateConnection/CreateConnectionNameField.module.scss @@ -1 +1 @@ -@forward "../../views/Connection/ConnectionForm/ConnectionFormFields.module.scss"; +@forward "../connection/ConnectionForm/ConnectionFormFields.module.scss"; diff --git a/airbyte-webapp/src/components/CreateConnection/CreateConnectionNameField.tsx b/airbyte-webapp/src/components/CreateConnection/CreateConnectionNameField.tsx index 6b450c3f9223..a362de2cc70d 100644 --- a/airbyte-webapp/src/components/CreateConnection/CreateConnectionNameField.tsx +++ b/airbyte-webapp/src/components/CreateConnection/CreateConnectionNameField.tsx @@ -1,12 +1,11 @@ import { Field, FieldProps } from "formik"; import { FormattedMessage, useIntl } from "react-intl"; +import { Section } from "components/connection/ConnectionForm/Section"; import { ControlLabels } from "components/LabeledControl"; import { FlexContainer } from "components/ui/Flex"; import { Input } from "components/ui/Input"; -import { Section } from "views/Connection/ConnectionForm/components/Section"; - import styles from "./CreateConnectionNameField.module.scss"; export const CreateConnectionNameField = () => { diff --git a/airbyte-webapp/src/components/CreateConnection/DataResidency.tsx b/airbyte-webapp/src/components/CreateConnection/DataResidency.tsx index a1cc35db4e07..eae7dfd9f768 100644 --- a/airbyte-webapp/src/components/CreateConnection/DataResidency.tsx +++ b/airbyte-webapp/src/components/CreateConnection/DataResidency.tsx @@ -3,13 +3,13 @@ import React from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { DataGeographyDropdown } from "components/common/DataGeographyDropdown"; +import { Section } from "components/connection/ConnectionForm/Section"; import { ControlLabels } from "components/LabeledControl"; import { FlexContainer } from "components/ui/Flex"; import { Geography } from "core/request/AirbyteClient"; import { useAvailableGeographies } from "packages/cloud/services/geographies/GeographiesService"; import { links } from "utils/links"; -import { Section } from "views/Connection/ConnectionForm/components/Section"; import styles from "./DataResidency.module.scss"; diff --git a/airbyte-webapp/src/components/connection/CatalogTree/BulkHeader.tsx b/airbyte-webapp/src/components/connection/CatalogTree/BulkHeader.tsx index 07e5cf648c45..cf9e291728f1 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/BulkHeader.tsx +++ b/airbyte-webapp/src/components/connection/CatalogTree/BulkHeader.tsx @@ -3,6 +3,7 @@ import React, { useMemo } from "react"; import { FormattedMessage } from "react-intl"; import { Cell, Header } from "components"; +import { SUPPORTED_MODES } from "components/connection/ConnectionForm/formConfig"; import { Button } from "components/ui/Button"; import { Switch } from "components/ui/Switch"; @@ -10,7 +11,6 @@ import { SyncSchemaField, SyncSchemaFieldObject, SyncSchemaStream, traverseSchem import { DestinationSyncMode, SyncMode } from "core/request/AirbyteClient"; import { useBulkEditService } from "hooks/services/BulkEdit/BulkEditService"; import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService"; -import { SUPPORTED_MODES } from "views/Connection/ConnectionForm/formConfig"; import styles from "./BulkHeader.module.scss"; import { pathDisplayName, PathPopout } from "./PathPopout"; diff --git a/airbyte-webapp/src/components/connection/CatalogTree/CatalogSection.tsx b/airbyte-webapp/src/components/connection/CatalogTree/CatalogSection.tsx index 3e57e6895d3a..b1f5fb973048 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/CatalogSection.tsx +++ b/airbyte-webapp/src/components/connection/CatalogTree/CatalogSection.tsx @@ -3,6 +3,7 @@ import isEqual from "lodash/isEqual"; import React, { memo, useCallback, useMemo } from "react"; import { useToggle } from "react-use"; +import { ConnectionFormValues, SUPPORTED_MODES } from "components/connection/ConnectionForm/formConfig"; import { DropDownOptionDataItem } from "components/ui/DropDown"; import { SyncSchemaField, SyncSchemaFieldObject, SyncSchemaStream } from "core/domain/catalog"; @@ -18,7 +19,6 @@ import { useDestinationNamespace } from "hooks/connection/useDestinationNamespac import { useNewTableDesignExperiment } from "hooks/connection/useNewTableDesignExperiment"; import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService"; import { naturalComparatorBy } from "utils/objects"; -import { ConnectionFormValues, SUPPORTED_MODES } from "views/Connection/ConnectionForm/formConfig"; import styles from "./CatalogSection.module.scss"; import { CatalogTreeTableRow } from "./next/CatalogTreeTableRow"; diff --git a/airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeBody.tsx b/airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeBody.tsx index 95996bb2c6c3..da13166480e9 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeBody.tsx +++ b/airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeBody.tsx @@ -1,11 +1,12 @@ import { Field, FieldProps, setIn } from "formik"; import React, { useCallback } from "react"; +import { FormikConnectionFormValues } from "components/connection/ConnectionForm/formConfig"; + import { SyncSchemaStream } from "core/domain/catalog"; import { AirbyteStreamConfiguration } from "core/request/AirbyteClient"; import { useNewTableDesignExperiment } from "hooks/connection/useNewTableDesignExperiment"; import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService"; -import { FormikConnectionFormValues } from "views/Connection/ConnectionForm/formConfig"; import { BulkHeader } from "./BulkHeader"; import { CatalogSection } from "./CatalogSection"; diff --git a/airbyte-webapp/src/components/connection/CatalogTree/next/BulkEditPanel.tsx b/airbyte-webapp/src/components/connection/CatalogTree/next/BulkEditPanel.tsx index 662f412b1864..15d99015490c 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/next/BulkEditPanel.tsx +++ b/airbyte-webapp/src/components/connection/CatalogTree/next/BulkEditPanel.tsx @@ -6,6 +6,7 @@ import { FormattedMessage } from "react-intl"; import styled from "styled-components"; import { Header } from "components"; +import { SUPPORTED_MODES } from "components/connection/ConnectionForm/formConfig"; import { Button } from "components/ui/Button"; import { Switch } from "components/ui/Switch"; @@ -13,7 +14,6 @@ import { SyncSchemaField, SyncSchemaFieldObject, SyncSchemaStream, traverseSchem import { DestinationSyncMode, SyncMode } from "core/request/AirbyteClient"; import { useBulkEditService } from "hooks/services/BulkEdit/BulkEditService"; import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService"; -import { SUPPORTED_MODES } from "views/Connection/ConnectionForm/formConfig"; import { pathDisplayName } from "../PathPopout"; import { HeaderCell } from "../styles"; diff --git a/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableHeader.tsx b/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableHeader.tsx index ee01a8e7b54c..b5fc421c1f82 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableHeader.tsx +++ b/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableHeader.tsx @@ -5,6 +5,7 @@ import { useFormikContext } from "formik"; import React from "react"; import { FormattedMessage } from "react-intl"; +import { FormikConnectionFormValues } from "components/connection/ConnectionForm/formConfig"; import { Header } from "components/SimpleTableComponents"; import { Button } from "components/ui/Button"; import { CheckBox } from "components/ui/CheckBox"; @@ -17,7 +18,6 @@ import { useBulkEditService } from "hooks/services/BulkEdit/BulkEditService"; import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService"; import { useModalService } from "hooks/services/Modal"; import { links } from "utils/links"; -import { FormikConnectionFormValues } from "views/Connection/ConnectionForm/formConfig"; import { DestinationNamespaceFormValueType, diff --git a/airbyte-webapp/src/components/connection/CatalogTree/next/useCatalogTreeTableRowProps.test.tsx b/airbyte-webapp/src/components/connection/CatalogTree/next/useCatalogTreeTableRowProps.test.tsx index 191eefe32402..f3c15c968729 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/next/useCatalogTreeTableRowProps.test.tsx +++ b/airbyte-webapp/src/components/connection/CatalogTree/next/useCatalogTreeTableRowProps.test.tsx @@ -1,10 +1,11 @@ import { renderHook } from "@testing-library/react-hooks"; import * as formik from "formik"; +import { FormikConnectionFormValues } from "components/connection/ConnectionForm/formConfig"; + import { AirbyteStreamAndConfiguration } from "core/request/AirbyteClient"; import * as bulkEditService from "hooks/services/BulkEdit/BulkEditService"; import * as connectionFormService from "hooks/services/ConnectionForm/ConnectionFormService"; -import { FormikConnectionFormValues } from "views/Connection/ConnectionForm/formConfig"; // eslint-disable-next-line css-modules/no-unused-class import { useCatalogTreeTableRowProps } from "./useCatalogTreeTableRowProps"; diff --git a/airbyte-webapp/src/views/Connection/FormCard.module.scss b/airbyte-webapp/src/components/connection/ConnectionEditFormCard/ConnectionEditFormCard.module.scss similarity index 68% rename from airbyte-webapp/src/views/Connection/FormCard.module.scss rename to airbyte-webapp/src/components/connection/ConnectionEditFormCard/ConnectionEditFormCard.module.scss index bcb8d01884c5..ce45b41bb4f7 100644 --- a/airbyte-webapp/src/views/Connection/FormCard.module.scss +++ b/airbyte-webapp/src/components/connection/ConnectionEditFormCard/ConnectionEditFormCard.module.scss @@ -1,4 +1,4 @@ -@use "../../scss/variables"; +@use "scss/variables"; .formCard { padding: 22px 27px variables.$spacing-xl 24px; diff --git a/airbyte-webapp/src/views/Connection/FormCard.tsx b/airbyte-webapp/src/components/connection/ConnectionEditFormCard/ConnectionEditFormCard.tsx similarity index 89% rename from airbyte-webapp/src/views/Connection/FormCard.tsx rename to airbyte-webapp/src/components/connection/ConnectionEditFormCard/ConnectionEditFormCard.tsx index b89d8903e9e6..51103b857b27 100644 --- a/airbyte-webapp/src/views/Connection/FormCard.tsx +++ b/airbyte-webapp/src/components/connection/ConnectionEditFormCard/ConnectionEditFormCard.tsx @@ -4,13 +4,13 @@ import { useIntl } from "react-intl"; import { useMutation } from "react-query"; import { FormChangeTracker } from "components/common/FormChangeTracker"; +import { CollapsibleCardProps, CollapsibleCard } from "components/ui/CollapsibleCard"; import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService"; import { generateMessageFromError } from "utils/errorStatusMessage"; -import { CollapsibleCardProps, CollapsibleCard } from "views/Connection/CollapsibleCard"; -import EditControls from "views/Connection/ConnectionForm/components/EditControls"; -import styles from "./FormCard.module.scss"; +import EditControls from "../ConnectionForm/EditControls"; +import styles from "./ConnectionEditFormCard.module.scss"; interface FormCardProps extends CollapsibleCardProps { bottomSeparator?: boolean; @@ -18,7 +18,7 @@ interface FormCardProps extends CollapsibleCardProps { submitDisabled?: boolean; } -export const FormCard = ({ +export const ConnectionEditFormCard = ({ children, form, bottomSeparator = true, diff --git a/airbyte-webapp/src/components/connection/ConnectionEditFormCard/index.ts b/airbyte-webapp/src/components/connection/ConnectionEditFormCard/index.ts new file mode 100644 index 000000000000..eab9ebf0515c --- /dev/null +++ b/airbyte-webapp/src/components/connection/ConnectionEditFormCard/index.ts @@ -0,0 +1 @@ +export * from "./ConnectionEditFormCard"; diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionForm.module.scss b/airbyte-webapp/src/components/connection/ConnectionForm/ConnectionForm.module.scss similarity index 89% rename from airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionForm.module.scss rename to airbyte-webapp/src/components/connection/ConnectionForm/ConnectionForm.module.scss index cfefbbda849b..bab2c348a160 100644 --- a/airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionForm.module.scss +++ b/airbyte-webapp/src/components/connection/ConnectionForm/ConnectionForm.module.scss @@ -1,4 +1,4 @@ -@use "../../../scss/variables"; +@use "scss/variables"; .formContainer { display: flex; diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionFormFields.module.scss b/airbyte-webapp/src/components/connection/ConnectionForm/ConnectionFormFields.module.scss similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionFormFields.module.scss rename to airbyte-webapp/src/components/connection/ConnectionForm/ConnectionFormFields.module.scss diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionFormFields.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/ConnectionFormFields.tsx similarity index 94% rename from airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionFormFields.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/ConnectionFormFields.tsx index 4f1e923127da..a203ced39949 100644 --- a/airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionFormFields.tsx +++ b/airbyte-webapp/src/components/connection/ConnectionForm/ConnectionFormFields.tsx @@ -19,14 +19,14 @@ import { FeatureItem, useFeature } from "hooks/services/Feature"; import { useFormChangeTrackerService } from "hooks/services/FormChangeTracker"; import { ValuesProps } from "hooks/services/useConnectionHook"; -import { NamespaceDefinitionField } from "./components/NamespaceDefinitionField"; -import { NonBreakingChangesPreferenceField } from "./components/NonBreakingChangesPreferenceField"; -import { useRefreshSourceSchemaWithConfirmationOnDirty } from "./components/refreshSourceSchemaWithConfirmationOnDirty"; -import { Section } from "./components/Section"; -import { SyncCatalogField } from "./components/SyncCatalogField"; import styles from "./ConnectionFormFields.module.scss"; import { FormikConnectionFormValues } from "./formConfig"; +import { NamespaceDefinitionField } from "./NamespaceDefinitionField"; +import { NonBreakingChangesPreferenceField } from "./NonBreakingChangesPreferenceField"; +import { useRefreshSourceSchemaWithConfirmationOnDirty } from "./refreshSourceSchemaWithConfirmationOnDirty"; import { ScheduleField } from "./ScheduleField"; +import { Section } from "./Section"; +import { SyncCatalogField } from "./SyncCatalogField"; interface ConnectionFormFieldsProps { values: ValuesProps | FormikConnectionFormValues; diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/CreateControls.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/CreateControls.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/CreateControls.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/CreateControls.tsx diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/EditControls.module.scss b/airbyte-webapp/src/components/connection/ConnectionForm/EditControls.module.scss similarity index 89% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/EditControls.module.scss rename to airbyte-webapp/src/components/connection/ConnectionForm/EditControls.module.scss index f3facf6c193a..2afd4f0946a3 100644 --- a/airbyte-webapp/src/views/Connection/ConnectionForm/components/EditControls.module.scss +++ b/airbyte-webapp/src/components/connection/ConnectionForm/EditControls.module.scss @@ -1,5 +1,5 @@ -@use "../../../../scss/colors"; -@use "../../../../scss/variables"; +@use "scss/colors"; +@use "scss/variables"; .content { display: flex; diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/EditControls.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/EditControls.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/EditControls.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/EditControls.tsx diff --git a/airbyte-webapp/src/components/connection/ConnectionForm/NamespaceDefinitionField.module.scss b/airbyte-webapp/src/components/connection/ConnectionForm/NamespaceDefinitionField.module.scss new file mode 100644 index 000000000000..563d2e39f88e --- /dev/null +++ b/airbyte-webapp/src/components/connection/ConnectionForm/NamespaceDefinitionField.module.scss @@ -0,0 +1 @@ +@forward "./ConnectionFormFields.module.scss"; diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/NamespaceDefinitionField.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/NamespaceDefinitionField.tsx similarity index 95% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/NamespaceDefinitionField.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/NamespaceDefinitionField.tsx index 75cbf5cd1b68..56cdf8822e18 100644 --- a/airbyte-webapp/src/views/Connection/ConnectionForm/components/NamespaceDefinitionField.tsx +++ b/airbyte-webapp/src/components/connection/ConnectionForm/NamespaceDefinitionField.tsx @@ -6,7 +6,8 @@ import { ControlLabels } from "components/LabeledControl"; import { DropDown } from "components/ui/DropDown"; import { FlexContainer } from "components/ui/Flex"; -import { NamespaceDefinitionType } from "../../../../core/request/AirbyteClient"; +import { NamespaceDefinitionType } from "core/request/AirbyteClient"; + import styles from "./NamespaceDefinitionField.module.scss"; export const StreamOptions = [ diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/NonBreakingChangesPreferenceField.module.scss b/airbyte-webapp/src/components/connection/ConnectionForm/NonBreakingChangesPreferenceField.module.scss similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/NonBreakingChangesPreferenceField.module.scss rename to airbyte-webapp/src/components/connection/ConnectionForm/NonBreakingChangesPreferenceField.module.scss diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/NonBreakingChangesPreferenceField.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/NonBreakingChangesPreferenceField.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/NonBreakingChangesPreferenceField.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/NonBreakingChangesPreferenceField.tsx diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/NormalizationField.module.scss b/airbyte-webapp/src/components/connection/ConnectionForm/NormalizationField.module.scss similarity index 63% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/NormalizationField.module.scss rename to airbyte-webapp/src/components/connection/ConnectionForm/NormalizationField.module.scss index 044bcdd2bf93..b5ddcbf37693 100644 --- a/airbyte-webapp/src/views/Connection/ConnectionForm/components/NormalizationField.module.scss +++ b/airbyte-webapp/src/components/connection/ConnectionForm/NormalizationField.module.scss @@ -1,4 +1,4 @@ -@use "../../../../scss/variables"; +@use "scss/variables"; .normalizationField { margin: variables.$spacing-lg 0; diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/NormalizationField.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/NormalizationField.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/NormalizationField.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/NormalizationField.tsx diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/OctaviaRedFlag.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/OctaviaRedFlag.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/OctaviaRedFlag.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/OctaviaRedFlag.tsx diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/OctaviaYellowFlag.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/OctaviaYellowFlag.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/OctaviaYellowFlag.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/OctaviaYellowFlag.tsx diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/OperationsSection.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/OperationsSection.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/OperationsSection.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/OperationsSection.tsx diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/ResponseMessage.module.scss b/airbyte-webapp/src/components/connection/ConnectionForm/ResponseMessage.module.scss similarity index 83% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/ResponseMessage.module.scss rename to airbyte-webapp/src/components/connection/ConnectionForm/ResponseMessage.module.scss index c25439ef2ed5..0129d653d504 100644 --- a/airbyte-webapp/src/views/Connection/ConnectionForm/components/ResponseMessage.module.scss +++ b/airbyte-webapp/src/components/connection/ConnectionForm/ResponseMessage.module.scss @@ -1,4 +1,4 @@ -@use "../../../../scss/colors"; +@use "scss/colors"; .message { overflow: hidden; diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/ResponseMessage.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/ResponseMessage.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/ResponseMessage.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/ResponseMessage.tsx diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/ScheduleField/ScheduleField.module.scss b/airbyte-webapp/src/components/connection/ConnectionForm/ScheduleField.module.scss similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/ScheduleField/ScheduleField.module.scss rename to airbyte-webapp/src/components/connection/ConnectionForm/ScheduleField.module.scss diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/ScheduleField/ScheduleField.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/ScheduleField.tsx similarity index 98% rename from airbyte-webapp/src/views/Connection/ConnectionForm/ScheduleField/ScheduleField.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/ScheduleField.tsx index 368c39c97576..4af82c1b81ac 100644 --- a/airbyte-webapp/src/views/Connection/ConnectionForm/ScheduleField/ScheduleField.tsx +++ b/airbyte-webapp/src/components/connection/ConnectionForm/ScheduleField.tsx @@ -8,14 +8,14 @@ import { FlexContainer } from "components/ui/Flex"; import { Input } from "components/ui/Input"; import { Text } from "components/ui/Text"; +import availableCronTimeZones from "config/availableCronTimeZones.json"; import { Action, Namespace } from "core/analytics"; import { ConnectionScheduleData, ConnectionScheduleType } from "core/request/AirbyteClient"; import { useAnalyticsService } from "hooks/services/Analytics"; import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService"; import { links } from "utils/links"; -import availableCronTimeZones from "../../../../config/availableCronTimeZones.json"; -import { FormikConnectionFormValues, useFrequencyDropdownData } from "../formConfig"; +import { FormikConnectionFormValues, useFrequencyDropdownData } from "./formConfig"; import styles from "./ScheduleField.module.scss"; const CRON_DEFAULT_VALUE = { diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/SchemaChangeBackdrop.module.scss b/airbyte-webapp/src/components/connection/ConnectionForm/SchemaChangeBackdrop.module.scss similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/SchemaChangeBackdrop.module.scss rename to airbyte-webapp/src/components/connection/ConnectionForm/SchemaChangeBackdrop.module.scss diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/SchemaChangeBackdrop.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/SchemaChangeBackdrop.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/SchemaChangeBackdrop.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/SchemaChangeBackdrop.tsx diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/SchemaChangesBackdrop.test.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/SchemaChangesBackdrop.test.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/SchemaChangesBackdrop.test.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/SchemaChangesBackdrop.test.tsx diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/Section.module.scss b/airbyte-webapp/src/components/connection/ConnectionForm/Section.module.scss similarity index 87% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/Section.module.scss rename to airbyte-webapp/src/components/connection/ConnectionForm/Section.module.scss index 54c545da209f..21de992686e5 100644 --- a/airbyte-webapp/src/views/Connection/ConnectionForm/components/Section.module.scss +++ b/airbyte-webapp/src/components/connection/ConnectionForm/Section.module.scss @@ -1,4 +1,4 @@ -@use "../../../../scss/variables"; +@use "scss/variables"; .section { padding: variables.$spacing-xl; diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/Section.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/Section.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/Section.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/Section.tsx diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/SyncCatalogField.module.scss b/airbyte-webapp/src/components/connection/ConnectionForm/SyncCatalogField.module.scss similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/SyncCatalogField.module.scss rename to airbyte-webapp/src/components/connection/ConnectionForm/SyncCatalogField.module.scss diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/SyncCatalogField.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/SyncCatalogField.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/SyncCatalogField.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/SyncCatalogField.tsx diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/TransformationField.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/TransformationField.tsx similarity index 94% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/TransformationField.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/TransformationField.tsx index 7d420dc72e96..f8b0f72b9c3d 100644 --- a/airbyte-webapp/src/views/Connection/ConnectionForm/components/TransformationField.tsx +++ b/airbyte-webapp/src/components/connection/ConnectionForm/TransformationField.tsx @@ -3,13 +3,13 @@ import React, { useState } from "react"; import { FormattedMessage } from "react-intl"; import ArrayOfObjectsEditor from "components/ArrayOfObjectsEditor"; +import TransformationForm from "components/connection/TransformationForm"; import { OperationRead } from "core/request/AirbyteClient"; import { ConnectionFormMode } from "hooks/services/ConnectionForm/ConnectionFormService"; import { isDefined } from "utils/common"; -import TransformationForm from "views/Connection/TransformationForm"; -import { useDefaultTransformation } from "../formConfig"; +import { useDefaultTransformation } from "./formConfig"; interface TransformationFieldProps extends ArrayHelpers { form: FormikProps<{ transformations: OperationRead[] }>; diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/__snapshots__/SchemaChangesBackdrop.test.tsx.snap b/airbyte-webapp/src/components/connection/ConnectionForm/__snapshots__/SchemaChangesBackdrop.test.tsx.snap similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/__snapshots__/SchemaChangesBackdrop.test.tsx.snap rename to airbyte-webapp/src/components/connection/ConnectionForm/__snapshots__/SchemaChangesBackdrop.test.tsx.snap diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/__snapshots__/formConfig.test.ts.snap b/airbyte-webapp/src/components/connection/ConnectionForm/__snapshots__/formConfig.test.ts.snap similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/__snapshots__/formConfig.test.ts.snap rename to airbyte-webapp/src/components/connection/ConnectionForm/__snapshots__/formConfig.test.ts.snap diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/calculateInitialCatalog.test.ts b/airbyte-webapp/src/components/connection/ConnectionForm/calculateInitialCatalog.test.ts similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/calculateInitialCatalog.test.ts rename to airbyte-webapp/src/components/connection/ConnectionForm/calculateInitialCatalog.test.ts diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/calculateInitialCatalog.ts b/airbyte-webapp/src/components/connection/ConnectionForm/calculateInitialCatalog.ts similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/calculateInitialCatalog.ts rename to airbyte-webapp/src/components/connection/ConnectionForm/calculateInitialCatalog.ts diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/formConfig.test.ts b/airbyte-webapp/src/components/connection/ConnectionForm/formConfig.test.ts similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/formConfig.test.ts rename to airbyte-webapp/src/components/connection/ConnectionForm/formConfig.test.ts diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/formConfig.tsx b/airbyte-webapp/src/components/connection/ConnectionForm/formConfig.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/formConfig.tsx rename to airbyte-webapp/src/components/connection/ConnectionForm/formConfig.tsx diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/refreshSourceSchemaWithConfirmationOnDirty.ts b/airbyte-webapp/src/components/connection/ConnectionForm/refreshSourceSchemaWithConfirmationOnDirty.ts similarity index 100% rename from airbyte-webapp/src/views/Connection/ConnectionForm/components/refreshSourceSchemaWithConfirmationOnDirty.ts rename to airbyte-webapp/src/components/connection/ConnectionForm/refreshSourceSchemaWithConfirmationOnDirty.ts diff --git a/airbyte-webapp/src/components/connection/ConnectionInfoCard/ConnectionInfoCard.test.tsx b/airbyte-webapp/src/components/connection/ConnectionInfoCard/ConnectionInfoCard.test.tsx index a56cd970f55d..62000fd264e9 100644 --- a/airbyte-webapp/src/components/connection/ConnectionInfoCard/ConnectionInfoCard.test.tsx +++ b/airbyte-webapp/src/components/connection/ConnectionInfoCard/ConnectionInfoCard.test.tsx @@ -23,7 +23,7 @@ jest.doMock("services/connector/DestinationDefinitionService", () => ({ useDestinationDefinition: () => mockDestinationDefinitionSpecification, })); -jest.doMock("views/Connection/ConnectionForm/components/refreshSourceSchemaWithConfirmationOnDirty", () => ({ +jest.doMock("components/connection/ConnectionForm/refreshSourceSchemaWithConfirmationOnDirty", () => ({ useRefreshSourceSchemaWithConfirmationOnDirty: jest.fn(), })); diff --git a/airbyte-webapp/src/components/connection/ConnectionInfoCard/SchemaChangesDetected.test.tsx b/airbyte-webapp/src/components/connection/ConnectionInfoCard/SchemaChangesDetected.test.tsx index 28da1d78aa01..ca1e56f33136 100644 --- a/airbyte-webapp/src/components/connection/ConnectionInfoCard/SchemaChangesDetected.test.tsx +++ b/airbyte-webapp/src/components/connection/ConnectionInfoCard/SchemaChangesDetected.test.tsx @@ -17,7 +17,7 @@ jest.doMock("hooks/services/ConnectionEdit/ConnectionEditService", () => ({ const mockUseRefreshSourceSchemaWithConfirmationOnDirty = jest.fn(); -jest.doMock("views/Connection/ConnectionForm/components/refreshSourceSchemaWithConfirmationOnDirty", () => ({ +jest.doMock("components/connection/ConnectionForm/refreshSourceSchemaWithConfirmationOnDirty", () => ({ useRefreshSourceSchemaWithConfirmationOnDirty: mockUseRefreshSourceSchemaWithConfirmationOnDirty, })); diff --git a/airbyte-webapp/src/components/connection/ConnectionInfoCard/SchemaChangesDetected.tsx b/airbyte-webapp/src/components/connection/ConnectionInfoCard/SchemaChangesDetected.tsx index 4b8fd87073ec..a1ab52a9a1a6 100644 --- a/airbyte-webapp/src/components/connection/ConnectionInfoCard/SchemaChangesDetected.tsx +++ b/airbyte-webapp/src/components/connection/ConnectionInfoCard/SchemaChangesDetected.tsx @@ -2,6 +2,7 @@ import classNames from "classnames"; import { FormattedMessage } from "react-intl"; import { useLocation, useNavigate } from "react-router-dom"; +import { useRefreshSourceSchemaWithConfirmationOnDirty } from "components/connection/ConnectionForm/refreshSourceSchemaWithConfirmationOnDirty"; import { Button } from "components/ui/Button"; import { Text } from "components/ui/Text"; @@ -9,7 +10,6 @@ import { useSchemaChanges } from "hooks/connection/useSchemaChanges"; import { useConnectionEditService } from "hooks/services/ConnectionEdit/ConnectionEditService"; import { useFormChangeTrackerService } from "hooks/services/FormChangeTracker"; import { ConnectionRoutePaths } from "pages/connections/types"; -import { useRefreshSourceSchemaWithConfirmationOnDirty } from "views/Connection/ConnectionForm/components/refreshSourceSchemaWithConfirmationOnDirty"; import styles from "./SchemaChangesDetected.module.scss"; diff --git a/airbyte-webapp/src/components/connection/DestinationNamespaceModal/DestinationNamespaceModal.tsx b/airbyte-webapp/src/components/connection/DestinationNamespaceModal/DestinationNamespaceModal.tsx index b4ecbc0d88a1..366a16bbf2b4 100644 --- a/airbyte-webapp/src/components/connection/DestinationNamespaceModal/DestinationNamespaceModal.tsx +++ b/airbyte-webapp/src/components/connection/DestinationNamespaceModal/DestinationNamespaceModal.tsx @@ -4,6 +4,7 @@ import { FormattedMessage, useIntl } from "react-intl"; import * as yup from "yup"; import { LabeledRadioButton } from "components"; +import { FormikConnectionFormValues } from "components/connection/ConnectionForm/formConfig"; import { Button } from "components/ui/Button"; import { Input } from "components/ui/Input"; import { ModalBody, ModalFooter } from "components/ui/Modal"; @@ -11,7 +12,6 @@ import { Text } from "components/ui/Text"; import { NamespaceDefinitionType } from "core/request/AirbyteClient"; import { links } from "utils/links"; -import { FormikConnectionFormValues } from "views/Connection/ConnectionForm/formConfig"; import styles from "./DestinationNamespaceModal.module.scss"; import { ExampleSettingsTable } from "./ExampleSettingsTable"; diff --git a/airbyte-webapp/src/components/connection/DestinationStreamNamesModal/DestinationStreamNamesModal.tsx b/airbyte-webapp/src/components/connection/DestinationStreamNamesModal/DestinationStreamNamesModal.tsx index 5887e2c7e8e2..a06475b9802d 100644 --- a/airbyte-webapp/src/components/connection/DestinationStreamNamesModal/DestinationStreamNamesModal.tsx +++ b/airbyte-webapp/src/components/connection/DestinationStreamNamesModal/DestinationStreamNamesModal.tsx @@ -4,14 +4,13 @@ import { FormattedMessage, useIntl } from "react-intl"; import * as yup from "yup"; import { LabeledRadioButton } from "components"; +import { FormikConnectionFormValues } from "components/connection/ConnectionForm/formConfig"; import { Button } from "components/ui/Button"; import { Input } from "components/ui/Input"; import { ModalBody, ModalFooter } from "components/ui/Modal"; import { Text } from "components/ui/Text"; import { InfoTooltip } from "components/ui/Tooltip"; -import { FormikConnectionFormValues } from "views/Connection/ConnectionForm/formConfig"; - import styles from "./DestinationStreamNamesModal.module.scss"; export const enum StreamNameDefinitionValueType { diff --git a/airbyte-webapp/src/views/Connection/TransformationForm/TransformationForm.module.scss b/airbyte-webapp/src/components/connection/TransformationForm/TransformationForm.module.scss similarity index 100% rename from airbyte-webapp/src/views/Connection/TransformationForm/TransformationForm.module.scss rename to airbyte-webapp/src/components/connection/TransformationForm/TransformationForm.module.scss diff --git a/airbyte-webapp/src/views/Connection/TransformationForm/TransformationForm.tsx b/airbyte-webapp/src/components/connection/TransformationForm/TransformationForm.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/TransformationForm/TransformationForm.tsx rename to airbyte-webapp/src/components/connection/TransformationForm/TransformationForm.tsx diff --git a/airbyte-webapp/src/views/Connection/TransformationForm/index.tsx b/airbyte-webapp/src/components/connection/TransformationForm/index.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/TransformationForm/index.tsx rename to airbyte-webapp/src/components/connection/TransformationForm/index.tsx diff --git a/airbyte-webapp/src/views/Connection/TransformationForm/utils.test.ts b/airbyte-webapp/src/components/connection/TransformationForm/utils.test.ts similarity index 100% rename from airbyte-webapp/src/views/Connection/TransformationForm/utils.test.ts rename to airbyte-webapp/src/components/connection/TransformationForm/utils.test.ts diff --git a/airbyte-webapp/src/views/Connection/TransformationForm/utils.ts b/airbyte-webapp/src/components/connection/TransformationForm/utils.ts similarity index 100% rename from airbyte-webapp/src/views/Connection/TransformationForm/utils.ts rename to airbyte-webapp/src/components/connection/TransformationForm/utils.ts diff --git a/airbyte-webapp/src/views/Connection/CollapsibleCard.module.scss b/airbyte-webapp/src/components/ui/CollapsibleCard/CollapsibleCard.module.scss similarity index 100% rename from airbyte-webapp/src/views/Connection/CollapsibleCard.module.scss rename to airbyte-webapp/src/components/ui/CollapsibleCard/CollapsibleCard.module.scss diff --git a/airbyte-webapp/src/views/Connection/CollapsibleCard.tsx b/airbyte-webapp/src/components/ui/CollapsibleCard/CollapsibleCard.tsx similarity index 100% rename from airbyte-webapp/src/views/Connection/CollapsibleCard.tsx rename to airbyte-webapp/src/components/ui/CollapsibleCard/CollapsibleCard.tsx diff --git a/airbyte-webapp/src/components/ui/CollapsibleCard/index.stories.tsx b/airbyte-webapp/src/components/ui/CollapsibleCard/index.stories.tsx new file mode 100644 index 000000000000..81a1adbd6b23 --- /dev/null +++ b/airbyte-webapp/src/components/ui/CollapsibleCard/index.stories.tsx @@ -0,0 +1,18 @@ +import { ComponentStory, ComponentMeta } from "@storybook/react"; + +import { CollapsibleCard } from "./CollapsibleCard"; + +export default { + title: "UI/CollapsibleCard", + component: CollapsibleCard, +} as ComponentMeta; + +const Template: ComponentStory = (args) => ; + +export const Primary = Template.bind({}); +Primary.args = { + title: "Card Title", + children: "The collapsible content goes here.", + collapsible: true, + defaultCollapsedState: true, +}; diff --git a/airbyte-webapp/src/components/ui/CollapsibleCard/index.ts b/airbyte-webapp/src/components/ui/CollapsibleCard/index.ts new file mode 100644 index 000000000000..ebffc2536e4f --- /dev/null +++ b/airbyte-webapp/src/components/ui/CollapsibleCard/index.ts @@ -0,0 +1 @@ +export * from "./CollapsibleCard"; diff --git a/airbyte-webapp/src/hooks/services/ConnectionForm/ConnectionFormService.tsx b/airbyte-webapp/src/hooks/services/ConnectionForm/ConnectionFormService.tsx index 03e9c25cfa46..6de41a2efe6a 100644 --- a/airbyte-webapp/src/hooks/services/ConnectionForm/ConnectionFormService.tsx +++ b/airbyte-webapp/src/hooks/services/ConnectionForm/ConnectionFormService.tsx @@ -1,6 +1,14 @@ import React, { createContext, useCallback, useContext, useState } from "react"; import { useIntl } from "react-intl"; +import { + ConnectionFormValues, + ConnectionValidationSchema, + FormikConnectionFormValues, + mapFormPropsToOperation, + useInitialValues, +} from "components/connection/ConnectionForm/formConfig"; + import { ConnectionScheduleType, DestinationDefinitionRead, @@ -12,13 +20,6 @@ import { useNewTableDesignExperiment } from "hooks/connection/useNewTableDesignE import { useDestinationDefinition } from "services/connector/DestinationDefinitionService"; import { useGetDestinationDefinitionSpecification } from "services/connector/DestinationDefinitionSpecificationService"; import { FormError, generateMessageFromError } from "utils/errorStatusMessage"; -import { - ConnectionFormValues, - FormikConnectionFormValues, - mapFormPropsToOperation, - useInitialValues, - ConnectionValidationSchema, -} from "views/Connection/ConnectionForm/formConfig"; import { useUniqueFormId } from "../FormChangeTracker"; import { ValuesProps } from "../useConnectionHook"; diff --git a/airbyte-webapp/src/pages/connections/ConnectionReplicationPage/ConnectionReplicationPage.tsx b/airbyte-webapp/src/pages/connections/ConnectionReplicationPage/ConnectionReplicationPage.tsx index bc80f7252cee..f03a3e21fb90 100644 --- a/airbyte-webapp/src/pages/connections/ConnectionReplicationPage/ConnectionReplicationPage.tsx +++ b/airbyte-webapp/src/pages/connections/ConnectionReplicationPage/ConnectionReplicationPage.tsx @@ -3,6 +3,13 @@ import React, { useCallback, useEffect, useState } from "react"; import { FormattedMessage, useIntl } from "react-intl"; import { useUnmount } from "react-use"; +import { ConnectionFormFields } from "components/connection/ConnectionForm/ConnectionFormFields"; +import EditControls from "components/connection/ConnectionForm/EditControls"; +import { + FormikConnectionFormValues, + useConnectionValidationSchema, +} from "components/connection/ConnectionForm/formConfig"; +import { SchemaChangeBackdrop } from "components/connection/ConnectionForm/SchemaChangeBackdrop"; import { SchemaError } from "components/CreateConnection/SchemaError"; import LoadingSchema from "components/LoadingSchema"; @@ -20,10 +27,6 @@ import { useModalService } from "hooks/services/Modal"; import { useConnectionService, ValuesProps } from "hooks/services/useConnectionHook"; import { useCurrentWorkspaceId } from "services/workspaces/WorkspacesService"; import { equal } from "utils/objects"; -import EditControls from "views/Connection/ConnectionForm/components/EditControls"; -import { SchemaChangeBackdrop } from "views/Connection/ConnectionForm/components/SchemaChangeBackdrop"; -import { ConnectionFormFields } from "views/Connection/ConnectionForm/ConnectionFormFields"; -import { useConnectionValidationSchema, FormikConnectionFormValues } from "views/Connection/ConnectionForm/formConfig"; import styles from "./ConnectionReplicationPage.module.scss"; import { ResetWarningModal } from "./ResetWarningModal"; diff --git a/airbyte-webapp/src/pages/connections/ConnectionTransformationPage/ConnectionTransformationPage.tsx b/airbyte-webapp/src/pages/connections/ConnectionTransformationPage/ConnectionTransformationPage.tsx index 9c07a336c909..3d8ed7a50b57 100644 --- a/airbyte-webapp/src/pages/connections/ConnectionTransformationPage/ConnectionTransformationPage.tsx +++ b/airbyte-webapp/src/pages/connections/ConnectionTransformationPage/ConnectionTransformationPage.tsx @@ -1,6 +1,11 @@ import React from "react"; import { FormattedMessage } from "react-intl"; +import { + getInitialNormalization, + getInitialTransformations, + mapFormPropsToOperation, +} from "components/connection/ConnectionForm/formConfig"; import { Card } from "components/ui/Card"; import { Text } from "components/ui/Text"; @@ -13,11 +18,6 @@ import { FeatureItem, useFeature } from "hooks/services/Feature"; import { useCurrentWorkspace } from "hooks/services/useWorkspace"; import { useDestinationDefinition } from "services/connector/DestinationDefinitionService"; import { FormikOnSubmit } from "types/formik"; -import { - getInitialNormalization, - getInitialTransformations, - mapFormPropsToOperation, -} from "views/Connection/ConnectionForm/formConfig"; import styles from "./ConnectionTransformationPage.module.scss"; import { CustomTransformationsCard } from "./CustomTransformationsCard"; diff --git a/airbyte-webapp/src/pages/connections/ConnectionTransformationPage/CustomTransformationsCard.tsx b/airbyte-webapp/src/pages/connections/ConnectionTransformationPage/CustomTransformationsCard.tsx index 21d4d79edd36..0b8a0b8455f3 100644 --- a/airbyte-webapp/src/pages/connections/ConnectionTransformationPage/CustomTransformationsCard.tsx +++ b/airbyte-webapp/src/pages/connections/ConnectionTransformationPage/CustomTransformationsCard.tsx @@ -3,12 +3,13 @@ import React, { useMemo } from "react"; import { FormattedMessage } from "react-intl"; import { useToggle } from "react-use"; +import { ConnectionEditFormCard } from "components/connection/ConnectionEditFormCard"; +import { getInitialTransformations } from "components/connection/ConnectionForm/formConfig"; +import { TransformationField } from "components/connection/ConnectionForm/TransformationField"; + import { OperationCreate, OperationRead } from "core/request/AirbyteClient"; import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService"; import { FormikOnSubmit } from "types/formik"; -import { TransformationField } from "views/Connection/ConnectionForm/components/TransformationField"; -import { getInitialTransformations } from "views/Connection/ConnectionForm/formConfig"; -import { FormCard } from "views/Connection/FormCard"; export const CustomTransformationsCard: React.FC<{ operations?: OperationCreate[]; @@ -24,7 +25,7 @@ export const CustomTransformationsCard: React.FC<{ ); return ( - + title={} collapsible bottomSeparator @@ -45,6 +46,6 @@ export const CustomTransformationsCard: React.FC<{ /> )} - + ); }; diff --git a/airbyte-webapp/src/pages/connections/ConnectionTransformationPage/NormalizationCard.tsx b/airbyte-webapp/src/pages/connections/ConnectionTransformationPage/NormalizationCard.tsx index 13d50871783d..af02a36015ae 100644 --- a/airbyte-webapp/src/pages/connections/ConnectionTransformationPage/NormalizationCard.tsx +++ b/airbyte-webapp/src/pages/connections/ConnectionTransformationPage/NormalizationCard.tsx @@ -2,13 +2,14 @@ import { Field } from "formik"; import { useMemo } from "react"; import { FormattedMessage } from "react-intl"; +import { ConnectionEditFormCard } from "components/connection/ConnectionEditFormCard"; +import { getInitialNormalization } from "components/connection/ConnectionForm/formConfig"; +import { NormalizationField } from "components/connection/ConnectionForm/NormalizationField"; + import { NormalizationType } from "core/domain/connection"; import { OperationRead } from "core/request/AirbyteClient"; import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService"; import { FormikOnSubmit } from "types/formik"; -import { NormalizationField } from "views/Connection/ConnectionForm/components/NormalizationField"; -import { getInitialNormalization } from "views/Connection/ConnectionForm/formConfig"; -import { FormCard } from "views/Connection/FormCard"; export const NormalizationCard: React.FC<{ operations?: OperationRead[]; @@ -23,7 +24,7 @@ export const NormalizationCard: React.FC<{ ); return ( - + form={{ initialValues, onSubmit, @@ -32,6 +33,6 @@ export const NormalizationCard: React.FC<{ collapsible > - + ); }; diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/ScheduleField/index.ts b/airbyte-webapp/src/views/Connection/ConnectionForm/ScheduleField/index.ts deleted file mode 100644 index ffc2c4463776..000000000000 --- a/airbyte-webapp/src/views/Connection/ConnectionForm/ScheduleField/index.ts +++ /dev/null @@ -1 +0,0 @@ -export { ScheduleField } from "./ScheduleField"; diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/NamespaceDefinitionField.module.scss b/airbyte-webapp/src/views/Connection/ConnectionForm/components/NamespaceDefinitionField.module.scss deleted file mode 100644 index 7fd4485ab708..000000000000 --- a/airbyte-webapp/src/views/Connection/ConnectionForm/components/NamespaceDefinitionField.module.scss +++ /dev/null @@ -1 +0,0 @@ -@forward "../ConnectionFormFields.module.scss"; From be0f6f51bac7af0d57085af589d963d3a458cead Mon Sep 17 00:00:00 2001 From: Edmundo Ruiz Ghanem Date: Fri, 6 Jan 2023 17:07:51 -0500 Subject: [PATCH 2/3] Move CreateConnection to components/connection --- .../CreateConnection/CreateConnectionNameField.module.scss | 1 - .../CreateConnection/CreateConnectionForm.module.scss | 2 +- .../CreateConnection/CreateConnectionForm.test.tsx | 0 .../{ => connection}/CreateConnection/CreateConnectionForm.tsx | 0 .../CreateConnection/CreateConnectionNameField.module.scss | 1 + .../CreateConnection/CreateConnectionNameField.tsx | 0 .../{ => connection}/CreateConnection/DataResidency.module.scss | 0 .../{ => connection}/CreateConnection/DataResidency.tsx | 0 .../{ => connection}/CreateConnection/SchemaError.tsx | 0 .../CreateConnection/TryAfterErrorBlock.module.scss | 2 +- .../{ => connection}/CreateConnection/TryAfterErrorBlock.tsx | 0 .../__snapshots__/CreateConnectionForm.test.tsx.snap | 0 .../src/components/{ => connection}/CreateConnection/index.tsx | 0 .../ConnectionReplicationPage/ConnectionReplicationPage.tsx | 2 +- .../connections/CreateConnectionPage/CreateConnectionPage.tsx | 2 +- 15 files changed, 5 insertions(+), 5 deletions(-) delete mode 100644 airbyte-webapp/src/components/CreateConnection/CreateConnectionNameField.module.scss rename airbyte-webapp/src/components/{ => connection}/CreateConnection/CreateConnectionForm.module.scss (85%) rename airbyte-webapp/src/components/{ => connection}/CreateConnection/CreateConnectionForm.test.tsx (100%) rename airbyte-webapp/src/components/{ => connection}/CreateConnection/CreateConnectionForm.tsx (100%) create mode 100644 airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionNameField.module.scss rename airbyte-webapp/src/components/{ => connection}/CreateConnection/CreateConnectionNameField.tsx (100%) rename airbyte-webapp/src/components/{ => connection}/CreateConnection/DataResidency.module.scss (100%) rename airbyte-webapp/src/components/{ => connection}/CreateConnection/DataResidency.tsx (100%) rename airbyte-webapp/src/components/{ => connection}/CreateConnection/SchemaError.tsx (100%) rename airbyte-webapp/src/components/{ => connection}/CreateConnection/TryAfterErrorBlock.module.scss (85%) rename airbyte-webapp/src/components/{ => connection}/CreateConnection/TryAfterErrorBlock.tsx (100%) rename airbyte-webapp/src/components/{ => connection}/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap (100%) rename airbyte-webapp/src/components/{ => connection}/CreateConnection/index.tsx (100%) diff --git a/airbyte-webapp/src/components/CreateConnection/CreateConnectionNameField.module.scss b/airbyte-webapp/src/components/CreateConnection/CreateConnectionNameField.module.scss deleted file mode 100644 index d04462968a89..000000000000 --- a/airbyte-webapp/src/components/CreateConnection/CreateConnectionNameField.module.scss +++ /dev/null @@ -1 +0,0 @@ -@forward "../connection/ConnectionForm/ConnectionFormFields.module.scss"; diff --git a/airbyte-webapp/src/components/CreateConnection/CreateConnectionForm.module.scss b/airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionForm.module.scss similarity index 85% rename from airbyte-webapp/src/components/CreateConnection/CreateConnectionForm.module.scss rename to airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionForm.module.scss index 982150eae326..8d254efe4067 100644 --- a/airbyte-webapp/src/components/CreateConnection/CreateConnectionForm.module.scss +++ b/airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionForm.module.scss @@ -1,4 +1,4 @@ -@use "../../scss/variables"; +@use "scss/variables"; .connectionFormContainer { width: 100%; diff --git a/airbyte-webapp/src/components/CreateConnection/CreateConnectionForm.test.tsx b/airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionForm.test.tsx similarity index 100% rename from airbyte-webapp/src/components/CreateConnection/CreateConnectionForm.test.tsx rename to airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionForm.test.tsx diff --git a/airbyte-webapp/src/components/CreateConnection/CreateConnectionForm.tsx b/airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionForm.tsx similarity index 100% rename from airbyte-webapp/src/components/CreateConnection/CreateConnectionForm.tsx rename to airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionForm.tsx diff --git a/airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionNameField.module.scss b/airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionNameField.module.scss new file mode 100644 index 000000000000..778ee0f73345 --- /dev/null +++ b/airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionNameField.module.scss @@ -0,0 +1 @@ +@forward "../ConnectionForm/ConnectionFormFields.module.scss"; diff --git a/airbyte-webapp/src/components/CreateConnection/CreateConnectionNameField.tsx b/airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionNameField.tsx similarity index 100% rename from airbyte-webapp/src/components/CreateConnection/CreateConnectionNameField.tsx rename to airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionNameField.tsx diff --git a/airbyte-webapp/src/components/CreateConnection/DataResidency.module.scss b/airbyte-webapp/src/components/connection/CreateConnection/DataResidency.module.scss similarity index 100% rename from airbyte-webapp/src/components/CreateConnection/DataResidency.module.scss rename to airbyte-webapp/src/components/connection/CreateConnection/DataResidency.module.scss diff --git a/airbyte-webapp/src/components/CreateConnection/DataResidency.tsx b/airbyte-webapp/src/components/connection/CreateConnection/DataResidency.tsx similarity index 100% rename from airbyte-webapp/src/components/CreateConnection/DataResidency.tsx rename to airbyte-webapp/src/components/connection/CreateConnection/DataResidency.tsx diff --git a/airbyte-webapp/src/components/CreateConnection/SchemaError.tsx b/airbyte-webapp/src/components/connection/CreateConnection/SchemaError.tsx similarity index 100% rename from airbyte-webapp/src/components/CreateConnection/SchemaError.tsx rename to airbyte-webapp/src/components/connection/CreateConnection/SchemaError.tsx diff --git a/airbyte-webapp/src/components/CreateConnection/TryAfterErrorBlock.module.scss b/airbyte-webapp/src/components/connection/CreateConnection/TryAfterErrorBlock.module.scss similarity index 85% rename from airbyte-webapp/src/components/CreateConnection/TryAfterErrorBlock.module.scss rename to airbyte-webapp/src/components/connection/CreateConnection/TryAfterErrorBlock.module.scss index fae2399b7e23..f278fc269bf8 100644 --- a/airbyte-webapp/src/components/CreateConnection/TryAfterErrorBlock.module.scss +++ b/airbyte-webapp/src/components/connection/CreateConnection/TryAfterErrorBlock.module.scss @@ -1,4 +1,4 @@ -@use "../../scss/variables"; +@use "scss/variables"; .container { padding: 40px; diff --git a/airbyte-webapp/src/components/CreateConnection/TryAfterErrorBlock.tsx b/airbyte-webapp/src/components/connection/CreateConnection/TryAfterErrorBlock.tsx similarity index 100% rename from airbyte-webapp/src/components/CreateConnection/TryAfterErrorBlock.tsx rename to airbyte-webapp/src/components/connection/CreateConnection/TryAfterErrorBlock.tsx diff --git a/airbyte-webapp/src/components/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap b/airbyte-webapp/src/components/connection/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap similarity index 100% rename from airbyte-webapp/src/components/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap rename to airbyte-webapp/src/components/connection/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap diff --git a/airbyte-webapp/src/components/CreateConnection/index.tsx b/airbyte-webapp/src/components/connection/CreateConnection/index.tsx similarity index 100% rename from airbyte-webapp/src/components/CreateConnection/index.tsx rename to airbyte-webapp/src/components/connection/CreateConnection/index.tsx diff --git a/airbyte-webapp/src/pages/connections/ConnectionReplicationPage/ConnectionReplicationPage.tsx b/airbyte-webapp/src/pages/connections/ConnectionReplicationPage/ConnectionReplicationPage.tsx index f03a3e21fb90..b158c314581c 100644 --- a/airbyte-webapp/src/pages/connections/ConnectionReplicationPage/ConnectionReplicationPage.tsx +++ b/airbyte-webapp/src/pages/connections/ConnectionReplicationPage/ConnectionReplicationPage.tsx @@ -10,7 +10,7 @@ import { useConnectionValidationSchema, } from "components/connection/ConnectionForm/formConfig"; import { SchemaChangeBackdrop } from "components/connection/ConnectionForm/SchemaChangeBackdrop"; -import { SchemaError } from "components/CreateConnection/SchemaError"; +import { SchemaError } from "components/connection/CreateConnection/SchemaError"; import LoadingSchema from "components/LoadingSchema"; import { Action, Namespace } from "core/analytics"; diff --git a/airbyte-webapp/src/pages/connections/CreateConnectionPage/CreateConnectionPage.tsx b/airbyte-webapp/src/pages/connections/CreateConnectionPage/CreateConnectionPage.tsx index d66cb375bfe6..bd91abd78b7d 100644 --- a/airbyte-webapp/src/pages/connections/CreateConnectionPage/CreateConnectionPage.tsx +++ b/airbyte-webapp/src/pages/connections/CreateConnectionPage/CreateConnectionPage.tsx @@ -6,8 +6,8 @@ import { LoadingPage } from "components"; import { CloudInviteUsersHint } from "components/CloudInviteUsersHint"; import { HeadTitle } from "components/common/HeadTitle"; import { ConnectionBlock } from "components/connection/ConnectionBlock"; +import { CreateConnectionForm } from "components/connection/CreateConnection/CreateConnectionForm"; import { FormPageContent } from "components/ConnectorBlocks"; -import { CreateConnectionForm } from "components/CreateConnection/CreateConnectionForm"; import { PageHeader } from "components/ui/PageHeader"; import { StepsIndicator } from "components/ui/StepsIndicator"; From c05d70285a59539542186addb07c6364205cb099 Mon Sep 17 00:00:00 2001 From: Edmundo Ruiz Ghanem Date: Thu, 12 Jan 2023 10:33:58 -0500 Subject: [PATCH 3/3] CreateConnection -> CreateConnectionForm --- .../CreateConnectionForm.module.scss | 0 .../CreateConnectionForm.test.tsx | 0 .../CreateConnectionForm.tsx | 0 .../CreateConnectionNameField.module.scss | 0 .../CreateConnectionNameField.tsx | 0 .../DataResidency.module.scss | 0 .../DataResidency.tsx | 0 .../{CreateConnection => CreateConnectionForm}/SchemaError.tsx | 0 .../TryAfterErrorBlock.module.scss | 0 .../TryAfterErrorBlock.tsx | 0 .../__snapshots__/CreateConnectionForm.test.tsx.snap | 0 .../{CreateConnection => CreateConnectionForm}/index.tsx | 0 .../ConnectionReplicationPage/ConnectionReplicationPage.tsx | 2 +- .../connections/CreateConnectionPage/CreateConnectionPage.tsx | 2 +- 14 files changed, 2 insertions(+), 2 deletions(-) rename airbyte-webapp/src/components/connection/{CreateConnection => CreateConnectionForm}/CreateConnectionForm.module.scss (100%) rename airbyte-webapp/src/components/connection/{CreateConnection => CreateConnectionForm}/CreateConnectionForm.test.tsx (100%) rename airbyte-webapp/src/components/connection/{CreateConnection => CreateConnectionForm}/CreateConnectionForm.tsx (100%) rename airbyte-webapp/src/components/connection/{CreateConnection => CreateConnectionForm}/CreateConnectionNameField.module.scss (100%) rename airbyte-webapp/src/components/connection/{CreateConnection => CreateConnectionForm}/CreateConnectionNameField.tsx (100%) rename airbyte-webapp/src/components/connection/{CreateConnection => CreateConnectionForm}/DataResidency.module.scss (100%) rename airbyte-webapp/src/components/connection/{CreateConnection => CreateConnectionForm}/DataResidency.tsx (100%) rename airbyte-webapp/src/components/connection/{CreateConnection => CreateConnectionForm}/SchemaError.tsx (100%) rename airbyte-webapp/src/components/connection/{CreateConnection => CreateConnectionForm}/TryAfterErrorBlock.module.scss (100%) rename airbyte-webapp/src/components/connection/{CreateConnection => CreateConnectionForm}/TryAfterErrorBlock.tsx (100%) rename airbyte-webapp/src/components/connection/{CreateConnection => CreateConnectionForm}/__snapshots__/CreateConnectionForm.test.tsx.snap (100%) rename airbyte-webapp/src/components/connection/{CreateConnection => CreateConnectionForm}/index.tsx (100%) diff --git a/airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionForm.module.scss b/airbyte-webapp/src/components/connection/CreateConnectionForm/CreateConnectionForm.module.scss similarity index 100% rename from airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionForm.module.scss rename to airbyte-webapp/src/components/connection/CreateConnectionForm/CreateConnectionForm.module.scss diff --git a/airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionForm.test.tsx b/airbyte-webapp/src/components/connection/CreateConnectionForm/CreateConnectionForm.test.tsx similarity index 100% rename from airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionForm.test.tsx rename to airbyte-webapp/src/components/connection/CreateConnectionForm/CreateConnectionForm.test.tsx diff --git a/airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionForm.tsx b/airbyte-webapp/src/components/connection/CreateConnectionForm/CreateConnectionForm.tsx similarity index 100% rename from airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionForm.tsx rename to airbyte-webapp/src/components/connection/CreateConnectionForm/CreateConnectionForm.tsx diff --git a/airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionNameField.module.scss b/airbyte-webapp/src/components/connection/CreateConnectionForm/CreateConnectionNameField.module.scss similarity index 100% rename from airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionNameField.module.scss rename to airbyte-webapp/src/components/connection/CreateConnectionForm/CreateConnectionNameField.module.scss diff --git a/airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionNameField.tsx b/airbyte-webapp/src/components/connection/CreateConnectionForm/CreateConnectionNameField.tsx similarity index 100% rename from airbyte-webapp/src/components/connection/CreateConnection/CreateConnectionNameField.tsx rename to airbyte-webapp/src/components/connection/CreateConnectionForm/CreateConnectionNameField.tsx diff --git a/airbyte-webapp/src/components/connection/CreateConnection/DataResidency.module.scss b/airbyte-webapp/src/components/connection/CreateConnectionForm/DataResidency.module.scss similarity index 100% rename from airbyte-webapp/src/components/connection/CreateConnection/DataResidency.module.scss rename to airbyte-webapp/src/components/connection/CreateConnectionForm/DataResidency.module.scss diff --git a/airbyte-webapp/src/components/connection/CreateConnection/DataResidency.tsx b/airbyte-webapp/src/components/connection/CreateConnectionForm/DataResidency.tsx similarity index 100% rename from airbyte-webapp/src/components/connection/CreateConnection/DataResidency.tsx rename to airbyte-webapp/src/components/connection/CreateConnectionForm/DataResidency.tsx diff --git a/airbyte-webapp/src/components/connection/CreateConnection/SchemaError.tsx b/airbyte-webapp/src/components/connection/CreateConnectionForm/SchemaError.tsx similarity index 100% rename from airbyte-webapp/src/components/connection/CreateConnection/SchemaError.tsx rename to airbyte-webapp/src/components/connection/CreateConnectionForm/SchemaError.tsx diff --git a/airbyte-webapp/src/components/connection/CreateConnection/TryAfterErrorBlock.module.scss b/airbyte-webapp/src/components/connection/CreateConnectionForm/TryAfterErrorBlock.module.scss similarity index 100% rename from airbyte-webapp/src/components/connection/CreateConnection/TryAfterErrorBlock.module.scss rename to airbyte-webapp/src/components/connection/CreateConnectionForm/TryAfterErrorBlock.module.scss diff --git a/airbyte-webapp/src/components/connection/CreateConnection/TryAfterErrorBlock.tsx b/airbyte-webapp/src/components/connection/CreateConnectionForm/TryAfterErrorBlock.tsx similarity index 100% rename from airbyte-webapp/src/components/connection/CreateConnection/TryAfterErrorBlock.tsx rename to airbyte-webapp/src/components/connection/CreateConnectionForm/TryAfterErrorBlock.tsx diff --git a/airbyte-webapp/src/components/connection/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap b/airbyte-webapp/src/components/connection/CreateConnectionForm/__snapshots__/CreateConnectionForm.test.tsx.snap similarity index 100% rename from airbyte-webapp/src/components/connection/CreateConnection/__snapshots__/CreateConnectionForm.test.tsx.snap rename to airbyte-webapp/src/components/connection/CreateConnectionForm/__snapshots__/CreateConnectionForm.test.tsx.snap diff --git a/airbyte-webapp/src/components/connection/CreateConnection/index.tsx b/airbyte-webapp/src/components/connection/CreateConnectionForm/index.tsx similarity index 100% rename from airbyte-webapp/src/components/connection/CreateConnection/index.tsx rename to airbyte-webapp/src/components/connection/CreateConnectionForm/index.tsx diff --git a/airbyte-webapp/src/pages/connections/ConnectionReplicationPage/ConnectionReplicationPage.tsx b/airbyte-webapp/src/pages/connections/ConnectionReplicationPage/ConnectionReplicationPage.tsx index b158c314581c..d81c0d173bcf 100644 --- a/airbyte-webapp/src/pages/connections/ConnectionReplicationPage/ConnectionReplicationPage.tsx +++ b/airbyte-webapp/src/pages/connections/ConnectionReplicationPage/ConnectionReplicationPage.tsx @@ -10,7 +10,7 @@ import { useConnectionValidationSchema, } from "components/connection/ConnectionForm/formConfig"; import { SchemaChangeBackdrop } from "components/connection/ConnectionForm/SchemaChangeBackdrop"; -import { SchemaError } from "components/connection/CreateConnection/SchemaError"; +import { SchemaError } from "components/connection/CreateConnectionForm/SchemaError"; import LoadingSchema from "components/LoadingSchema"; import { Action, Namespace } from "core/analytics"; diff --git a/airbyte-webapp/src/pages/connections/CreateConnectionPage/CreateConnectionPage.tsx b/airbyte-webapp/src/pages/connections/CreateConnectionPage/CreateConnectionPage.tsx index bd91abd78b7d..eb17fae00aaf 100644 --- a/airbyte-webapp/src/pages/connections/CreateConnectionPage/CreateConnectionPage.tsx +++ b/airbyte-webapp/src/pages/connections/CreateConnectionPage/CreateConnectionPage.tsx @@ -6,7 +6,7 @@ import { LoadingPage } from "components"; import { CloudInviteUsersHint } from "components/CloudInviteUsersHint"; import { HeadTitle } from "components/common/HeadTitle"; import { ConnectionBlock } from "components/connection/ConnectionBlock"; -import { CreateConnectionForm } from "components/connection/CreateConnection/CreateConnectionForm"; +import { CreateConnectionForm } from "components/connection/CreateConnectionForm"; import { FormPageContent } from "components/ConnectorBlocks"; import { PageHeader } from "components/ui/PageHeader"; import { StepsIndicator } from "components/ui/StepsIndicator";