From 129518fc201425320cfd9cfdcef78d96d7fc21e5 Mon Sep 17 00:00:00 2001 From: Alexander Polyankin <alexander.polyankin@metabase.com> Date: Tue, 13 Sep 2022 20:55:11 +0300 Subject: [PATCH] Improve slack settings messages (#25379) --- .../slack/components/SlackSetupForm/SlackSetupForm.tsx | 2 +- .../slack/components/SlackStatusForm/SlackStatusForm.tsx | 2 +- frontend/src/metabase/admin/settings/slack/forms.ts | 2 +- .../DataSelectorFieldPicker.unit.spec.tsx | 2 +- .../metabase/scenarios/admin/settings/settings.cy.spec.js | 4 +++- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/frontend/src/metabase/admin/settings/slack/components/SlackSetupForm/SlackSetupForm.tsx b/frontend/src/metabase/admin/settings/slack/components/SlackSetupForm/SlackSetupForm.tsx index a8f7fd68750..40849a19e4a 100644 --- a/frontend/src/metabase/admin/settings/slack/components/SlackSetupForm/SlackSetupForm.tsx +++ b/frontend/src/metabase/admin/settings/slack/components/SlackSetupForm/SlackSetupForm.tsx @@ -20,7 +20,7 @@ const SlackSetupForm = ({ onSubmit }: SlackSetupFormProps): JSX.Element => { <FormField name="slack-app-token" /> <FormMessage> {t`Finally, open Slack, create a public channel and enter its name below.`}{" "} - {t`We'll upload charts and tables here before sending out dashboard subscriptions.`} + {t`This channel shouldn't really be used by anyone — we'll upload charts and tables here before sending out dashboard subscriptions (it's a Slack requirement).`} </FormMessage> <FormField name="slack-files-channel" /> <FormFooter submitTitle={t`Save changes`} /> diff --git a/frontend/src/metabase/admin/settings/slack/components/SlackStatusForm/SlackStatusForm.tsx b/frontend/src/metabase/admin/settings/slack/components/SlackStatusForm/SlackStatusForm.tsx index 34e6c4fb30f..06bfaa908c0 100644 --- a/frontend/src/metabase/admin/settings/slack/components/SlackStatusForm/SlackStatusForm.tsx +++ b/frontend/src/metabase/admin/settings/slack/components/SlackStatusForm/SlackStatusForm.tsx @@ -24,7 +24,7 @@ const SlackStatusForm = ({ settings }: SlackStatusFormProps): JSX.Element => { <FormField name="slack-app-token" /> <FormField name="slack-files-channel" - description={t`We'll upload charts and tables here before sending out dashboard subscriptions.`} + description={t`This channel shouldn't really be used by anyone — we'll upload charts and tables here before sending out dashboard subscriptions (it's a Slack requirement).`} /> </Form> )} diff --git a/frontend/src/metabase/admin/settings/slack/forms.ts b/frontend/src/metabase/admin/settings/slack/forms.ts index e4f83df2741..bed6642d25b 100644 --- a/frontend/src/metabase/admin/settings/slack/forms.ts +++ b/frontend/src/metabase/admin/settings/slack/forms.ts @@ -17,7 +17,7 @@ export const getSlackForm = ( { name: "slack-files-channel", type: "input", - title: t`Slack channel name`, + title: t`Public channel to store image files`, placeholder: "metabase_files", readOnly, validate: (value: string) => !value && t`required`, diff --git a/frontend/src/metabase/query_builder/components/DataSelector/DataSelectorFieldPicker/DataSelectorFieldPicker.unit.spec.tsx b/frontend/src/metabase/query_builder/components/DataSelector/DataSelectorFieldPicker/DataSelectorFieldPicker.unit.spec.tsx index dd9b9c37fc0..149de8369dc 100644 --- a/frontend/src/metabase/query_builder/components/DataSelector/DataSelectorFieldPicker/DataSelectorFieldPicker.unit.spec.tsx +++ b/frontend/src/metabase/query_builder/components/DataSelector/DataSelectorFieldPicker/DataSelectorFieldPicker.unit.spec.tsx @@ -2,9 +2,9 @@ import React from "react"; import { fireEvent, render, screen } from "@testing-library/react"; import { ORDERS } from "__support__/sample_database_fixture"; -import DataSelectorFieldPicker from "./DataSelectorFieldPicker"; import type { Table } from "metabase-types/api/table"; import type { Field } from "metabase-types/api/field"; +import DataSelectorFieldPicker from "./DataSelectorFieldPicker"; const props = { hasFiltering: true, diff --git a/frontend/test/metabase/scenarios/admin/settings/settings.cy.spec.js b/frontend/test/metabase/scenarios/admin/settings/settings.cy.spec.js index fad47a62b60..ba5c02ebef6 100644 --- a/frontend/test/metabase/scenarios/admin/settings/settings.cy.spec.js +++ b/frontend/test/metabase/scenarios/admin/settings/settings.cy.spec.js @@ -284,7 +284,9 @@ describe("scenarios > admin > settings", () => { cy.findByText("Metabase on Slack"); cy.findByLabelText("Slack Bot User OAuth Token").type("xoxb"); - cy.findByLabelText("Slack channel name").type("metabase_files"); + cy.findByLabelText("Public channel to store image files").type( + "metabase_files", + ); cy.button("Save changes").click(); cy.findByText(": invalid token"); -- GitLab