-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🪟 🧹 Custom connectors in Cloud UI updates #21034
Conversation
@@ -117,7 +122,7 @@ const CreateConnectorModal: React.FC<IProps> = ({ onClose, onSubmit, errorMessag | |||
}} | |||
validateOnBlur | |||
validateOnChange | |||
validationSchema={validationSchema} | |||
validationSchema={isCloudApp() === false ? standardValidationSchema : customConnectorValidationSchema} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general, I would use the FeatureService
over isCloudApp()
, but the AllowCustomImageUpload
doesn't tell us if a user is on Cloud specifically. Open to a better check if someone has one!
"admin.dockerImageTag": "Docker image tag", | ||
"admin.dockerImageTag.placeholder": "12.3", | ||
"admin.documentationUrl": "Connector Documentation URL", | ||
"admin.documentationUrl": "Connector documentation URL", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
casing was inconsistent with other labels
@@ -18,6 +18,10 @@ const Link = styled.a` | |||
`; | |||
|
|||
const ImageCell: React.FC<ImageCellProps> = ({ imageName, link }) => { | |||
if (!link || !link.length) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the cell in the tables on /settings/sources and /settings/destinations with the docker repository image name and the docs link.
...yte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.tsx
Outdated
Show resolved
Hide resolved
dockerImageTag: yup.string().required("form.empty.error"), | ||
dockerRepository: yup.string().required("form.empty.error"), | ||
name: yup.string().trim().required("form.empty.error"), | ||
documentationUrl: yup.string().trim().url("form.url.error").notRequired(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this makes this field optional for OSS as well, which also does not appear to do anything with it beyond the link on the connectors list in settings + the docs panel.
Note: I have not been able to manually test the documentation panel behavior for a custom connector on cloud, however I have verified using OSS, including the behavior for a connector with no documentation URL and an external documentation URL. Custom connectors on cloud dev environments is blocked by airbytehq/airbyte-cloud/pull/3952 There is a workaround but I feel confident having seen the behavior in OSS. |
const CreateConnectorModal: React.FC<IProps> = ({ onClose, onSubmit, errorMessage }) => { | ||
const Label: React.FC<React.PropsWithChildren<unknown>> = ({ children }) => { | ||
return ( | ||
<Text as="span" bold size="lg" className={styles.label}> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as="span"
allows us to use the built in message
prop on the input to display any validation errors
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good! Just left a few minor comments. I tested it locally and the form UX is much nicer ✨
"admin.dockerRepository": "Docker repository name", | ||
"admin.dockerFullImageName": "Docker full image name", | ||
"admin.dockerRepository.placeholder": "airbytehq/postgres", | ||
"admin.dockerFullImageName.placeholder": "customer-name/customer-image", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On second though, I'm not sure if the distinction between OSS & cloud is very useful. I don't think customer-name/customer-image
is self-explanatory - customers will need to be informed or read the docs to know exactly what to put in this field (not just e.g. xiaohan-test/xiaohan-custom-fake
but rather the full path like us-central1-docker.pkg.dev/airbyte-custom-connectors/xiaohan-test/xiaohan-custom-fake
). Since we have a link to the docs already, I think putting explicit instructions there is sufficient.
I would suggest we keep more or less what we had before, just changing Docker repository name
to Docker image name
to align with Docker image tag
WDYT? Cc @xiaohansong @sophia-wiley
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree, but I'll wait for those tagged to chime in before I make the change!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that using Docker image name
is the best way to go!
airbyte-webapp/src/pages/SettingsPage/pages/ConnectorsPage/components/CreateConnectorModal.tsx
Outdated
Show resolved
Hide resolved
airbyte-webapp/src/pages/SettingsPage/pages/ConnectorsPage/components/CreateConnectorModal.tsx
Outdated
Show resolved
Hide resolved
airbyte-webapp/src/pages/SettingsPage/pages/ConnectorsPage/components/CreateConnectorModal.tsx
Outdated
Show resolved
Hide resolved
airbyte-webapp/src/pages/SettingsPage/pages/ConnectorsPage/components/CreateConnectorModal.tsx
Outdated
Show resolved
Hide resolved
airbyte-webapp/src/pages/SettingsPage/pages/ConnectorsPage/components/ImageCell.tsx
Outdated
Show resolved
Hide resolved
...yte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.tsx
Outdated
Show resolved
Hide resolved
…t/ConnectorDocumentationLayout.tsx Co-authored-by: Joey Marshment-Howell <josephkmh@users.noreply.github.com>
Ready for re-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
* check if doc url is a valid url in cloud, but don't require it * field label and placeholder * cleanup * match casing for other form labels * cleanup imports * hide documentation panel if URL is empty * only show documentation panel if url is from our docs * make docs url optional, don't put a link in conncectorsview if empty * Update airbyte-webapp/src/views/Connector/ConnectorDocumentationLayout/ConnectorDocumentationLayout.tsx Co-authored-by: Joey Marshment-Howell <josephkmh@users.noreply.github.com> * use <FormattedMessage />, cleanup from Joey's commit in review comment * Use <Text/> component in ImageCell, get styled components out of there while I'm at it * add "required" labels * show validation error regardless of `touched` for documentationUrl * use old placeholder instead Co-authored-by: Joey Marshment-Howell <josephkmh@users.noreply.github.com>
What
closes airbytehq/airbyte-cloud#3753
How
Recommended reading order
<CreateConnectorModal />