From 65391ab2e025f5dedecb720343f0d6eb8cb91c48 Mon Sep 17 00:00:00 2001 From: Aman Agarwal Date: Wed, 25 Dec 2024 11:58:07 +0530 Subject: [PATCH 1/2] fix: calendly link on schedule a call click, jira and slack integration premium tag (#38331) --- .../src/constants/PremiumDatasourcesConstants.ts | 11 +++++++++++ .../IntegrationEditor/CreateNewDatasourceTab.tsx | 14 ++++++-------- .../Editor/IntegrationEditor/DatasourceHome.tsx | 1 - .../src/pages/Editor/IntegrationEditor/NewApi.tsx | 4 +++- .../pages/Editor/IntegrationEditor/NewQuery.tsx | 4 +--- .../PremiumDatasources/ContactForm.tsx | 6 +++--- app/client/src/utils/PremiumDatasourcesHelpers.ts | 10 ++++++++++ 7 files changed, 34 insertions(+), 16 deletions(-) diff --git a/app/client/src/constants/PremiumDatasourcesConstants.ts b/app/client/src/constants/PremiumDatasourcesConstants.ts index e659b55bbbef..dba0034d1a02 100644 --- a/app/client/src/constants/PremiumDatasourcesConstants.ts +++ b/app/client/src/constants/PremiumDatasourcesConstants.ts @@ -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"; diff --git a/app/client/src/pages/Editor/IntegrationEditor/CreateNewDatasourceTab.tsx b/app/client/src/pages/Editor/IntegrationEditor/CreateNewDatasourceTab.tsx index e23016fdfae5..8782924c38f8 100644 --- a/app/client/src/pages/Editor/IntegrationEditor/CreateNewDatasourceTab.tsx +++ b/app/client/src/pages/Editor/IntegrationEditor/CreateNewDatasourceTab.tsx @@ -131,7 +131,6 @@ function CreateNewDatasource({ active, isCreating, isOnboardingScreen, - isPremiumDatasourcesViewEnabled, pageId, showMostPopularPlugins, showUnsupportedPluginDialog, // TODO: Fix this the next time the file is edited @@ -172,11 +171,7 @@ function CreateNewDatasource({ parentEntityType={parentEntityType} showMostPopularPlugins={showMostPopularPlugins} showUnsupportedPluginDialog={showUnsupportedPluginDialog} - > - {showMostPopularPlugins && isPremiumDatasourcesViewEnabled && ( - - )} - + /> ); } @@ -184,6 +179,7 @@ function CreateNewDatasource({ 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 @@ -217,7 +213,9 @@ function CreateNewSaasIntegration({ pageId={pageId} showSaasAPIs showUnsupportedPluginDialog={showUnsupportedPluginDialog} - /> + > + {isPremiumDatasourcesViewEnabled && } + ) : null; @@ -321,7 +319,6 @@ class CreateNewDatasourceTab extends React.Component< active={false} isCreating={isCreating} isOnboardingScreen={!!isOnboardingScreen} - isPremiumDatasourcesViewEnabled={isPremiumDatasourcesViewEnabled} location={location} pageId={pageId} showMostPopularPlugins @@ -347,6 +344,7 @@ class CreateNewDatasourceTab extends React.Component< { ); })} - {this.props.children} ); diff --git a/app/client/src/pages/Editor/IntegrationEditor/NewApi.tsx b/app/client/src/pages/Editor/IntegrationEditor/NewApi.tsx index 4364bad281e3..a16ce56a84f0 100644 --- a/app/client/src/pages/Editor/IntegrationEditor/NewApi.tsx +++ b/app/client/src/pages/Editor/IntegrationEditor/NewApi.tsx @@ -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 { @@ -142,6 +142,7 @@ interface ApiHomeScreenProps { apiType: string, ) => void; isOnboardingScreen?: boolean; + children?: ReactNode; } type Props = ApiHomeScreenProps; @@ -328,6 +329,7 @@ function NewApiScreen(props: Props) { ))} + {props.children} ); diff --git a/app/client/src/pages/Editor/IntegrationEditor/NewQuery.tsx b/app/client/src/pages/Editor/IntegrationEditor/NewQuery.tsx index 78fec8f8a883..15ea740854db 100644 --- a/app/client/src/pages/Editor/IntegrationEditor/NewQuery.tsx +++ b/app/client/src/pages/Editor/IntegrationEditor/NewQuery.tsx @@ -56,9 +56,7 @@ class QueryHomeScreen extends React.Component { parentEntityType={parentEntityType} showMostPopularPlugins={showMostPopularPlugins} showUnsupportedPluginDialog={showUnsupportedPluginDialog} - > - {this.props.children} - + /> ); } diff --git a/app/client/src/pages/Editor/IntegrationEditor/PremiumDatasources/ContactForm.tsx b/app/client/src/pages/Editor/IntegrationEditor/PremiumDatasources/ContactForm.tsx index 369fb7c7b020..63f265df3fed 100644 --- a/app/client/src/pages/Editor/IntegrationEditor/PremiumDatasources/ContactForm.tsx +++ b/app/client/src/pages/Editor/IntegrationEditor/PremiumDatasources/ContactForm.tsx @@ -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"; @@ -97,7 +97,7 @@ const PremiumDatasourceContactForm = ( size="md" type="email" /> - + {shouldLearnMoreButtonBeVisible(!isFreePlanInstance) && (