Skip to content

Commit 3a8916e

Browse files
author
Joe Reuter
authored
🪟🎨 Connector builder: Always show inputs button (#20817)
Always show inputs button in connector builder UI
1 parent f2f17af commit 3a8916e

File tree

3 files changed

+17
-13
lines changed

3 files changed

+17
-13
lines changed

airbyte-webapp/src/components/connectorBuilder/StreamTestingPanel/ConfigMenu.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,10 @@ export const ConfigMenu: React.FC<ConfigMenuProps> = ({ className, configJsonErr
5656
size="sm"
5757
variant="secondary"
5858
onClick={() => setIsOpen(true)}
59-
disabled={!jsonManifest.spec}
59+
disabled={
60+
!jsonManifest.spec ||
61+
Object.keys(jsonManifest.spec.connection_specification.properties || {}).length === 0
62+
}
6063
icon={<FontAwesomeIcon className={styles.icon} icon={faUser} />}
6164
>
6265
<FormattedMessage id="connectorBuilder.inputsButton" />

airbyte-webapp/src/components/connectorBuilder/StreamTestingPanel/StreamTestingPanel.module.scss

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ $buttonHeight: 36px;
3737
gap: variables.$spacing-md;
3838
background-color: colors.$blue-50;
3939
border-radius: variables.$border-radius-sm;
40+
41+
// leave room for config button
42+
margin-top: 50px;
4043
}
4144

4245
.loadingSpinner {

airbyte-webapp/src/components/connectorBuilder/StreamTestingPanel/StreamTestingPanel.tsx

Lines changed: 10 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,12 @@ export const StreamTestingPanel: React.FC<unknown> = () => {
5555

5656
return (
5757
<div className={styles.container}>
58+
<ConfigMenu
59+
className={styles.configButton}
60+
configJsonErrors={configJsonErrors}
61+
isOpen={isTestInputOpen}
62+
setIsOpen={setTestInputOpen}
63+
/>
5864
{!hasStreams && (
5965
<div className={styles.addStreamMessage}>
6066
<Heading as="h2" className={styles.addStreamHeading}>
@@ -64,18 +70,10 @@ export const StreamTestingPanel: React.FC<unknown> = () => {
6470
</div>
6571
)}
6672
{hasStreams && streamListErrorMessage === undefined && (
67-
<>
68-
<ConfigMenu
69-
className={styles.configButton}
70-
configJsonErrors={configJsonErrors}
71-
isOpen={isTestInputOpen}
72-
setIsOpen={setTestInputOpen}
73-
/>
74-
<div className={styles.selectAndTestContainer}>
75-
<StreamSelector className={styles.streamSelector} />
76-
<StreamTester hasConfigJsonErrors={configJsonErrors > 0} setTestInputOpen={setTestInputOpen} />
77-
</div>
78-
</>
73+
<div className={styles.selectAndTestContainer}>
74+
<StreamSelector className={styles.streamSelector} />
75+
<StreamTester hasConfigJsonErrors={configJsonErrors > 0} setTestInputOpen={setTestInputOpen} />
76+
</div>
7977
)}
8078
{hasStreams && streamListErrorMessage !== undefined && (
8179
<div className={styles.listErrorDisplay}>

0 commit comments

Comments
 (0)