diff --git a/.github/workflows/client-test.yml b/.github/workflows/client-test.yml index 994845a1df..caea0a51b3 100644 --- a/.github/workflows/client-test.yml +++ b/.github/workflows/client-test.yml @@ -116,6 +116,7 @@ jobs: REACT_APP_VERSION_ID=${{ steps.vars.outputs.version }} \ REACT_APP_VERSION_RELEASE_DATE=$(date -u '+%Y-%m-%dT%H:%M:%SZ') \ REACT_APP_GOOGLE_ANALYTICS_ID=${{ secrets.GOOGLE_TAG_MANAGER_ID }} \ + REACT_APP_SHOW_ONBOARDING_FORM=true \ yarn build # Upload the build artifact so that it can be used by the test & deploy job in the workflow diff --git a/app/client/netlify.toml b/app/client/netlify.toml index 435adaafc5..3bb6abd265 100644 --- a/app/client/netlify.toml +++ b/app/client/netlify.toml @@ -14,6 +14,7 @@ REACT_APP_MAIL_ENABLED = "true" REACT_APP_SENTRY_DSN = "https://abf15a075d1347969df44c746cca7eaa@o296332.ingest.sentry.io/1546547" REACT_APP_SENTRY_ENVIRONMENT = "Production" + REACT_APP_SHOW_ONBOARDING_FORM = "true" SENTRY_AUTH_TOKEN = "dfdf7fa46c5b483a944b4571554d6466da3c64a6ed8b46e3b8a4285183a6bcc3" SENTRY_DSN = "https://abf15a075d1347969df44c746cca7eaa@o296332.ingest.sentry.io/1546547" SENTRY_ORG = "appsmith" diff --git a/app/client/src/configs/index.ts b/app/client/src/configs/index.ts index fa580394d0..e4b2b60f9a 100644 --- a/app/client/src/configs/index.ts +++ b/app/client/src/configs/index.ts @@ -42,6 +42,7 @@ export type INJECTED_CONFIGS = { mailEnabled: boolean; disableTelemetry: boolean; cloudServicesBaseUrl: string; + onboardingFormEnabled: boolean; }; declare global { interface Window { @@ -115,6 +116,7 @@ const getConfigsFromEnvVars = (): INJECTED_CONFIGS => { : false, disableTelemetry: true, cloudServicesBaseUrl: process.env.REACT_APP_CLOUD_SERVICES_BASE_URL || "", + onboardingFormEnabled: !!process.env.REACT_APP_SHOW_ONBOARDING_FORM, }; }; @@ -269,5 +271,6 @@ export const getAppsmithConfigs = (): AppsmithUIConfigs => { cloudServicesBaseUrl: ENV_CONFIG.cloudServicesBaseUrl || APPSMITH_FEATURE_CONFIGS.cloudServicesBaseUrl, + onboardingFormEnabled: ENV_CONFIG.onboardingFormEnabled, }; }; diff --git a/app/client/src/configs/types.ts b/app/client/src/configs/types.ts index 7a73abd169..fde3769c7c 100644 --- a/app/client/src/configs/types.ts +++ b/app/client/src/configs/types.ts @@ -72,4 +72,6 @@ export type AppsmithUIConfigs = { commentsTestModeEnabled: boolean; cloudServicesBaseUrl: string; + + onboardingFormEnabled: boolean; }; diff --git a/app/client/src/index.tsx b/app/client/src/index.tsx index 09b9329784..adac756b97 100755 --- a/app/client/src/index.tsx +++ b/app/client/src/index.tsx @@ -26,11 +26,7 @@ import AppErrorBoundary from "./AppErrorBoundry"; import GlobalStyles from "globalStyles"; appInitializer(); -import useRemoveSignUpCompleteParam from "utils/hooks/useRemoveSignUpCompleteParam"; - function App() { - useRemoveSignUpCompleteParam(); - return ( diff --git a/app/client/src/pages/Applications/OnboardingForm.tsx b/app/client/src/pages/Applications/OnboardingForm.tsx new file mode 100644 index 0000000000..dfdfb8b576 --- /dev/null +++ b/app/client/src/pages/Applications/OnboardingForm.tsx @@ -0,0 +1,38 @@ +import React from "react"; +import { useSelector } from "react-redux"; +import { useScript, ScriptStatus } from "utils/hooks/useScript"; +import { getCurrentUser } from "selectors/usersSelectors"; +import styled from "styled-components"; + +export const TypeformContainer = styled.div` + & iframe { + position: absolute; + left: 0; + right: 0; + bottom: 0; + top: 0; + border: 0; + } +`; + +function OnboardingForm() { + const status = useScript(`https://embed.typeform.com/embed.js`); + const currentUser = useSelector(getCurrentUser); + + if (status !== ScriptStatus.READY) return null; + + return ( + +