Use a proper capitalization of the SendGrid name (#869)
This commit is contained in:
parent
fe767a494b
commit
b8c528397a
14 changed files with 34 additions and 29 deletions
5
.changeset/gorgeous-crews-invite.md
Normal file
5
.changeset/gorgeous-crews-invite.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
"saleor-app-emails-and-messages": patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Changed capitalization of the name SendGrid in the UI.
|
|
@ -63,7 +63,7 @@
|
||||||
|
|
||||||
Added message to interface for users with missing permission or Saleor version without the support for this event.
|
Added message to interface for users with missing permission or Saleor version without the support for this event.
|
||||||
|
|
||||||
- e1980aa: Added validation for Sendgrid events form. Enabling event without a template is no longer allowed to avoid misconfiguration and undelivered emails.
|
- e1980aa: Added validation for SendGrid events form. Enabling event without a template is no longer allowed to avoid misconfiguration and undelivered emails.
|
||||||
- 6299e06: Update @saleor/app-sdk to 0.41.0
|
- 6299e06: Update @saleor/app-sdk to 0.41.0
|
||||||
- bda814b: Fixed issue with SMTP provider not sending emails on some ports.
|
- bda814b: Fixed issue with SMTP provider not sending emails on some ports.
|
||||||
- 78670ce: Changed formatting in the debugging logs to be more concise.
|
- 78670ce: Changed formatting in the debugging logs to be more concise.
|
||||||
|
@ -109,9 +109,9 @@
|
||||||
|
|
||||||
- a8834a1: Unified graphql version to 16.6
|
- a8834a1: Unified graphql version to 16.6
|
||||||
- cce2fbc: Improved layout spacing across the application.
|
- cce2fbc: Improved layout spacing across the application.
|
||||||
- e106ab9: Added improved descriptions in the Sendgrid configuration views.
|
- e106ab9: Added improved descriptions in the SendGrid configuration views.
|
||||||
- a8834a1: Unified graphql codegen packages
|
- a8834a1: Unified graphql codegen packages
|
||||||
- e106ab9: Added improved descriptions in the Sendgrid configuration views.
|
- e106ab9: Added improved descriptions in the SendGrid configuration views.
|
||||||
- a8834a1: Removed unnecessary duplicated dependencies from apps and moved them to shared and root (types, eslint rules)
|
- a8834a1: Removed unnecessary duplicated dependencies from apps and moved them to shared and root (types, eslint rules)
|
||||||
- a8834a1: Updated dev dependencies - Typescript, Eslint and Turborepo
|
- a8834a1: Updated dev dependencies - Typescript, Eslint and Turborepo
|
||||||
- 928c727: Updated @saleor/macaw-ui to 0.8.0-pre.95. This version introduces change in spacing scale, so there may be slight changes in spacing
|
- 928c727: Updated @saleor/macaw-ui to 0.8.0-pre.95. This version introduces change in spacing scale, so there may be slight changes in spacing
|
||||||
|
@ -227,7 +227,7 @@
|
||||||
|
|
||||||
### Minor Changes
|
### Minor Changes
|
||||||
|
|
||||||
- 14ac614: Enable Sendgrid support
|
- 14ac614: Enable SendGrid support
|
||||||
|
|
||||||
### Patch Changes
|
### Patch Changes
|
||||||
|
|
||||||
|
|
|
@ -28,7 +28,7 @@ const NoExistingConfigurations = () => {
|
||||||
type ProviderType = "sendgrid" | "smtp";
|
type ProviderType = "sendgrid" | "smtp";
|
||||||
|
|
||||||
const providerLabels: Record<ProviderType, string> = {
|
const providerLabels: Record<ProviderType, string> = {
|
||||||
sendgrid: "Sendgrid",
|
sendgrid: "SendGrid",
|
||||||
smtp: "SMTP",
|
smtp: "SMTP",
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -91,7 +91,7 @@ export const sendEventMessages = async ({
|
||||||
});
|
});
|
||||||
|
|
||||||
if (sendgridStatus?.errors.length) {
|
if (sendgridStatus?.errors.length) {
|
||||||
logger.error("Sendgrid errors");
|
logger.error("SendGrid errors");
|
||||||
logger.error(sendgridStatus?.errors);
|
logger.error(sendgridStatus?.errors);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ export const sendSendgrid = async ({
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.debug("Sending an email using Sendgrid");
|
logger.debug("Sending an email using SendGrid");
|
||||||
|
|
||||||
const { template } = eventSettings;
|
const { template } = eventSettings;
|
||||||
|
|
||||||
|
@ -77,7 +77,7 @@ export const sendSendgrid = async ({
|
||||||
});
|
});
|
||||||
logger.debug("Email has been send");
|
logger.debug("Email has been send");
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error("The Sendgrid API returned an error");
|
logger.error("The SendGrid API returned an error");
|
||||||
logger.error(error);
|
logger.error(error);
|
||||||
if (error instanceof Error) {
|
if (error instanceof Error) {
|
||||||
return { errors: [{ message: error.message }] };
|
return { errors: [{ message: error.message }] };
|
||||||
|
|
|
@ -7,7 +7,7 @@ export const fetchTemplates =
|
||||||
async () => {
|
async () => {
|
||||||
if (!apiKey) {
|
if (!apiKey) {
|
||||||
console.warn(
|
console.warn(
|
||||||
"The Sendgrid API key has not been set up yet. Skipping fetching available templates."
|
"The SendGrid API key has not been set up yet. Skipping fetching available templates."
|
||||||
);
|
);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@ -22,7 +22,7 @@ export const fetchTemplates =
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
console.error("Could not fetch available Sendgrid templates");
|
console.error("Could not fetch available SendGrid templates");
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -37,7 +37,7 @@ export const fetchTemplates =
|
||||||
|
|
||||||
return templates;
|
return templates;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Could not parse the response from Sendgrid", e);
|
console.error("Could not parse the response from SendGrid", e);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -47,7 +47,7 @@ export const fetchSenders =
|
||||||
async () => {
|
async () => {
|
||||||
if (!apiKey) {
|
if (!apiKey) {
|
||||||
console.warn(
|
console.warn(
|
||||||
"The Sendgrid API key has not been set up yet. Skipping fetching available senders ."
|
"The SendGrid API key has not been set up yet. Skipping fetching available senders ."
|
||||||
);
|
);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
@ -59,7 +59,7 @@ export const fetchSenders =
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
console.error("Could not fetch available Sendgrid senders");
|
console.error("Could not fetch available SendGrid senders");
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
|
@ -76,7 +76,7 @@ export const fetchSenders =
|
||||||
|
|
||||||
return senders;
|
return senders;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
console.error("Could not parse the response from Sendgrid", e);
|
console.error("Could not parse the response from SendGrid", e);
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -62,7 +62,7 @@ export const ApiConnectionSection = ({ configuration }: ApiConnectionSectionProp
|
||||||
label="API Key"
|
label="API Key"
|
||||||
name="apiKey"
|
name="apiKey"
|
||||||
control={control}
|
control={control}
|
||||||
helperText="The API key can be generated in your Sendgrid dashboard"
|
helperText="The API key can be generated in your SendGrid dashboard"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
|
|
|
@ -3,7 +3,7 @@ import { Text } from "@saleor/macaw-ui/next";
|
||||||
|
|
||||||
export const SendgridApiKeyDescriptionText = () => (
|
export const SendgridApiKeyDescriptionText = () => (
|
||||||
<Text as="p">
|
<Text as="p">
|
||||||
The API keys can be found at your Sendgrid dashboard, in the Settings menu. You can find more
|
The API keys can be found at your SendGrid dashboard, in the Settings menu. You can find more
|
||||||
information in the{" "}
|
information in the{" "}
|
||||||
<TextLink href="https://docs.sendgrid.com/ui/account-and-settings/api-keys" newTab={true}>
|
<TextLink href="https://docs.sendgrid.com/ui/account-and-settings/api-keys" newTab={true}>
|
||||||
documentation
|
documentation
|
||||||
|
|
|
@ -75,7 +75,7 @@ export const SendgridEventsSection = ({ configuration }: SendgridEventsSectionPr
|
||||||
title="Events"
|
title="Events"
|
||||||
description={
|
description={
|
||||||
<Text as="p">
|
<Text as="p">
|
||||||
Choose which Saleor events should send emails via Sendgrid. You can create and modify your
|
Choose which Saleor events should send emails via SendGrid. You can create and modify your
|
||||||
templates in the{" "}
|
templates in the{" "}
|
||||||
<TextLink href="https://mc.sendgrid.com/dynamic-templates" newTab={true}>
|
<TextLink href="https://mc.sendgrid.com/dynamic-templates" newTab={true}>
|
||||||
Sendgrid dashboard
|
Sendgrid dashboard
|
||||||
|
|
|
@ -7,5 +7,5 @@ interface SendgridLogoProps {
|
||||||
}
|
}
|
||||||
|
|
||||||
export const SendgridLogo = ({ height, width }: SendgridLogoProps) => {
|
export const SendgridLogo = ({ height, width }: SendgridLogoProps) => {
|
||||||
return <Image alt="Sendgrid logo" src={sendgrid} height={height} width={width} />;
|
return <Image alt="SendGrid logo" src={sendgrid} height={height} width={width} />;
|
||||||
};
|
};
|
||||||
|
|
|
@ -57,7 +57,7 @@ export const SendgridSenderSection = ({ configuration }: SendgridSenderSectionPr
|
||||||
<Text as="p">
|
<Text as="p">
|
||||||
Authenticating the sender is required to send emails. Configure your sender in{" "}
|
Authenticating the sender is required to send emails. Configure your sender in{" "}
|
||||||
<TextLink href="https://app.sendgrid.com/settings/sender_auth" newTab={true}>
|
<TextLink href="https://app.sendgrid.com/settings/sender_auth" newTab={true}>
|
||||||
Sendgrid dashboard
|
SendGrid dashboard
|
||||||
</TextLink>{" "}
|
</TextLink>{" "}
|
||||||
and choose it from the list.
|
and choose it from the list.
|
||||||
</Text>
|
</Text>
|
||||||
|
|
|
@ -28,9 +28,9 @@ const ChooseProviderPage: NextPage = () => {
|
||||||
<SectionWithDescription title="Choose provider">
|
<SectionWithDescription title="Choose provider">
|
||||||
<Box display="grid" gridTemplateColumns={2} gap={3}>
|
<Box display="grid" gridTemplateColumns={2} gap={3}>
|
||||||
<ProviderSelectionBox
|
<ProviderSelectionBox
|
||||||
providerName="Sendgrid"
|
providerName="SendGrid"
|
||||||
providerLogo={<SendgridLogo height={20} width={20} />}
|
providerLogo={<SendgridLogo height={20} width={20} />}
|
||||||
providerDescription="Use dynamic templates created in Sendgrid dashboard to send messages. Event data will be forwarded to Sendgrid."
|
providerDescription="Use dynamic templates created in SendGrid dashboard to send messages. Event data will be forwarded to SendGrid."
|
||||||
onClick={() => push(sendgridUrls.newConfiguration())}
|
onClick={() => push(sendgridUrls.newConfiguration())}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ const LoadingView = () => {
|
||||||
<BasicLayout
|
<BasicLayout
|
||||||
breadcrumbs={[
|
breadcrumbs={[
|
||||||
{ name: "Configuration", href: appUrls.configuration() },
|
{ name: "Configuration", href: appUrls.configuration() },
|
||||||
{ name: "Sendgrid provider" },
|
{ name: "SendGrid provider" },
|
||||||
{ name: "..." },
|
{ name: "..." },
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
|
@ -31,7 +31,7 @@ const NotFoundView = () => {
|
||||||
<BasicLayout
|
<BasicLayout
|
||||||
breadcrumbs={[
|
breadcrumbs={[
|
||||||
{ name: "Configuration", href: appUrls.configuration() },
|
{ name: "Configuration", href: appUrls.configuration() },
|
||||||
{ name: "Sendgrid provider" },
|
{ name: "SendGrid provider" },
|
||||||
{ name: "Not found" },
|
{ name: "Not found" },
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
|
@ -78,13 +78,13 @@ const EditSendgridConfigurationPage: NextPage = () => {
|
||||||
breadcrumbs={[
|
breadcrumbs={[
|
||||||
{ name: "Configuration", href: appUrls.configuration() },
|
{ name: "Configuration", href: appUrls.configuration() },
|
||||||
{
|
{
|
||||||
name: `Sendgrid: ${configuration.name}`,
|
name: `SendGrid: ${configuration.name}`,
|
||||||
},
|
},
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Box display="grid" gridTemplateColumns={{ desktop: 3, mobile: 1 }}>
|
<Box display="grid" gridTemplateColumns={{ desktop: 3, mobile: 1 }}>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Connect Sendgrid with Saleor.</Text>
|
<Text>Connect SendGrid with Saleor.</Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
<SendgridBasicInformationSection configuration={configuration} />
|
<SendgridBasicInformationSection configuration={configuration} />
|
||||||
|
|
|
@ -43,16 +43,16 @@ const NewSendgridConfigurationPage: NextPage = () => {
|
||||||
breadcrumbs={[
|
breadcrumbs={[
|
||||||
{ name: "Configuration", href: appUrls.configuration() },
|
{ name: "Configuration", href: appUrls.configuration() },
|
||||||
{ name: "Add provider" },
|
{ name: "Add provider" },
|
||||||
{ name: "Sendgrid" },
|
{ name: "SendGrid" },
|
||||||
]}
|
]}
|
||||||
>
|
>
|
||||||
<Box display="grid" gridTemplateColumns={{ desktop: 3, mobile: 1 }}>
|
<Box display="grid" gridTemplateColumns={{ desktop: 3, mobile: 1 }}>
|
||||||
<Box>
|
<Box>
|
||||||
<Text>Connect Sendgrid with Saleor.</Text>
|
<Text>Connect SendGrid with Saleor.</Text>
|
||||||
</Box>
|
</Box>
|
||||||
</Box>
|
</Box>
|
||||||
<SectionWithDescription
|
<SectionWithDescription
|
||||||
title="Connect Sendgrid"
|
title="Connect SendGrid"
|
||||||
description={
|
description={
|
||||||
<Box display="flex" flexDirection="column" gap={2}>
|
<Box display="flex" flexDirection="column" gap={2}>
|
||||||
<ConfigurationNameDescriptionText />
|
<ConfigurationNameDescriptionText />
|
||||||
|
@ -80,7 +80,7 @@ const NewSendgridConfigurationPage: NextPage = () => {
|
||||||
name="apiKey"
|
name="apiKey"
|
||||||
control={control}
|
control={control}
|
||||||
label="API key"
|
label="API key"
|
||||||
helperText={"The API key can be generated in your Sendgrid dashboard"}
|
helperText={"The API key can be generated in your SendGrid dashboard"}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
<BoxFooter>
|
<BoxFooter>
|
||||||
|
|
Loading…
Reference in a new issue