Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Update copy in UpdateTargetModal.tsx (#63667)

Alexander Polyankinef8111537e97
diff --git a/e2e/test/scenarios/admin/transforms.cy.spec.ts b/e2e/test/scenarios/admin/transforms.cy.spec.ts
index cf7c3df3394..b01319a7a46 100644
--- a/e2e/test/scenarios/admin/transforms.cy.spec.ts
+++ b/e2e/test/scenarios/admin/transforms.cy.spec.ts
@@ -591,9 +591,9 @@ H.describeWithSnowplowEE("scenarios > admin > transforms", () => {
cy.log("modify the transform before running");
getTransformPage().button("Change target").click();
H.modal().within(() => {
- cy.findByLabelText("Table name").should("have.value", TARGET_TABLE);
+ cy.findByLabelText("New table name").should("have.value", TARGET_TABLE);
cy.findByLabelText("Schema").should("have.value", TARGET_SCHEMA);
- cy.findByLabelText("Table name").clear().type(TARGET_TABLE_2);
+ cy.findByLabelText("New table name").clear().type(TARGET_TABLE_2);
cy.findByLabelText("Schema").click();
});
H.popover().findByText(TARGET_SCHEMA_2).click();
@@ -632,9 +632,9 @@ H.describeWithSnowplowEE("scenarios > admin > transforms", () => {
cy.log("modify the transform before running");
getTransformPage().button("Change target").click();
H.modal().within(() => {
- cy.findByLabelText("Table name").should("have.value", TARGET_TABLE);
+ cy.findByLabelText("New table name").should("have.value", TARGET_TABLE);
cy.findByLabelText("Schema").should("have.value", TARGET_SCHEMA);
- cy.findByLabelText("Table name").clear().type(TARGET_TABLE_2);
+ cy.findByLabelText("New table name").clear().type(TARGET_TABLE_2);
cy.findByLabelText("Schema").clear().type(CUSTOM_SCHEMA);
});
H.popover().findByText("Create new schema").click();
@@ -674,10 +674,10 @@ H.describeWithSnowplowEE("scenarios > admin > transforms", () => {
cy.log("modify the transform after running");
getTransformPage().button("Change target").click();
H.modal().within(() => {
- cy.findByLabelText("Table name").should("have.value", TARGET_TABLE);
+ cy.findByLabelText("New table name").should("have.value", TARGET_TABLE);
cy.findByLabelText("Schema").should("have.value", TARGET_SCHEMA);
cy.findByLabelText("Keep transform_table").should("be.checked");
- cy.findByLabelText("Table name").clear().type(TARGET_TABLE_2);
+ cy.findByLabelText("New table name").clear().type(TARGET_TABLE_2);
cy.button("Change target").click();
cy.wait("@updateTransform");
});
@@ -718,11 +718,11 @@ H.describeWithSnowplowEE("scenarios > admin > transforms", () => {
cy.log("modify the transform after running");
getTransformPage().button("Change target").click();
H.modal().within(() => {
- cy.findByLabelText("Table name").should("have.value", TARGET_TABLE);
+ cy.findByLabelText("New table name").should("have.value", TARGET_TABLE);
cy.findByLabelText("Schema").should("have.value", TARGET_SCHEMA);
- cy.findByLabelText("Table name").clear().type(TARGET_TABLE_2);
+ cy.findByLabelText("New table name").clear().type(TARGET_TABLE_2);
cy.findByLabelText("Delete transform_table").click();
- cy.button("Change target and delete the old one").click();
+ cy.button("Change target and delete old table").click();
cy.wait("@deleteTransformTable");
cy.wait("@updateTransform");
});
@@ -764,9 +764,9 @@ H.describeWithSnowplowEE("scenarios > admin > transforms", () => {
cy.log("delete the old target without creating the new one");
getTransformPage().button("Change target").click();
H.modal().within(() => {
- cy.findByLabelText("Table name").clear().type(TARGET_TABLE_2);
+ cy.findByLabelText("New table name").clear().type(TARGET_TABLE_2);
cy.findByLabelText("Delete transform_table").click();
- cy.button("Change target and delete the old one").click();
+ cy.button("Change target and delete old table").click();
cy.wait("@deleteTransformTable");
cy.wait("@updateTransform");
});
@@ -774,7 +774,7 @@ H.describeWithSnowplowEE("scenarios > admin > transforms", () => {
cy.log("change the target back to the original one");
getTransformPage().button("Change target").click();
H.modal().within(() => {
- cy.findByLabelText("Table name").clear().type(TARGET_TABLE);
+ cy.findByLabelText("New table name").clear().type(TARGET_TABLE);
cy.button("Change target").click();
cy.wait("@updateTransform");
});
@@ -794,7 +794,7 @@ H.describeWithSnowplowEE("scenarios > admin > transforms", () => {
cy.log("change the target to an existing table");
getTransformPage().button("Change target").click();
H.modal().within(() => {
- cy.findByLabelText("Table name").clear().type(SOURCE_TABLE);
+ cy.findByLabelText("New table name").clear().type(SOURCE_TABLE);
cy.button("Change target").click();
cy.wait("@updateTransform");
cy.findByText("A table with that name already exists.").should(
diff --git a/enterprise/frontend/src/metabase-enterprise/transforms/pages/JobListPage/JobList/JobList.module.css b/enterprise/frontend/src/metabase-enterprise/transforms/pages/JobListPage/JobList/JobList.module.css
index 5e3a99848a1..f508fd8d425 100644
--- a/enterprise/frontend/src/metabase-enterprise/transforms/pages/JobListPage/JobList/JobList.module.css
+++ b/enterprise/frontend/src/metabase-enterprise/transforms/pages/JobListPage/JobList/JobList.module.css
@@ -2,6 +2,10 @@
cursor: pointer;
}
-.cell {
- overflow-wrap: break-word;
+.wrap {
+ overflow-wrap: anywhere;
+}
+
+.nowrap {
+ white-space: nowrap;
}
diff --git a/enterprise/frontend/src/metabase-enterprise/transforms/pages/JobListPage/JobList/JobList.tsx b/enterprise/frontend/src/metabase-enterprise/transforms/pages/JobListPage/JobList/JobList.tsx
index cdaefc73251..71ec3769fe3 100644
--- a/enterprise/frontend/src/metabase-enterprise/transforms/pages/JobListPage/JobList/JobList.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/transforms/pages/JobListPage/JobList/JobList.tsx
@@ -59,10 +59,12 @@ export function JobList({ params }: { params: JobListParams }) {
columnTitles={[
t`Job`,
<Flex align="center" gap="xs" key="last-run-at">
- {t`Last run at`} <TimezoneIndicator />
+ <span className={S.nowrap}>{t`Last run at`}</span>{" "}
+ <TimezoneIndicator />
</Flex>,
<Flex align="center" gap="xs" key="next-run">
- {t`Next run`} <TimezoneIndicator />
+ <span className={S.nowrap}>{t`Next run`}</span>{" "}
+ <TimezoneIndicator />
</Flex>,
t`Tags`,
]}
@@ -73,8 +75,8 @@ export function JobList({ params }: { params: JobListParams }) {
className={S.row}
onClick={() => handleRowClick(job)}
>
- <td className={S.cell}>{job.name}</td>
- <td className={S.cell}>
+ <td className={S.wrap}>{job.name}</td>
+ <td className={S.nowrap}>
{job.last_run?.start_time
? parseTimestampWithTimezone(
job.last_run?.start_time,
@@ -82,7 +84,7 @@ export function JobList({ params }: { params: JobListParams }) {
).format("lll")
: null}
</td>
- <td className={S.cell}>
+ <td className={S.nowrap}>
{job.next_run?.start_time
? parseTimestampWithTimezone(
job.next_run?.start_time,
@@ -90,7 +92,7 @@ export function JobList({ params }: { params: JobListParams }) {
).format("lll")
: null}
</td>
- <td className={S.cell}>
+ <td className={S.wrap}>
<TagList tags={tags} tagIds={job.tag_ids ?? []} />
</td>
</tr>
diff --git a/enterprise/frontend/src/metabase-enterprise/transforms/pages/RunListPage/RunList/RunList.module.css b/enterprise/frontend/src/metabase-enterprise/transforms/pages/RunListPage/RunList/RunList.module.css
index 5e3a99848a1..f508fd8d425 100644
--- a/enterprise/frontend/src/metabase-enterprise/transforms/pages/RunListPage/RunList/RunList.module.css
+++ b/enterprise/frontend/src/metabase-enterprise/transforms/pages/RunListPage/RunList/RunList.module.css
@@ -2,6 +2,10 @@
cursor: pointer;
}
-.cell {
- overflow-wrap: break-word;
+.wrap {
+ overflow-wrap: anywhere;
+}
+
+.nowrap {
+ white-space: nowrap;
}
diff --git a/enterprise/frontend/src/metabase-enterprise/transforms/pages/RunListPage/RunList/RunList.tsx b/enterprise/frontend/src/metabase-enterprise/transforms/pages/RunListPage/RunList/RunList.tsx
index 28272a3e74a..affdeb47d7b 100644
--- a/enterprise/frontend/src/metabase-enterprise/transforms/pages/RunListPage/RunList/RunList.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/transforms/pages/RunListPage/RunList/RunList.tsx
@@ -69,10 +69,11 @@ function RunTable({ runs }: RunTableProps) {
columnTitles={[
t`Transform`,
<Flex key="started-at" align="center" gap="xs">
- {t`Started at`} <TimezoneIndicator />
+ <span className={S.nowrap}>{t`Started at`}</span>{" "}
+ <TimezoneIndicator />
</Flex>,
<Flex key="end-at" align="center" gap="xs">
- {t`End at`} <TimezoneIndicator />
+ <span className={S.nowrap}>{t`End at`}</span> <TimezoneIndicator />
</Flex>,
t`Status`,
t`Trigger`,
@@ -84,14 +85,14 @@ function RunTable({ runs }: RunTableProps) {
className={S.row}
onClick={() => handleRowClick(run)}
>
- <td className={S.cell}>{run.transform?.name}</td>
- <td className={S.cell}>
+ <td className={S.wrap}>{run.transform?.name}</td>
+ <td className={S.nowrap}>
{parseTimestampWithTimezone(
run.start_time,
systemTimezone,
).format("lll")}
</td>
- <td className={S.cell}>
+ <td className={S.nowrap}>
{run.end_time
? parseTimestampWithTimezone(
run.end_time,
@@ -99,7 +100,7 @@ function RunTable({ runs }: RunTableProps) {
).format("lll")
: null}
</td>
- <td className={S.cell}>
+ <td className={S.wrap}>
<RunStatusInfo
status={run.status}
message={run.message}
@@ -113,7 +114,7 @@ function RunTable({ runs }: RunTableProps) {
}
/>
</td>
- <td className={S.cell}>{formatRunMethod(run.run_method)}</td>
+ <td className={S.wrap}>{formatRunMethod(run.run_method)}</td>
</tr>
))}
</AdminContentTable>
diff --git a/enterprise/frontend/src/metabase-enterprise/transforms/pages/TransformListPage/TransformList/TransformList.module.css b/enterprise/frontend/src/metabase-enterprise/transforms/pages/TransformListPage/TransformList/TransformList.module.css
index 5e3a99848a1..f508fd8d425 100644
--- a/enterprise/frontend/src/metabase-enterprise/transforms/pages/TransformListPage/TransformList/TransformList.module.css
+++ b/enterprise/frontend/src/metabase-enterprise/transforms/pages/TransformListPage/TransformList/TransformList.module.css
@@ -2,6 +2,10 @@
cursor: pointer;
}
-.cell {
- overflow-wrap: break-word;
+.wrap {
+ overflow-wrap: anywhere;
+}
+
+.nowrap {
+ white-space: nowrap;
}
diff --git a/enterprise/frontend/src/metabase-enterprise/transforms/pages/TransformListPage/TransformList/TransformList.tsx b/enterprise/frontend/src/metabase-enterprise/transforms/pages/TransformListPage/TransformList/TransformList.tsx
index c552b7a1d2a..1cd7dd9363e 100644
--- a/enterprise/frontend/src/metabase-enterprise/transforms/pages/TransformListPage/TransformList/TransformList.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/transforms/pages/TransformListPage/TransformList/TransformList.tsx
@@ -56,9 +56,12 @@ export function TransformList() {
t`Transform`,
t`Target`,
<Flex key="last-run-at" component="span" align="center" gap="xs">
- {t`Last run at`} <TimezoneIndicator />
+ <span className={S.nowrap}>{t`Last run at`}</span>{" "}
+ <TimezoneIndicator />
</Flex>,
- t`Last run status`,
+ <span key="last-run-status" className={S.nowrap}>
+ {t`Last run status`}
+ </span>,
t`Tags`,
]}
>
@@ -68,9 +71,9 @@ export function TransformList() {
className={S.row}
onClick={() => handleRowClick(transform)}
>
- <td className={S.cell}>{transform.name}</td>
- <td className={S.cell}>{transform.target.name}</td>
- <td className={S.cell}>
+ <td className={S.wrap}>{transform.name}</td>
+ <td className={S.wrap}>{transform.target.name}</td>
+ <td className={S.nowrap}>
{transform.last_run?.end_time
? parseTimestampWithTimezone(
transform.last_run.end_time,
@@ -78,7 +81,7 @@ export function TransformList() {
).format("lll")
: null}
</td>
- <td className={S.cell}>
+ <td className={S.nowrap}>
{transform.last_run != null ? (
<RunStatusInfo
status={transform.last_run.status}
@@ -94,7 +97,7 @@ export function TransformList() {
/>
) : null}
</td>
- <td className={S.cell}>
+ <td className={S.wrap}>
<TagList tags={tags} tagIds={transform.tag_ids ?? []} />
</td>
</tr>
diff --git a/enterprise/frontend/src/metabase-enterprise/transforms/pages/TransformPage/TargetSection/UpdateTargetModal/UpdateTargetModal.tsx b/enterprise/frontend/src/metabase-enterprise/transforms/pages/TransformPage/TargetSection/UpdateTargetModal/UpdateTargetModal.tsx
index d56eb4a0195..ab1d27cbf43 100644
--- a/enterprise/frontend/src/metabase-enterprise/transforms/pages/TransformPage/TargetSection/UpdateTargetModal/UpdateTargetModal.tsx
+++ b/enterprise/frontend/src/metabase-enterprise/transforms/pages/TransformPage/TargetSection/UpdateTargetModal/UpdateTargetModal.tsx
@@ -135,25 +135,25 @@ function UpdateTargetForm({
data={schemas}
/>
)}
- <FormTextInput name="name" label={t`Table name`} />
+ <FormTextInput name="name" label={t`New table name`} />
{table != null && (
<Radio.Group
value={shouldDeleteTarget.toString()}
label={t`Keep the old target table, or delete it?`}
- description={jt`You can keep or delete ${(
- <strong key="strong">{target.name}</strong>
- )}. Deleting it can’t be undone, and will break queries that used it. Please be careful!`}
+ description={jt`If you keep ${(
+ <strong key="table">{target.name}</strong>
+ )}, this transform will no longer update it. If you delete the table, you will break any queries that use it. Deletion can't be undone.`}
onChange={(value) => setShouldDeleteTarget(value === "true")}
>
<Stack gap="sm">
<Radio
value="false"
- label={t`Keep ${target.name}`}
+ label={jt`Keep ${(<strong key="table">{target.name}</strong>)}`}
data-testid="keep-target-radio"
/>
<Radio
value="true"
- label={t`Delete ${target.name}`}
+ label={jt`Delete ${(<strong key="table">{target.name}</strong>)}`}
data-testid="delete-target-radio"
/>
</Stack>
@@ -187,7 +187,7 @@ function getInitialValues({ target }: Transform): EditTransformValues {
function getSubmitButtonLabel(shouldDeleteTarget: boolean) {
return shouldDeleteTarget
- ? t`Change target and delete the old one`
+ ? t`Change target and delete old table`
: t`Change target`;
}