Browse Source

feat(onboarding): remove OnboardingHighlightWizardExperiment (#41243)

This PR remove the `OnboardingHighlightWizardExperiment` which showed a
simplified set of SDK instructions utilizing the [Sentry
Wizard](https://github.com/getsentry/sentry-wizard). Turns out it didn't
help (actually it hurt) so removing the experiment.
Stephen Cefali 2 years ago
parent
commit
e6a75d4958

+ 6 - 9
static/app/data/experimentConfig.tsx

@@ -1,5 +1,4 @@
 import {Experiments, ExperimentType} from 'sentry/types/experiments';
-
 /**
  * This is the value an experiment will have when the unit of assignment
  * (organization, user, etc) is not part of any experiment group.
@@ -12,14 +11,12 @@ export const unassignedValue = -1;
 /**
  * Frontend experiment configuration object
  */
-export const experimentList = [
-  {
-    key: 'OnboardingHighlightWizardExperiment',
-    type: ExperimentType.Organization,
-    parameter: 'exposed',
-    assignments: [0, 1],
-  },
-] as const;
+export const experimentList: {
+  assignments: number[];
+  key: string;
+  parameter: string;
+  type: ExperimentType;
+}[] = [];
 
 export const experimentConfig = experimentList.reduce(
   (acc, exp) => ({...acc, [exp.key]: exp}),

+ 0 - 12
static/app/utils/analytics/growthAnalyticsEvents.tsx

@@ -100,15 +100,6 @@ export type GrowthEventParameters = {
   'growth.onboarding_take_to_error': {};
   'growth.onboarding_view_full_docs': {};
   'growth.onboarding_view_sample_event': SampleEventParam;
-  'growth.onboarding_wizard_clicked_more_details': {
-    platform?: string;
-    project_id?: string;
-  };
-  'growth.onboarding_wizard_interacted': {
-    wizard_instructions: boolean;
-    platform?: string;
-    project_id?: string;
-  };
   'growth.platformpicker_category': PlatformCategory;
   'growth.platformpicker_search': PlatformSearchParam;
   'growth.sample_error_onboarding_link_clicked': {
@@ -212,9 +203,6 @@ export const growthEventMap: Record<GrowthAnalyticsKey, string | null> = {
   'sample_event.button_viewed': null, // high-volume event
   'sample_event.created': 'Sample Event Created',
   'sample_event.failed': 'Sample Event Failed',
-  'growth.onboarding_wizard_clicked_more_details':
-    'Onboarding Wizard: Clicked More Details',
-  'growth.onboarding_wizard_interacted': 'Onboarding Wizard: Interacted',
   'assistant.guide_cued': 'Assistant Guide Cued',
   'growth.end_modal_more_tours': 'Growth: End Modal More Tours',
   'growth.end_modal_restart_tours': 'Growth: End Modal Restart Tours',

+ 9 - 79
static/app/views/onboarding/setupDocs.tsx

@@ -4,21 +4,18 @@ import {Fragment, useCallback, useEffect, useState} from 'react';
 import {browserHistory} from 'react-router';
 import {css} from '@emotion/react';
 import styled from '@emotion/styled';
-import {AnimatePresence, motion} from 'framer-motion';
+import {motion} from 'framer-motion';
 import * as qs from 'query-string';
 
 import {loadDocs} from 'sentry/actionCreators/projects';
 import Alert, {alertStyles} from 'sentry/components/alert';
-import Button from 'sentry/components/button';
 import ExternalLink from 'sentry/components/links/externalLink';
 import LoadingError from 'sentry/components/loadingError';
 import {PlatformKey} from 'sentry/data/platformCategories';
 import platforms from 'sentry/data/platforms';
-import {IconChevron} from 'sentry/icons';
 import {t, tct} from 'sentry/locale';
 import space from 'sentry/styles/space';
 import {Organization, Project} from 'sentry/types';
-import {logExperiment} from 'sentry/utils/analytics';
 import trackAdvancedAnalyticsEvent from 'sentry/utils/analytics/trackAdvancedAnalyticsEvent';
 import getDynamicText from 'sentry/utils/getDynamicText';
 import {platformToIntegrationMap} from 'sentry/utils/integrationUtil';
@@ -39,7 +36,7 @@ import {usePersistedOnboardingState} from './utils';
  */
 const INCOMPLETE_DOC_FLAG = 'TODO-ADD-VERIFICATION-EXAMPLE';
 
-type PlatformDoc = {html: string; link: string; wizardSetup: string};
+type PlatformDoc = {html: string; link: string};
 
 type Props = {
   projects: Project[];
@@ -84,80 +81,13 @@ function ProjecDocs(props: {
     );
   };
 
-  useEffect(() => {
-    props.platformDocs?.wizardSetup &&
-      logExperiment({
-        key: 'OnboardingHighlightWizardExperiment',
-        organization: props.organization,
-      });
-  }, [props.organization, props.platformDocs?.wizardSetup]);
-
-  const showWizardSetup =
-    props.organization.experiments.OnboardingHighlightWizardExperiment;
-  const [wizardSetupDetailsCollapsed, setWizardSetupDetailsCollapsed] = useState(true);
-  const [interacted, setInteracted] = useState(false);
-  const docs =
-    props.platformDocs !== null &&
-    (showWizardSetup && props.platformDocs.wizardSetup ? (
-      <DocsWrapper key={props.platformDocs.html}>
-        <Content
-          dangerouslySetInnerHTML={{__html: props.platformDocs.wizardSetup}}
-          onMouseDown={() => {
-            !interacted &&
-              trackAdvancedAnalyticsEvent('growth.onboarding_wizard_interacted', {
-                organization: props.organization,
-                project_id: props.project.id,
-                platform: props.platform || 'unknown',
-                wizard_instructions: true,
-              });
-            setInteracted(true);
-          }}
-        />
-        <Button
-          priority="link"
-          onClick={() => {
-            trackAdvancedAnalyticsEvent('growth.onboarding_wizard_clicked_more_details', {
-              organization: props.organization,
-              project_id: props.project.id,
-              platform: props.platform || 'unknown',
-            });
-            setWizardSetupDetailsCollapsed(!wizardSetupDetailsCollapsed);
-          }}
-        >
-          <IconChevron
-            direction={wizardSetupDetailsCollapsed ? 'down' : 'up'}
-            style={{marginRight: space(1)}}
-          />
-          {wizardSetupDetailsCollapsed ? t('More Details') : t('Less Details')}
-        </Button>
-
-        <AnimatePresence>
-          {!wizardSetupDetailsCollapsed && (
-            <AnimatedContentWrapper>
-              <Content dangerouslySetInnerHTML={{__html: props.platformDocs.html}} />
-              {missingExampleWarning()}
-            </AnimatedContentWrapper>
-          )}
-        </AnimatePresence>
-      </DocsWrapper>
-    ) : (
-      <DocsWrapper key={props.platformDocs.html}>
-        <Content
-          dangerouslySetInnerHTML={{__html: props.platformDocs.html}}
-          onMouseDown={() => {
-            !interacted &&
-              trackAdvancedAnalyticsEvent('growth.onboarding_wizard_interacted', {
-                organization: props.organization,
-                project_id: props.project.id,
-                platform: props.platform || undefined,
-                wizard_instructions: false,
-              });
-            setInteracted(true);
-          }}
-        />
-        {missingExampleWarning()}
-      </DocsWrapper>
-    ));
+  const docs = props.platformDocs !== null && (
+    <DocsWrapper key={props.platformDocs.html}>
+      <Content dangerouslySetInnerHTML={{__html: props.platformDocs.html}} />
+      {missingExampleWarning()}
+    </DocsWrapper>
+  );
+
   const loadingError = (
     <LoadingError
       message={t(