Skip to content

Commit 1e53c32

Browse files
teallarsonakashkulk
authored andcommitted
Revert "🪟 🎨 Streams table design pass (#18908)" (#19397)
This reverts commit a72deb1.
1 parent 056ef22 commit 1e53c32

16 files changed

+94
-233
lines changed

airbyte-webapp/src/components/SimpleTableComponents/SimpleTableComponents.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,9 @@ export const Cell = styled.div<{
2727
light?: boolean;
2828
lighter?: boolean;
2929
ellipsis?: boolean;
30-
flush?: boolean;
3130
}>`
3231
flex: ${({ flex }) => flex || 1} 0 0;
33-
padding-right: ${({ flush }) => (flush ? 0 : 10)}px;
34-
min-width: 0;
35-
32+
padding-right: 10px;
3633
word-break: break-word;
3734
color: ${({ theme, light, lighter }) => (light ? theme.greyColor40 : lighter ? theme.greyColor60 : "inherit")};
3835
font-weight: ${({ light, lighter }) => (light || lighter ? "normal" : "inherit")};

airbyte-webapp/src/components/connection/CatalogTree/CatalogTreeSearch.module.scss

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
1-
@use "scss/_variables";
2-
31
.searchInput {
42
padding: 10px 8px 9px;
53
}
64

75
.searchContent {
86
position: relative;
97
width: 100%;
10-
padding: 0 variables.$spacing-xl;
118

129
&::before {
1310
content: attr(data-content);

airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableHeader.module.scss

Lines changed: 0 additions & 29 deletions
This file was deleted.
Lines changed: 29 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,70 @@
1-
import React from "react";
21
import { FormattedMessage } from "react-intl";
32

43
import { Cell, Header } from "components/SimpleTableComponents";
54
import { CheckBox } from "components/ui/CheckBox";
6-
import { Text } from "components/ui/Text";
75
import { InfoTooltip, TooltipLearnMoreLink } from "components/ui/Tooltip";
86

97
import { useBulkEditService } from "hooks/services/BulkEdit/BulkEditService";
108
import { useConnectionFormService } from "hooks/services/ConnectionForm/ConnectionFormService";
119
import { links } from "utils/links";
1210

13-
import styles from "./CatalogTreeTableHeader.module.scss";
14-
15-
const TextCell: React.FC<React.PropsWithChildren<{ flex?: number }>> = ({ flex, children }) => {
16-
return (
17-
<Cell flex={flex}>
18-
<Text size="sm" className={styles.cellText}>
19-
{children}
20-
</Text>
21-
</Cell>
22-
);
23-
};
24-
2511
export const CatalogTreeTableHeader: React.FC = () => {
2612
const { mode } = useConnectionFormService();
2713
const { onCheckAll, selectedBatchNodeIds, allChecked } = useBulkEditService();
2814

2915
return (
30-
<Header className={styles.headerContainer}>
31-
<div className={styles.checkboxCell}>
16+
<Header>
17+
<Cell>
3218
{mode !== "readonly" && (
3319
<CheckBox
3420
onChange={onCheckAll}
3521
indeterminate={selectedBatchNodeIds.length > 0 && !allChecked}
3622
checked={allChecked}
3723
/>
3824
)}
39-
</div>
40-
<TextCell flex={0.5}>
25+
</Cell>
26+
<Cell>
4127
<FormattedMessage id="sources.sync" />
42-
</TextCell>
43-
{/* <TextCell>
28+
</Cell>
29+
<Cell>
4430
<FormattedMessage id="form.fields" />
45-
</TextCell> */}
46-
<TextCell flex={1}>
31+
</Cell>
32+
<Cell>
4733
<FormattedMessage id="form.namespace" />
48-
</TextCell>
49-
<TextCell flex={1}>
34+
</Cell>
35+
<Cell>
5036
<FormattedMessage id="form.streamName" />
51-
</TextCell>
52-
<TextCell flex={2}>
37+
</Cell>
38+
<Cell>
5339
<FormattedMessage id="form.syncMode" />
5440
<InfoTooltip>
5541
<FormattedMessage id="connectionForm.syncType.info" />
5642
<TooltipLearnMoreLink url={links.syncModeLink} />
5743
</InfoTooltip>
58-
</TextCell>
59-
<TextCell flex={1}>
44+
</Cell>
45+
<Cell>
6046
<FormattedMessage id="form.cursorField" />
6147
<InfoTooltip>
6248
<FormattedMessage id="connectionForm.cursor.info" />
6349
</InfoTooltip>
64-
</TextCell>
65-
<TextCell flex={1}>
50+
</Cell>
51+
<Cell>
6652
<FormattedMessage id="form.primaryKey" />
67-
</TextCell>
68-
<div className={styles.arrowPlaceholder} />
69-
<TextCell flex={1}>
53+
</Cell>
54+
<Cell />
55+
<Cell>
7056
<FormattedMessage id="form.namespace" />
71-
</TextCell>
72-
<TextCell flex={1}>
57+
</Cell>
58+
<Cell>
7359
<FormattedMessage id="form.streamName" />
74-
</TextCell>
60+
</Cell>
61+
<Cell>
62+
<FormattedMessage id="form.syncMode" />
63+
<InfoTooltip>
64+
<FormattedMessage id="connectionForm.syncType.info" />
65+
<TooltipLearnMoreLink url={links.syncModeLink} />
66+
</InfoTooltip>
67+
</Cell>
7568
</Header>
7669
);
7770
};

airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableRow.module.scss

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,6 @@
1717
.streamHeaderContent {
1818
background: colors.$white;
1919
border-bottom: 1px solid colors.$grey-50;
20-
padding-right: variables.$spacing-md;
21-
padding-left: variables.$spacing-sm;
22-
margin-bottom: 1px;
23-
gap: variables.$spacing-sm;
24-
min-height: 50px;
25-
height: 50px;
26-
align-items: center;
27-
overflow-y: auto;
28-
scrollbar-gutter: stable;
2920

3021
&:hover {
3122
background: colors.$grey-30;
@@ -47,35 +38,11 @@
4738
&.selected {
4839
background-color: colors.$blue-transparent;
4940
}
50-
51-
&.disabled {
52-
background-color: colors.$grey-50;
53-
}
5441
}
5542

5643
.streamRowCheckboxCell {
57-
margin-right: variables.$spacing-sm;
58-
max-width: 43px;
59-
text-align: center;
60-
font-size: 10px;
61-
line-height: 13px;
6244
display: flex;
6345
flex-direction: row;
6446
justify-content: flex-end;
65-
padding-left: calc(#{variables.$spacing-xl} + #{variables.$spacing-sm});
66-
}
67-
68-
.arrowCell {
69-
width: 20px;
70-
}
71-
72-
.cellText {
73-
overflow: hidden;
74-
text-overflow: ellipsis;
75-
white-space: nowrap;
76-
}
77-
78-
.syncModeCell {
79-
width: variables.$width-wide-menu;
80-
min-width: variables.$width-wide-menu;
47+
padding-left: 27px;
8148
}

airbyte-webapp/src/components/connection/CatalogTree/next/CatalogTreeTableRow.tsx

Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@ import { FormattedMessage } from "react-intl";
77
import { Cell, Row } from "components/SimpleTableComponents";
88
import { CheckBox } from "components/ui/CheckBox";
99
import { Switch } from "components/ui/Switch";
10-
import { Text } from "components/ui/Text";
1110

1211
import { useBulkEditSelect } from "hooks/services/BulkEdit/BulkEditService";
1312

1413
import { StreamHeaderProps } from "../StreamHeader";
14+
import { HeaderCell } from "../styles";
1515
import styles from "./CatalogTreeTableRow.module.scss";
1616
import { StreamPathSelect } from "./StreamPathSelect";
1717
import { SyncModeSelect } from "./SyncModeSelect";
18+
1819
export const CatalogTreeTableRow: React.FC<StreamHeaderProps> = ({
1920
stream,
2021
destName,
@@ -34,7 +35,7 @@ export const CatalogTreeTableRow: React.FC<StreamHeaderProps> = ({
3435
hasError,
3536
disabled,
3637
}) => {
37-
const { primaryKey, cursorField, syncMode, destinationSyncMode } = stream.config ?? {};
38+
const { primaryKey, syncMode, cursorField, destinationSyncMode } = stream.config ?? {};
3839
const isStreamEnabled = stream.config?.selected;
3940

4041
const { defaultCursorField } = stream.stream ?? {};
@@ -62,13 +63,14 @@ export const CatalogTreeTableRow: React.FC<StreamHeaderProps> = ({
6263
[styles.disabledChange]: changedSelected && !isStreamEnabled,
6364
[styles.selected]: isSelected,
6465
[styles.error]: hasError,
65-
[styles.disabled]: !changedSelected && !isStreamEnabled,
6666
});
6767

68+
const checkboxCellCustomStyle = classnames(styles.checkboxCell, styles.streamRowCheckboxCell);
69+
6870
return (
6971
<Row onClick={onRowClick} className={streamHeaderContentStyle}>
7072
{!disabled && (
71-
<div className={styles.streamRowCheckboxCell}>
73+
<div className={checkboxCellCustomStyle}>
7274
{changedSelected && (
7375
<div>
7476
{isStreamEnabled ? (
@@ -81,33 +83,24 @@ export const CatalogTreeTableRow: React.FC<StreamHeaderProps> = ({
8183
<CheckBox checked={isSelected} onChange={selectForBulkEdit} />
8284
</div>
8385
)}
84-
<Cell flex={0.5} flush>
86+
<Cell>
8587
<Switch small checked={stream.config?.selected} onChange={onSelectStream} disabled={disabled} />
8688
</Cell>
87-
{/* <Cell>{fieldCount}</Cell> */}
88-
<Cell flex={1} title={stream.stream?.namespace || ""}>
89-
<Text size="md" className={styles.cellText}>
90-
{stream.stream?.namespace || <FormattedMessage id="form.noNamespace" />}
91-
</Text>
92-
</Cell>
93-
<Cell flex={1} title={stream.stream?.name || ""}>
94-
<Text size="md" className={styles.cellText}>
95-
{stream.stream?.name}
96-
</Text>
97-
</Cell>
98-
<div className={styles.syncModeCell}>
89+
<Cell>{fieldCount}</Cell>
90+
<HeaderCell ellipsis title={stream.stream?.namespace || ""}>
91+
{stream.stream?.namespace || <FormattedMessage id="form.noNamespace" />}
92+
</HeaderCell>
93+
<Cell>{stream.stream?.name}</Cell>
94+
<Cell>
9995
{disabled ? (
100-
<Cell title={syncSchema.syncMode}>
101-
<Text size="md" className={styles.cellText}>
102-
{syncSchema.syncMode}
103-
</Text>
104-
</Cell>
96+
<HeaderCell ellipsis title={syncSchema.syncMode}>
97+
{syncSchema.syncMode}
98+
</HeaderCell>
10599
) : (
106-
// todo: SyncModeSelect should probably have a Tooltip, append/dedupe ends up ellipsing
107100
<SyncModeSelect options={availableSyncModes} onChange={onSelectSyncMode} value={syncSchema} />
108101
)}
109-
</div>
110-
<Cell flex={1}>
102+
</Cell>
103+
<HeaderCell>
111104
{cursorType && (
112105
<StreamPathSelect
113106
pathType={cursorType}
@@ -116,8 +109,8 @@ export const CatalogTreeTableRow: React.FC<StreamHeaderProps> = ({
116109
onPathChange={onCursorChange}
117110
/>
118111
)}
119-
</Cell>
120-
<Cell flex={1}>
112+
</HeaderCell>
113+
<HeaderCell ellipsis>
121114
{pkType && (
122115
<StreamPathSelect
123116
pathType={pkType}
@@ -127,17 +120,25 @@ export const CatalogTreeTableRow: React.FC<StreamHeaderProps> = ({
127120
onPathChange={onPrimaryKeyChange}
128121
/>
129122
)}
123+
</HeaderCell>
124+
<Cell>
125+
<FontAwesomeIcon icon={faArrowRight} />
130126
</Cell>
131-
<FontAwesomeIcon icon={faArrowRight} className={styles.arrowCell} />
132-
<Cell flex={1} title={destNamespace}>
133-
<Text size="md" className={styles.cellText}>
134-
{destNamespace}
135-
</Text>
136-
</Cell>
137-
<Cell flex={1} title={destName}>
138-
<Text size="md" className={styles.cellText}>
139-
{destName}
140-
</Text>
127+
<HeaderCell ellipsis title={destNamespace}>
128+
{destNamespace}
129+
</HeaderCell>
130+
<HeaderCell ellipsis title={destName}>
131+
{destName}
132+
</HeaderCell>
133+
<Cell>
134+
{disabled ? (
135+
<HeaderCell ellipsis title={syncSchema.destinationSyncMode}>
136+
{syncSchema.destinationSyncMode}
137+
</HeaderCell>
138+
) : (
139+
// TODO: Replace with Dropdown/Popout
140+
syncSchema.destinationSyncMode
141+
)}
141142
</Cell>
142143
</Row>
143144
);

airbyte-webapp/src/components/connection/CatalogTree/next/StreamConnectionHeader.module.scss

Lines changed: 3 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,37 +5,16 @@ $icon-size: 15px;
55
.container {
66
display: flex;
77
flex-direction: row;
8-
padding: variables.$spacing-xl calc(#{variables.$spacing-lg} * 2) 0;
9-
height: 43px;
10-
align-items: center;
11-
overflow: hidden;
12-
scrollbar-gutter: stable;
8+
justify-content: space-between;
9+
padding: variables.$spacing-lg calc(variables.$spacing-lg * 2);
1310
}
1411

1512
.connector {
1613
display: flex;
1714
flex-direction: row;
18-
flex: none;
19-
align-self: stretch;
20-
align-items: center;
21-
gap: variables.$spacing-sm;
22-
}
23-
24-
.source {
25-
flex: 7.3 0 0;
26-
min-width: 0;
27-
}
28-
29-
.destination {
30-
flex: 2 0 0;
31-
min-width: 0;
3215
}
3316

3417
.icon {
35-
width: $icon-size;
3618
height: $icon-size;
37-
}
38-
39-
.arrowContainer {
40-
width: 20px;
19+
width: $icon-size;
4120
}

0 commit comments

Comments
 (0)