Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: calendly link on schedule a call click, jira and slack integration premium tag #38331

Merged
merged 5 commits into from
Dec 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions app/client/src/constants/PremiumDatasourcesConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,18 @@ export const PREMIUM_INTEGRATIONS: PremiumIntegration[] = [
name: "Salesforce",
icon: getAssetUrl(`${ASSETS_CDN_URL}/salesforce-icon.png`),
},
{
name: "Slack",
icon: getAssetUrl(`${ASSETS_CDN_URL}/slack.png`),
},
{
name: "Jira",
icon: getAssetUrl(`${ASSETS_CDN_URL}/jira.png`),
},
];

export const PREMIUM_INTEGRATION_CONTACT_FORM =
"PREMIUM_INTEGRATION_CONTACT_FORM";

export const SCHEDULE_CALL_URL =
"https://calendly.com/carina-neves-fonseca/appsmith";
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ function CreateNewDatasource({
active,
isCreating,
isOnboardingScreen,
isPremiumDatasourcesViewEnabled,
pageId,
showMostPopularPlugins,
showUnsupportedPluginDialog, // TODO: Fix this the next time the file is edited
Expand Down Expand Up @@ -172,18 +171,15 @@ function CreateNewDatasource({
parentEntityType={parentEntityType}
showMostPopularPlugins={showMostPopularPlugins}
showUnsupportedPluginDialog={showUnsupportedPluginDialog}
>
{showMostPopularPlugins && isPremiumDatasourcesViewEnabled && (
<PremiumDatasources />
)}
</NewQueryScreen>
/>
</div>
);
}

function CreateNewSaasIntegration({
active,
isCreating,
isPremiumDatasourcesViewEnabled,
pageId,
showUnsupportedPluginDialog, // TODO: Fix this the next time the file is edited
// eslint-disable-next-line @typescript-eslint/no-explicit-any
Expand Down Expand Up @@ -217,7 +213,9 @@ function CreateNewSaasIntegration({
pageId={pageId}
showSaasAPIs
showUnsupportedPluginDialog={showUnsupportedPluginDialog}
/>
>
{isPremiumDatasourcesViewEnabled && <PremiumDatasources />}
</NewApiScreen>
</div>
</>
) : null;
Expand Down Expand Up @@ -321,7 +319,6 @@ class CreateNewDatasourceTab extends React.Component<
active={false}
isCreating={isCreating}
isOnboardingScreen={!!isOnboardingScreen}
isPremiumDatasourcesViewEnabled={isPremiumDatasourcesViewEnabled}
location={location}
pageId={pageId}
showMostPopularPlugins
Expand All @@ -347,6 +344,7 @@ class CreateNewDatasourceTab extends React.Component<
<CreateNewSaasIntegration
active={false}
isCreating={isCreating}
isPremiumDatasourcesViewEnabled={isPremiumDatasourcesViewEnabled}
location={location}
pageId={pageId}
showUnsupportedPluginDialog={this.showUnsupportedPluginDialog}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ class DatasourceHomeScreen extends React.Component<Props> {
</DatasourceCard>
);
})}
{this.props.children}
</DatasourceCardsContainer>
</DatasourceHomePage>
);
Expand Down
4 changes: 3 additions & 1 deletion app/client/src/pages/Editor/IntegrationEditor/NewApi.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { useCallback, useEffect, useState } from "react";
import React, { useCallback, useEffect, useState, type ReactNode } from "react";
import { connect, useSelector } from "react-redux";
import styled from "styled-components";
import {
Expand Down Expand Up @@ -142,6 +142,7 @@ interface ApiHomeScreenProps {
apiType: string,
) => void;
isOnboardingScreen?: boolean;
children?: ReactNode;
}

type Props = ApiHomeScreenProps;
Expand Down Expand Up @@ -328,6 +329,7 @@ function NewApiScreen(props: Props) {
</CardContentWrapper>
</ApiCard>
))}
{props.children}
</ApiCardsContainer>
</StyledContainer>
);
Expand Down
4 changes: 1 addition & 3 deletions app/client/src/pages/Editor/IntegrationEditor/NewQuery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@ class QueryHomeScreen extends React.Component<QueryHomeScreenProps> {
parentEntityType={parentEntityType}
showMostPopularPlugins={showMostPopularPlugins}
showUnsupportedPluginDialog={showUnsupportedPluginDialog}
>
{this.props.children}
</DataSourceHome>
/>
</QueryHomePage>
);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Flex, ModalHeader, Text, toast } from "@appsmith/ads";
import { Button, ModalFooter, ModalHeader, Text, toast } from "@appsmith/ads";
import { createMessage, PREMIUM_DATASOURCES } from "ee/constants/messages";
import type { AppState } from "ee/reducers";
import React, { useCallback } from "react";
Expand Down Expand Up @@ -97,7 +97,7 @@ const PremiumDatasourceContactForm = (
size="md"
type="email"
/>
<Flex gap="spaces-7" justifyContent="flex-end" marginTop="spaces-3">
<ModalFooter>
{shouldLearnMoreButtonBeVisible(!isFreePlanInstance) && (
<Button
aria-label="Learn more"
Expand All @@ -114,7 +114,7 @@ const PremiumDatasourceContactForm = (
!isFreePlanInstance,
)}
</Button>
</Flex>
</ModalFooter>
</FormWrapper>
</>
);
Expand Down
10 changes: 10 additions & 0 deletions app/client/src/utils/PremiumDatasourcesHelpers.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { SCHEDULE_CALL_URL } from "constants/PremiumDatasourcesConstants";
import { createMessage, PREMIUM_DATASOURCES } from "ee/constants/messages";
import AnalyticsUtil from "ee/utils/AnalyticsUtil";
import { isRelevantEmail } from "utils/formhelpers";
Expand Down Expand Up @@ -58,6 +59,15 @@ export const handleSubmitEvent = (
email,
},
);

const scheduleACallUrl =
!isBusinessOrEnterprise && validRelevantEmail
? `${SCHEDULE_CALL_URL}?email=${email}`
: "";

if (scheduleACallUrl) {
window.open(scheduleACallUrl, "_blank");
}
};

export const getContactFormModalTitle = (
Expand Down
Loading