fix: copy changes to the description and content of modal (#38637)

This commit is contained in:
Aman Agarwal 2025-01-15 16:17:27 +05:30 committed by GitHub
parent 446eb2b602
commit b496e4ab21
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 27 additions and 19 deletions

View File

@ -2575,23 +2575,23 @@ export const REQUEST_NEW_INTEGRATIONS = {
REQUEST_NEW_BUTTON: () => "Request a new integration",
REQUEST_BUTTON: () => "Request integration",
CANCEL_BUTTON: () => "Cancel",
REQUEST_MODAL_HEADING: () => "Request a new integration",
REQUEST_MODAL_HEADING: () => "Request new integration",
REQUEST_MODAL_INTEGRATION: {
LABEL: () => "Integration",
LABEL: () => "Integration name",
PLACEHOLDER: () => "E.g. Zendesk, JIRA, Slack, others",
NAME: "integration",
ERROR: () => "Please enter integration name",
},
REQUEST_MODAL_USECASE: {
LABEL: () => "Tell us more about your case",
LABEL: () => "How would this integration help you?",
PLACEHOLDER: () =>
"E.g. I want to create an app to manage my customers account.",
"For example, organizing client data or automating reports.",
NAME: "useCase",
},
REQUEST_MODAL_EMAIL: {
LABEL: () => "Email",
DESCRIPTION: () =>
"Appsmith will use this email exclusively to follow up on your integration request.",
"Well use this email solely to follow up on your request.",
NAME: "email",
ERROR: () => "Please enter email",
},
@ -2599,10 +2599,10 @@ export const REQUEST_NEW_INTEGRATIONS = {
};
export const PREMIUM_DATASOURCES = {
RELEVANT_EMAIL_DESCRIPTION: () =>
"Unblock advanced integrations. Let our team guide you in selecting the plan that fits your needs. Schedule a call now to see how Appsmith can transform your workflows!",
NON_RELEVANT_EMAIL_DESCRIPTION: () =>
"Unblock advanced integrations. Let our team guide you in selecting the plan that fits your needs. Give us your email and the Appsmith team will reach out to you soon.",
RELEVANT_EMAIL_DESCRIPTION: (integrationName: string) =>
`Ready to connect with ${integrationName}? This feature is part of our premium plans. Schedule a call with our team to explore the right plan for your needs. Were excited to help you get started!`,
NON_RELEVANT_EMAIL_DESCRIPTION: (integrationName: string) =>
`Ready to connect with ${integrationName}? This feature is part of our premium plans. We'll help you find a plan that fits your needs. Simply share your email, and we'll be in touch soon.`,
LEARN_MORE: () => "Learn more about Premium",
SCHEDULE_CALL: () => "Schedule a call",
SUBMIT: () => "Submit",
@ -2611,15 +2611,15 @@ export const PREMIUM_DATASOURCES = {
FORM_EMAIL: {
LABEL: () => "Email",
DESCRIPTION: () =>
"Appsmith will use this email to follow up on your integration interest.",
"Well use this email solely to follow up on your request.",
NAME: "email",
ERROR: () => "Please enter email",
},
PREMIUM_TAG: () => "Premium",
SOON_TAG: () => "Soon",
COMING_SOON_SUFFIX: () => "Coming soon",
COMING_SOON_SUFFIX: () => "is coming soon",
COMING_SOON_DESCRIPTION: () =>
"The Appsmith Team is actively working on it. Well let you know when this integration is live. ",
"This integration is currently in development. Submit your email below to be notified as soon as its available.",
NOTIFY_ME: () => "Notify me",
};

View File

@ -84,6 +84,7 @@ const PremiumDatasourceContactForm = (
<Text renderAs="p">
{getContactFormModalDescription(
props.email || "",
props.integrationName,
!isFreePlanInstance,
)}
</Text>

View File

@ -74,11 +74,12 @@ export const getContactFormModalTitle = (
integrationName: string,
isBusinessOrEnterprise?: boolean,
) => {
return `${isBusinessOrEnterprise ? "Integration to " : ""}${integrationName} ${isBusinessOrEnterprise ? `- ${createMessage(PREMIUM_DATASOURCES.COMING_SOON_SUFFIX)}` : ""}`;
return `${integrationName} ${isBusinessOrEnterprise ? `${createMessage(PREMIUM_DATASOURCES.COMING_SOON_SUFFIX)}` : ""}`;
};
export const getContactFormModalDescription = (
email: string,
integrationName: string,
isBusinessOrEnterprise?: boolean,
) => {
const validRelevantEmail = isRelevantEmail(email);
@ -86,8 +87,14 @@ export const getContactFormModalDescription = (
return isBusinessOrEnterprise
? createMessage(PREMIUM_DATASOURCES.COMING_SOON_DESCRIPTION)
: validRelevantEmail
? createMessage(PREMIUM_DATASOURCES.RELEVANT_EMAIL_DESCRIPTION)
: createMessage(PREMIUM_DATASOURCES.NON_RELEVANT_EMAIL_DESCRIPTION);
? createMessage(
PREMIUM_DATASOURCES.RELEVANT_EMAIL_DESCRIPTION,
integrationName,
)
: createMessage(
PREMIUM_DATASOURCES.NON_RELEVANT_EMAIL_DESCRIPTION,
integrationName,
);
};
export const shouldLearnMoreButtonBeVisible = (

View File

@ -1,4 +1,4 @@
import { Button, Flex, toast } from "@appsmith/ads";
import { Button, ModalFooter, toast } from "@appsmith/ads";
import { Close } from "@radix-ui/react-dialog";
import { createMessage, REQUEST_NEW_INTEGRATIONS } from "ee/constants/messages";
import type { AppState } from "ee/reducers";
@ -21,7 +21,7 @@ import AnalyticsUtil from "ee/utils/AnalyticsUtil";
const FormWrapper = styled.form`
display: flex;
flex-direction: column;
gap: var(--ads-spaces-7);
gap: var(--ads-spaces-5);
`;
const RequestIntegrationForm = (props: RequestIntegrationFormProps) => {
@ -75,7 +75,7 @@ const RequestIntegrationForm = (props: RequestIntegrationFormProps) => {
size="md"
type="email"
/>
<Flex gap="spaces-7" justifyContent="flex-end" marginTop="spaces-3">
<ModalFooter>
<Close>
<Button aria-label="Close" kind="secondary" size="md">
{createMessage(REQUEST_NEW_INTEGRATIONS.CANCEL_BUTTON)}
@ -84,7 +84,7 @@ const RequestIntegrationForm = (props: RequestIntegrationFormProps) => {
<Button isDisabled={props.invalid} size="md" type="submit">
{createMessage(REQUEST_NEW_INTEGRATIONS.REQUEST_BUTTON)}
</Button>
</Flex>
</ModalFooter>
</FormWrapper>
);
};