Skip to content

Commit

Permalink
🪟 🎨 Connector Builder: Set better modal title when copying stream (#6…
Browse files Browse the repository at this point in the history
…229)
  • Loading branch information
lmossman committed Apr 27, 2023
1 parent 966ca0f commit a2df194
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,15 @@ interface AddStreamButtonProps {
button?: React.ReactElement;
initialValues?: Partial<BuilderStream>;
"data-testid"?: string;
modalTitle?: string;
}

export const AddStreamButton: React.FC<AddStreamButtonProps> = ({
onAddStream,
button,
initialValues,
"data-testid": testId,
modalTitle,
}) => {
const analyticsService = useAnalyticsService();
const { hasErrors } = useBuilderErrors();
Expand Down Expand Up @@ -110,7 +112,7 @@ export const AddStreamButton: React.FC<AddStreamButtonProps> = ({
<FormikPatch />
<Modal
size="sm"
title={<FormattedMessage id="connectorBuilder.addStreamModal.title" />}
title={modalTitle ?? <FormattedMessage id="connectorBuilder.addStreamModal.title" />}
onClose={() => {
setIsOpen(false);
}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ const StreamControls = ({
<FontAwesomeIcon icon={faCopy} />
</button>
}
modalTitle={formatMessage(
{ id: "connectorBuilder.copyStreamModal.title" },
{ name: field.value[streamNum].name }
)}
/>
<button className={classNames(styles.deleteButton, styles.controlButton)} type="button" onClick={handleDelete}>
<FontAwesomeIcon icon={faTrashCan} />
Expand Down
1 change: 1 addition & 0 deletions airbyte-webapp/src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -764,6 +764,7 @@
"connectorBuilder.addStreamModal.streamNameTooltip": "Name of the new stream",
"connectorBuilder.addStreamModal.urlPathLabel": "URL path",
"connectorBuilder.addStreamModal.urlPathTooltip": "URL path of the endpoint for this stream",
"connectorBuilder.copyStreamModal.title": "Duplicate {name} stream",
"connectorBuilder.deleteStreamModal.title": "Delete stream",
"connectorBuilder.deleteStreamModal.text": "Are you sure you want to delete this stream?",
"connectorBuilder.deleteStreamModal.submitButton": "Delete",
Expand Down

0 comments on commit a2df194

Please sign in to comment.