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

🪟 🧪 Remove signup source selection experiment #21819

Merged
merged 2 commits into from
Jan 25, 2023
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
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