Skip to content

Commit 6754cc0

Browse files
committed
Remove onboarding typeform (#6752)
1 parent 8e836e8 commit 6754cc0

File tree

5 files changed

+13
-120
lines changed

5 files changed

+13
-120
lines changed

app/client/src/configs/index.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ export type INJECTED_CONFIGS = {
4343
disableTelemetry: boolean;
4444
cloudServicesBaseUrl: string;
4545
googleRecaptchaSiteKey: string;
46-
onboardingFormEnabled: boolean;
4746
supportEmail: string;
4847
};
4948
declare global {
@@ -120,7 +119,6 @@ const getConfigsFromEnvVars = (): INJECTED_CONFIGS => {
120119
cloudServicesBaseUrl: process.env.REACT_APP_CLOUD_SERVICES_BASE_URL || "",
121120
googleRecaptchaSiteKey:
122121
process.env.REACT_APP_GOOGLE_RECAPTCHA_SITE_KEY || "",
123-
onboardingFormEnabled: !!process.env.REACT_APP_SHOW_ONBOARDING_FORM,
124122
supportEmail: process.env.APPSMITH_SUPPORT_EMAIL || "support@appsmith.com",
125123
};
126124
};
@@ -285,7 +283,6 @@ export const getAppsmithConfigs = (): AppsmithUIConfigs => {
285283
cloudServicesBaseUrl:
286284
ENV_CONFIG.cloudServicesBaseUrl ||
287285
APPSMITH_FEATURE_CONFIGS.cloudServicesBaseUrl,
288-
onboardingFormEnabled: ENV_CONFIG.onboardingFormEnabled,
289286
appsmithSupportEmail: ENV_CONFIG.supportEmail,
290287
};
291288
};

app/client/src/configs/types.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,5 @@ export type AppsmithUIConfigs = {
7777
enabled: boolean;
7878
apiKey: string;
7979
};
80-
onboardingFormEnabled: boolean;
8180
appsmithSupportEmail: string;
8281
};

app/client/src/pages/Applications/OnboardingForm.tsx

Lines changed: 0 additions & 43 deletions
This file was deleted.

app/client/src/pages/Applications/index.tsx

Lines changed: 13 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -80,13 +80,7 @@ import AnalyticsUtil from "utils/AnalyticsUtil";
8080
import { createOrganizationSubmitHandler } from "../organization/helpers";
8181
import UserApi from "api/UserApi";
8282
import ImportApplicationModal from "./ImportApplicationModal";
83-
import OnboardingForm from "./OnboardingForm";
84-
import { getAppsmithConfigs } from "configs";
8583
import { SIGNUP_SUCCESS_URL } from "constants/routes";
86-
import {
87-
setOnboardingFormInProgress,
88-
getOnboardingFormInProgress,
89-
} from "utils/storage";
9084

9185
import { getIsSafeRedirectURL } from "utils/helpers";
9286

@@ -899,7 +893,6 @@ const getIsFromSignup = () => {
899893
return window.location?.pathname === SIGNUP_SUCCESS_URL;
900894
};
901895

902-
const { onboardingFormEnabled } = getAppsmithConfigs();
903896
class Applications extends Component<
904897
ApplicationProps,
905898
{ selectedOrgId: string; showOnboardingForm: boolean }
@@ -916,29 +909,12 @@ class Applications extends Component<
916909
componentDidMount() {
917910
PerformanceTracker.stopTracking(PerformanceTransactionName.LOGIN_CLICK);
918911
PerformanceTracker.stopTracking(PerformanceTransactionName.SIGN_UP);
919-
this.props.getAllApplication();
920-
window.addEventListener("message", this.handleTypeFormMessage, false);
921-
this.showOnboardingForm();
922-
}
923-
924-
componentWillUnmount() {
925-
window.removeEventListener("message", this.handleTypeFormMessage);
926-
}
927-
928-
showOnboardingForm = async () => {
929912
const isFromSignUp = getIsFromSignup();
930-
const isOnboardingFormInProgress = await getOnboardingFormInProgress();
931-
const showOnboardingForm =
932-
onboardingFormEnabled && (isFromSignUp || isOnboardingFormInProgress);
933-
this.setState({
934-
showOnboardingForm: !!showOnboardingForm,
935-
});
936-
937-
// Redirect directly in case we're not showing the onboarding form
938-
if (isFromSignUp && !onboardingFormEnabled) {
913+
if (isFromSignUp) {
939914
this.redirectUsingQueryParam();
940915
}
941-
};
916+
this.props.getAllApplication();
917+
}
942918

943919
redirectUsingQueryParam = () => {
944920
const urlObject = new URL(window.location.href);
@@ -954,32 +930,19 @@ class Applications extends Component<
954930
}
955931
};
956932

957-
handleTypeFormMessage = (event: any) => {
958-
if (event?.data?.type === "form-submit" && this.state.showOnboardingForm) {
959-
setOnboardingFormInProgress();
960-
this.redirectUsingQueryParam();
961-
}
962-
};
963-
964933
public render() {
965934
return (
966935
<PageWrapper displayName="Applications">
967-
{this.state.showOnboardingForm ? (
968-
<OnboardingForm />
969-
) : (
970-
<>
971-
<ProductUpdatesModal />
972-
<LeftPane />
973-
<SubHeader
974-
search={{
975-
placeholder: "Search for apps...",
976-
queryFn: this.props.searchApplications,
977-
defaultValue: this.props.searchKeyword,
978-
}}
979-
/>
980-
<ApplicationsSection searchKeyword={this.props.searchKeyword} />
981-
</>
982-
)}
936+
<ProductUpdatesModal />
937+
<LeftPane />
938+
<SubHeader
939+
search={{
940+
placeholder: "Search for apps...",
941+
queryFn: this.props.searchApplications,
942+
defaultValue: this.props.searchKeyword,
943+
}}
944+
/>
945+
<ApplicationsSection searchKeyword={this.props.searchKeyword} />
983946
</PageWrapper>
984947
);
985948
}

app/client/src/utils/storage.ts

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -206,26 +206,3 @@ export const getCommentsIntroSeen = async () => {
206206
log.error(error);
207207
}
208208
};
209-
210-
export const setOnboardingFormInProgress = async (flag?: boolean) => {
211-
try {
212-
await store.setItem(STORAGE_KEYS.ONBOARDING_FORM_IN_PROGRESS, flag);
213-
return true;
214-
} catch (error) {
215-
log.error("An error occurred when setting ONBOARDING_FORM_IN_PROGRESS");
216-
log.error(error);
217-
return false;
218-
}
219-
};
220-
221-
export const getOnboardingFormInProgress = async () => {
222-
try {
223-
const onboardingFormInProgress = await store.getItem(
224-
STORAGE_KEYS.ONBOARDING_FORM_IN_PROGRESS,
225-
);
226-
return onboardingFormInProgress;
227-
} catch (error) {
228-
log.error("An error occurred while fetching ONBOARDING_FORM_IN_PROGRESS");
229-
log.error(error);
230-
}
231-
};

0 commit comments

Comments
 (0)