diff --git a/airbyte-webapp/src/components/SimpleTableComponents/SimpleTableComponents.tsx b/airbyte-webapp/src/components/SimpleTableComponents/SimpleTableComponents.tsx index 041c8fa5a51f..0d48be623415 100644 --- a/airbyte-webapp/src/components/SimpleTableComponents/SimpleTableComponents.tsx +++ b/airbyte-webapp/src/components/SimpleTableComponents/SimpleTableComponents.tsx @@ -27,9 +27,12 @@ export const Cell = styled.div<{ light?: boolean; lighter?: boolean; ellipsis?: boolean; + flush?: boolean; }>` flex: ${({ flex }) => flex || 1} 0 0; - padding-right: 10px; + padding-right: ${({ flush }) => (flush ? 0 : 10)}px; + min-width: 0; + word-break: break-word; color: ${({ theme, light, lighter }) => (light ? theme.greyColor40 : lighter ? theme.greyColor60 : "inherit")}; font-weight: ${({ light, lighter }) => (light || lighter ? "normal" : "inherit")}; diff --git a/airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeSearch.module.scss b/airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeSearch.module.scss index 769dd3277747..11c394072b8d 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeSearch.module.scss +++ b/airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeSearch.module.scss @@ -1,3 +1,5 @@ +@use "scss/_variables"; + .searchInput { padding: 10px 8px 9px; } @@ -5,6 +7,7 @@ .searchContent { position: relative; width: 100%; + padding: 0 variables.$spacing-xl; &::before { content: attr(data-content); diff --git a/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableHeader.module.scss b/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableHeader.module.scss new file mode 100644 index 000000000000..6becb2f758c4 --- /dev/null +++ b/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableHeader.module.scss @@ -0,0 +1,29 @@ +@use "scss/_colors"; +@use "scss/_variables"; + +.cellText { + color: colors.$grey; +} + +.headerContainer { + margin: variables.$spacing-md variables.$spacing-md variables.$spacing-sm variables.$spacing-sm; + gap: variables.$spacing-sm; + overflow: hidden; + scrollbar-gutter: stable; + min-height: 33px; +} + +.checkboxCell { + margin-right: variables.$spacing-sm; + max-width: 43px; + font-size: 10px; + line-height: 13px; + display: flex; + flex-direction: row; + justify-content: flex-end; + padding-left: calc(#{variables.$spacing-xl} + #{variables.$spacing-sm}); +} + +.arrowPlaceholder { + width: 20px; +} diff --git a/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableHeader.tsx b/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableHeader.tsx index 2d3f11682aab..9d7991df24fa 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableHeader.tsx +++ b/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableHeader.tsx @@ -1,20 +1,34 @@ +import React from "react"; import { FormattedMessage } from "react-intl"; import { Cell, Header } from "components/SimpleTableComponents"; import { CheckBox } from "components/ui/CheckBox"; +import { Text } from "components/ui/Text"; import { InfoTooltip, TooltipLearnMoreLink } from "components/ui/Tooltip"; import { useBulkEditService } from "hooks/services/BulkEdit/BulkEditService"; import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService"; import { links } from "utils/links"; +import styles from "./CatalogTreeTableHeader.module.scss"; + +const TextCell: React.FC> = ({ flex, children }) => { + return ( + + + {children} + + + ); +}; + export const CatalogTreeTableHeader: React.FC = () => { const { mode } = useConnectionFormService(); const { onCheckAll, selectedBatchNodeIds, allChecked } = useBulkEditService(); return ( -
- +
+
{mode !== "readonly" && ( { checked={allChecked} /> )} - - +
+ - - + + {/* - - + */} + - - + + - - + + - - + + - - + + - - - + +
+ - - + + - - - - - - - - +
); }; diff --git a/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableRow.module.scss b/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableRow.module.scss index 557907278af4..0531cbaa8be5 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableRow.module.scss +++ b/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableRow.module.scss @@ -17,6 +17,15 @@ .streamHeaderContent { background: colors.$white; border-bottom: 1px solid colors.$grey-50; + padding-right: variables.$spacing-md; + padding-left: variables.$spacing-sm; + margin-bottom: 1px; + gap: variables.$spacing-sm; + min-height: 50px; + height: 50px; + align-items: center; + overflow-y: auto; + scrollbar-gutter: stable; &:hover { background: colors.$grey-30; @@ -38,11 +47,35 @@ &.selected { background-color: colors.$blue-transparent; } + + &.disabled { + background-color: colors.$grey-50; + } } .streamRowCheckboxCell { + margin-right: variables.$spacing-sm; + max-width: 43px; + text-align: center; + font-size: 10px; + line-height: 13px; display: flex; flex-direction: row; justify-content: flex-end; - padding-left: 27px; + padding-left: calc(#{variables.$spacing-xl} + #{variables.$spacing-sm}); +} + +.arrowCell { + width: 20px; +} + +.cellText { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.syncModeCell { + width: variables.$width-wide-menu; + min-width: variables.$width-wide-menu; } diff --git a/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableRow.tsx b/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableRow.tsx index def9f02938b2..16708cd44184 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableRow.tsx +++ b/airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableRow.tsx @@ -7,15 +7,14 @@ import { FormattedMessage } from "react-intl"; import { Cell, Row } from "components/SimpleTableComponents"; import { CheckBox } from "components/ui/CheckBox"; import { Switch } from "components/ui/Switch"; +import { Text } from "components/ui/Text"; import { useBulkEditSelect } from "hooks/services/BulkEdit/BulkEditService"; import { StreamHeaderProps } from "../StreamHeader"; -import { HeaderCell } from "../styles"; import styles from "./CatalogTreeTableRow.module.scss"; import { StreamPathSelect } from "./StreamPathSelect"; import { SyncModeSelect } from "./SyncModeSelect"; - export const CatalogTreeTableRow: React.FC = ({ stream, destName, @@ -35,7 +34,7 @@ export const CatalogTreeTableRow: React.FC = ({ hasError, disabled, }) => { - const { primaryKey, syncMode, cursorField, destinationSyncMode } = stream.config ?? {}; + const { primaryKey, cursorField, syncMode, destinationSyncMode } = stream.config ?? {}; const isStreamEnabled = stream.config?.selected; const { defaultCursorField } = stream.stream ?? {}; @@ -63,14 +62,13 @@ export const CatalogTreeTableRow: React.FC = ({ [styles.disabledChange]: changedSelected && !isStreamEnabled, [styles.selected]: isSelected, [styles.error]: hasError, + [styles.disabled]: !changedSelected && !isStreamEnabled, }); - const checkboxCellCustomStyle = classnames(styles.checkboxCell, styles.streamRowCheckboxCell); - return ( {!disabled && ( -
+
{changedSelected && (
{isStreamEnabled ? ( @@ -83,24 +81,33 @@ export const CatalogTreeTableRow: React.FC = ({
)} - + - {fieldCount} - - {stream.stream?.namespace || } - - {stream.stream?.name} - + {/* {fieldCount} */} + + + {stream.stream?.namespace || } + + + + + {stream.stream?.name} + + +
{disabled ? ( - - {syncSchema.syncMode} - + + + {syncSchema.syncMode} + + ) : ( + // todo: SyncModeSelect should probably have a Tooltip, append/dedupe ends up ellipsing )} - - +
+ {cursorType && ( = ({ onPathChange={onCursorChange} /> )} - - + + {pkType && ( = ({ onPathChange={onPrimaryKeyChange} /> )} - - - - - {destNamespace} - - - {destName} - - - {disabled ? ( - - {syncSchema.destinationSyncMode} - - ) : ( - // TODO: Replace with Dropdown/Popout - syncSchema.destinationSyncMode - )} + + + + {destNamespace} + + + + + {destName} + ); diff --git a/airbyte-webapp/src/components/connection/CatalogTree/next/StreamConnectionHeader.module.scss b/airbyte-webapp/src/components/connection/CatalogTree/next/StreamConnectionHeader.module.scss index c2a9085a9b8e..abf136af16af 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/next/StreamConnectionHeader.module.scss +++ b/airbyte-webapp/src/components/connection/CatalogTree/next/StreamConnectionHeader.module.scss @@ -5,16 +5,37 @@ $icon-size: 15px; .container { display: flex; flex-direction: row; - justify-content: space-between; - padding: variables.$spacing-lg calc(variables.$spacing-lg * 2); + padding: variables.$spacing-xl calc(#{variables.$spacing-lg} * 2) 0; + height: 43px; + align-items: center; + overflow: hidden; + scrollbar-gutter: stable; } .connector { display: flex; flex-direction: row; + flex: none; + align-self: stretch; + align-items: center; + gap: variables.$spacing-sm; +} + +.source { + flex: 7.3 0 0; + min-width: 0; +} + +.destination { + flex: 2 0 0; + min-width: 0; } .icon { - height: $icon-size; width: $icon-size; + height: $icon-size; +} + +.arrowContainer { + width: 20px; } diff --git a/airbyte-webapp/src/components/connection/CatalogTree/next/StreamConnectionHeader.tsx b/airbyte-webapp/src/components/connection/CatalogTree/next/StreamConnectionHeader.tsx index cb65e0ca8f92..b19b924b7cc8 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/next/StreamConnectionHeader.tsx +++ b/airbyte-webapp/src/components/connection/CatalogTree/next/StreamConnectionHeader.tsx @@ -1,5 +1,9 @@ import { faArrowRight } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; +import classnames from "classnames"; +import { FormattedMessage } from "react-intl"; + +import { Heading } from "components/ui/Heading"; import { useConnectionEditService } from "hooks/services/ConnectionEdit/ConnectionEditService"; import { useDestinationDefinition } from "services/connector/DestinationDefinitionService"; @@ -16,12 +20,25 @@ export const StreamConnectionHeader: React.FC = () => { } = useConnectionEditService(); const sourceDefinition = useSourceDefinition(source.sourceDefinitionId); const destinationDefinition = useDestinationDefinition(destination.destinationDefinitionId); - + const sourceStyles = classnames(styles.connector, styles.source); + const destinationStyles = classnames(styles.connector, styles.destination); return (
-
{renderIcon(sourceDefinition.icon)} Source
- -
{renderIcon(destinationDefinition.icon)} Destination
+
+ {renderIcon(sourceDefinition.icon)}{" "} + + + +
+
+ +
+
+ {renderIcon(destinationDefinition.icon)}{" "} + + + +
); }; diff --git a/airbyte-webapp/src/components/connection/CatalogTree/next/StreamPathSelect.module.scss b/airbyte-webapp/src/components/connection/CatalogTree/next/StreamPathSelect.module.scss new file mode 100644 index 000000000000..95e4d17efdee --- /dev/null +++ b/airbyte-webapp/src/components/connection/CatalogTree/next/StreamPathSelect.module.scss @@ -0,0 +1,5 @@ +.text { + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} diff --git a/airbyte-webapp/src/components/connection/CatalogTree/next/StreamPathSelect.tsx b/airbyte-webapp/src/components/connection/CatalogTree/next/StreamPathSelect.tsx index 1e35e3adae49..86c006c9e31f 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/next/StreamPathSelect.tsx +++ b/airbyte-webapp/src/components/connection/CatalogTree/next/StreamPathSelect.tsx @@ -2,10 +2,13 @@ import React from "react"; import { FormattedMessage } from "react-intl"; import { PillSelect } from "components/ui/PillSelect"; +import { Text } from "components/ui/Text"; import { Tooltip } from "components/ui/Tooltip"; import { Path } from "core/domain/catalog"; +import styles from "./StreamPathSelect.module.scss"; + export const pathDisplayName = (path: Path): string => path.join("."); export type IndexerType = null | "required" | "sourceDefined"; @@ -36,9 +39,11 @@ export const StreamPathSelect: React.FC = (props) => { const text = props.isMulti ? props.path.map(pathDisplayName).join(", ") : pathDisplayName(props.path); return ( - - {text} - + + + {text} + + ); } diff --git a/airbyte-webapp/src/components/connection/CatalogTree/next/SyncModeSelect.module.scss b/airbyte-webapp/src/components/connection/CatalogTree/next/SyncModeSelect.module.scss index af40c11fd767..cc50a51fd525 100644 --- a/airbyte-webapp/src/components/connection/CatalogTree/next/SyncModeSelect.module.scss +++ b/airbyte-webapp/src/components/connection/CatalogTree/next/SyncModeSelect.module.scss @@ -1,3 +1,6 @@ +@use "scss/variables"; + .pillSelect { - width: 100%; + width: variables.$width-wide-menu; + justify-content: space-between; } diff --git a/airbyte-webapp/src/scss/_variables.scss b/airbyte-webapp/src/scss/_variables.scss index 09703db06320..13d753a91050 100644 --- a/airbyte-webapp/src/scss/_variables.scss +++ b/airbyte-webapp/src/scss/_variables.scss @@ -18,6 +18,7 @@ $spacing-page-bottom: 150px; $main-page-content-min-width: 960px; $width-size-menu: 93px; +$width-wide-menu: 200px; $width-modal-sm: 492px; $width-modal-md: 585px; diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionFormFields.module.scss b/airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionFormFields.module.scss index 98bdfdb34a7e..dfd8ac1afa22 100644 --- a/airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionFormFields.module.scss +++ b/airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionFormFields.module.scss @@ -42,3 +42,8 @@ // used to control svg size font-size: 14px; } + +.flush { + padding: 0; + gap: 0; +} diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionFormFields.tsx b/airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionFormFields.tsx index ed798f7a2fef..e704f24ec299 100644 --- a/airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionFormFields.tsx +++ b/airbyte-webapp/src/views/Connection/ConnectionForm/ConnectionFormFields.tsx @@ -116,7 +116,7 @@ export const ConnectionFormFields: React.FC = ({ valu )} -
+
> = ({ title, children }) => ( - -
- {title && ( - - {title} - - )} - {children} -
-
-); +export const Section: React.FC> = ({ title, children, className }) => { + return ( + +
+ {title && ( + + {title} + + )} + {children} +
+
+ ); +}; diff --git a/airbyte-webapp/src/views/Connection/ConnectionForm/components/SyncCatalogField.module.scss b/airbyte-webapp/src/views/Connection/ConnectionForm/components/SyncCatalogField.module.scss index c9d8c72bec06..1f766a1cbbb0 100644 --- a/airbyte-webapp/src/views/Connection/ConnectionForm/components/SyncCatalogField.module.scss +++ b/airbyte-webapp/src/views/Connection/ConnectionForm/components/SyncCatalogField.module.scss @@ -1,5 +1,7 @@ +@use "scss/_variables"; + .header { - margin: 10px 0 6px; + margin: variables.$spacing-md 0 0; display: flex; justify-content: space-between; align-items: center; @@ -7,4 +9,5 @@ font-weight: 500; font-size: 14px; line-height: 17px; + padding: variables.$spacing-md variables.$spacing-xl; }