Skip to content
This repository was archived by the owner on Feb 16, 2023. It is now read-only.

Commit 66977c8

Browse files
dizel852Jordan Scott
authored andcommitted
Fixed reverted PR: Choose optimal sync modes by default on UI (airbytehq#12770)
* Revert "Revert "Choose optimal sync modes by default on UI (airbytehq#12411)" (airbytehq#12583)" This reverts commit 9789ffd. * get optimal sync mode only in creation mode * sort sync mode options by priority * add tests for calculateInitialCatalog * remove duplicated tests * fixed one-line 'if' * move calculationInitialCatalog function to file and export it as default * - fix merge conflicts - fix Type * update tests
1 parent d0c6d02 commit 66977c8

File tree

7 files changed

+524
-64
lines changed

7 files changed

+524
-64
lines changed

airbyte-webapp/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
"start": "react-scripts start",
1010
"build": "react-scripts build",
1111
"test": "react-scripts test",
12+
"test:coverage": "npm test -- --coverage --watchAll=false",
1213
"format": "prettier --write 'src/**/*.{ts,tsx}'",
1314
"storybook": "start-storybook -p 9009 -s public --quiet",
1415
"lint": "eslint --ext js,ts,tsx src",

airbyte-webapp/src/pages/ConnectionPage/pages/ConnectionItemPage/components/TransformationView.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,15 @@ const NoSupportedTransformationCard = styled(ContentCard)`
5050
`;
5151

5252
const CustomTransformationsCard: React.FC<{
53-
operations?: OperationRead[];
53+
operations?: OperationCreate[];
5454
onSubmit: FormikOnSubmit<{ transformations?: OperationRead[] }>;
5555
mode: ConnectionFormMode;
5656
}> = ({ operations, onSubmit, mode }) => {
5757
const defaultTransformation = useDefaultTransformation();
5858

5959
const initialValues = useMemo(
6060
() => ({
61-
transformations: getInitialTransformations(operations),
61+
transformations: getInitialTransformations(operations || []),
6262
}),
6363
[operations]
6464
);

airbyte-webapp/src/views/Connection/CatalogTree/CatalogSection.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ import { flatten, getPathType } from "./utils";
2626
const Section = styled.div<{ error?: boolean; isSelected: boolean }>`
2727
border: 1px solid ${(props) => (props.error ? props.theme.dangerColor : "none")};
2828
background: ${({ theme, isSelected }) => (isSelected ? "rgba(97, 94, 255, 0.1);" : theme.greyColor0)};
29+
padding: 2px;
2930
3031
&:first-child {
3132
border-radius: 8px 8px 0 0;

airbyte-webapp/src/views/Connection/CatalogTree/StreamFieldTable.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export const StreamFieldTable: React.FC<StreamFieldTableProps> = (props) => {
3939
</TreeRowWrapper>
4040
<RowsContainer>
4141
{props.syncSchemaFields.map((field) => (
42-
<TreeRowWrapper depth={1} key={field.key}>
42+
<TreeRowWrapper depth={1} key={pathDisplayName(field.path)}>
4343
<FieldRow
4444
path={field.path}
4545
name={pathDisplayName(field.path)}

0 commit comments

Comments
 (0)