Skip to content

Commit

Permalink
Remove signup source selection experiment (#21819)
Browse files Browse the repository at this point in the history
  • Loading branch information
timroes authored Jan 25, 2023
1 parent 113b134 commit ecc17b6
Show file tree
Hide file tree
Showing 12 changed files with 2 additions and 1,918 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ export interface Experiments {
"authPage.oauth.google.signUpPage": boolean;
"authPage.oauth.github.signUpPage": boolean;
"onboarding.speedyConnection": boolean;
"authPage.signup.sourceSelector": boolean;
"authPage.oauth.position": "top" | "bottom";
"connection.onboarding.sources": string;
"connection.onboarding.destinations": string;
Expand Down
10 changes: 0 additions & 10 deletions airbyte-webapp/src/hooks/useLocationState.ts

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion airbyte-webapp/src/packages/cloud/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
"login.oauth.github": "Continue with GitHub",
"login.oauth.differentCredentialsError": "Use your email and password to sign in.",
"login.oauth.unknownError": "An unknown error happened during sign in: {error}",
"login.sourceSelector": "Select a source to get started",

"confirmResetPassword.newPassword": "Enter a new password",
"confirmResetPassword.success": "Your password has been reset. Please log in with the new password.",
Expand Down
16 changes: 0 additions & 16 deletions airbyte-webapp/src/packages/cloud/views/DefaultView.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
import { useEffect } from "react";
import { Navigate } from "react-router-dom";

import { useExperiment } from "hooks/services/Experiment";

import { RoutePaths } from "../../../pages/routePaths";
import { CloudRoutes } from "../cloudRoutePaths";
import { EXP_SOURCE_SIGNUP_SELECTOR } from "../components/experiments/constants";
import { useListCloudWorkspaces } from "../services/workspaces/CloudWorkspacesService";

export const DefaultView: React.FC = () => {
const workspaces = useListCloudWorkspaces();
// exp-signup-selected-source-definition
const isSignupSourceSelectorExperiment = useExperiment("authPage.signup.sourceSelector", false);
const sourceDefinitionId = localStorage.getItem(EXP_SOURCE_SIGNUP_SELECTOR);

useEffect(() => {
localStorage.removeItem(EXP_SOURCE_SIGNUP_SELECTOR);
}, []);
// Only show the workspace creation list if there is more than one workspace
// otherwise redirect to the single workspace
return (
Expand All @@ -27,12 +17,6 @@ export const DefaultView: React.FC = () => {
: `/${RoutePaths.Workspaces}/${workspaces[0].workspaceId}`
}
replace
// exp-signup-selected-source-definition
{...(isSignupSourceSelectorExperiment &&
sourceDefinitionId && {
state: { sourceDefinitionId },
to: `/${RoutePaths.Workspaces}/${workspaces[0].workspaceId}/${RoutePaths.Connections}/${RoutePaths.ConnectionNew}`,
})}
/>
);
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { LabeledInput, Link } from "components";
import { Button } from "components/ui/Button";

import { useExperiment } from "hooks/services/Experiment";
import { SignupSourceDropdown } from "packages/cloud/components/experiments/SignupSourceDropdown";
import { FieldError } from "packages/cloud/lib/errors/FieldError";
import { useAuthService } from "packages/cloud/services/auth/AuthService";
import { isGdprCountry } from "utils/dataPrivacy";
Expand Down Expand Up @@ -172,7 +171,6 @@ export const SignupForm: React.FC = () => {

const showName = !useExperiment("authPage.signup.hideName", false);
const showCompanyName = !useExperiment("authPage.signup.hideCompanyName", false);
const showSourceSelector = useExperiment("authPage.signup.sourceSelector", false);

const validationSchema = useMemo(() => {
const shape = {
Expand Down Expand Up @@ -216,21 +214,14 @@ export const SignupForm: React.FC = () => {
validateOnBlur
validateOnChange
>
{({ isValid, isSubmitting, status, values }) => (
{({ isValid, isSubmitting, status }) => (
<Form>
{(showName || showCompanyName) && (
<RowFieldItem>
{showName && <NameField />}
{showCompanyName && <CompanyNameField />}
</RowFieldItem>
)}

{/* exp-select-source-signup */}
{showSourceSelector && (
<FieldItem>
<SignupSourceDropdown disabled={isSubmitting} email={values.email} />
</FieldItem>
)}
<FieldItem>
<EmailField />
</FieldItem>
Expand Down
Loading

0 comments on commit ecc17b6

Please sign in to comment.