Skip to content

Commit

Permalink
feat(onboarding): remove welcome page experiment and use new experien…
Browse files Browse the repository at this point in the history
…ce (#33616)

This PR copies the welcome page component from the targeted onboarding flow into the default onboarding flow and removes the TargetedOnboardingWelcomePageExperimentV2 experiment. There are some minor differences to handle the different prop types but everything else is the same.
  • Loading branch information
scefali committed Apr 14, 2022
1 parent 41c7406 commit c407626
Show file tree
Hide file tree
Showing 10 changed files with 302 additions and 966 deletions.
6 changes: 0 additions & 6 deletions static/app/data/experimentConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,6 @@ export const unassignedValue = -1;
* Frontend experiment configuration object
*/
export const experimentList = [
{
key: 'TargetedOnboardingWelcomePageExperimentV2',
type: ExperimentType.Organization,
parameter: 'exposed',
assignments: [0, 1],
},
{
key: 'TargetedOnboardingMultiSelectExperiment',
type: ExperimentType.Organization,
Expand Down
642 changes: 115 additions & 527 deletions static/app/views/onboarding/components/welcomeBackground.tsx

Large diffs are not rendered by default.

29 changes: 5 additions & 24 deletions static/app/views/onboarding/onboardingController.tsx
Original file line number Diff line number Diff line change
@@ -1,36 +1,17 @@
import {ComponentPropsWithoutRef, useEffect} from 'react';
import {ComponentPropsWithoutRef} from 'react';

import {logExperiment} from 'sentry/utils/analytics';
import withExperiment from 'sentry/utils/withExperiment';
import withOrganization from 'sentry/utils/withOrganization';

import TargetedOnboarding from './targetedOnboarding/onboarding';
import Onboarding from './onboarding';

type Props = Omit<ComponentPropsWithoutRef<typeof Onboarding>, 'projects'> & {
experimentAssignment: 0 | 1;
logExperiment: () => void;
};
type Props = Omit<ComponentPropsWithoutRef<typeof Onboarding>, 'projects'>;

function OnboardingController({experimentAssignment, ...rest}: Props) {
useEffect(() => {
logExperiment({
key: 'TargetedOnboardingWelcomePageExperimentV2',
organization: rest.organization,
});
}, []);
if (
(rest.params.step === 'welcome' && experimentAssignment) ||
rest.organization?.experiments.TargetedOnboardingMultiSelectExperiment
) {
function OnboardingController({...rest}: Props) {
if (rest.organization?.experiments.TargetedOnboardingMultiSelectExperiment) {
return <TargetedOnboarding {...rest} />;
}
return <Onboarding {...rest} />;
}

export default withOrganization(
withExperiment(OnboardingController, {
experiment: 'TargetedOnboardingWelcomePageExperimentV2',
injectLogExperiment: true,
})
);
export default withOrganization(OnboardingController);

This file was deleted.

2 changes: 1 addition & 1 deletion static/app/views/onboarding/targetedOnboarding/welcome.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import space from 'sentry/styles/space';
import trackAdvancedAnalyticsEvent from 'sentry/utils/analytics/trackAdvancedAnalyticsEvent';
import testableTransition from 'sentry/utils/testableTransition';
import FallingError from 'sentry/views/onboarding/components/fallingError';
import WelcomeBackground from 'sentry/views/onboarding/components/welcomeBackground';

import WelcomeBackground from './components/welcomeBackground';
import {StepProps} from './types';

const fadeAway: MotionProps = {
Expand Down
2 changes: 1 addition & 1 deletion static/app/views/onboarding/types.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export type StepProps = {
onComplete: (data: StepData) => void;
onUpdate: (data: StepData) => void;
orgId: string;
organization: Organization;
platform: PlatformKey | null;
project: Project | null;
organization?: Organization;
};

export type StepDescriptor = {
Expand Down

0 comments on commit c407626

Please sign in to comment.