Browse Source

feat(growth): remove sandbox walkthrough a/b test (#43062)

this pr removes the a/b test for the sandbox walkthrough and moves the
sandbox entirely over to the new walkthrough system.
Richard Roggenkemper 2 years ago
parent
commit
2c552cad2a

+ 0 - 7
static/app/actionCreators/modal.tsx

@@ -268,13 +268,6 @@ export async function demoSignupModal(options: ModalOptions = {}) {
   openModal(deps => <Modal {...deps} {...options} />, {modalCss});
 }
 
-export async function demoSignupModalV2(options: ModalOptions = {}) {
-  const mod = await import('sentry/components/modals/demoSignUpV2');
-  const {default: Modal, modalCss} = mod;
-
-  openModal(deps => <Modal {...deps} {...options} />, {modalCss});
-}
-
 export type DemoEndModalOptions = {
   orgSlug: string | null;
   tour: string;

+ 0 - 194
static/app/components/assistant/getGuidesContent.tsx

@@ -3,13 +3,9 @@ import ExternalLink from 'sentry/components/links/externalLink';
 import Link from 'sentry/components/links/link';
 import {t, tct} from 'sentry/locale';
 import ConfigStore from 'sentry/stores/configStore';
-import {isDemoWalkthrough} from 'sentry/utils/demoMode';
 
 export default function getGuidesContent(orgSlug: string | null): GuidesContent {
   if (ConfigStore.get('demoMode')) {
-    if (isDemoWalkthrough()) {
-      return getDemoModeGuidesV2();
-    }
     return getDemoModeGuides();
   }
   return [
@@ -266,196 +262,6 @@ export default function getGuidesContent(orgSlug: string | null): GuidesContent
 }
 
 function getDemoModeGuides(): GuidesContent {
-  return [
-    {
-      guide: 'sidebar',
-      requiredTargets: ['projects', 'issues'],
-      priority: 1, // lower number means higher priority
-      markOthersAsSeen: true,
-      steps: [
-        {
-          title: t('Projects'),
-          target: 'projects',
-          description: t(
-            `Create a project for any type of application you want to monitor.`
-          ),
-        },
-        {
-          title: t('Issues'),
-          target: 'issues',
-          description: t(
-            `Here's a list of what's broken with your application. And everything you need to know to fix it.`
-          ),
-        },
-        {
-          title: t('Performance'),
-          target: 'performance',
-          description: t(
-            `See slow faster. Trace slow-loading pages back to their API calls as well as surface all related errors.`
-          ),
-        },
-        {
-          title: t('Releases'),
-          target: 'releases',
-          description: t(
-            `Track the health of every release, see differences between releases from crash analytics to adoption rates.`
-          ),
-        },
-        {
-          title: t('Discover'),
-          target: 'discover',
-          description: t(
-            `Query and unlock insights into the health of your entire system and get answers to critical business questions all in one place.`
-          ),
-          nextText: t('Got it'),
-        },
-      ],
-    },
-    {
-      guide: 'issue_stream_v2',
-      requiredTargets: ['issue_stream_title'],
-      steps: [
-        {
-          title: t('Issue'),
-          target: 'issue_stream_title',
-          description: t(
-            `Click here to get a full error report down to the line of code that caused the error.`
-          ),
-        },
-      ],
-    },
-    {
-      guide: 'issue_v2',
-      requiredTargets: ['issue_details', 'exception'],
-      steps: [
-        {
-          title: t('Details'),
-          target: 'issue_details',
-          description: t('See the who, what, and where of every error right at the top'),
-        },
-        {
-          title: t('Exception'),
-          target: 'exception',
-          description: t(
-            `Source code right in the stack trace, so you don’t need to find it yourself.`
-          ),
-        },
-        {
-          title: t('Tags'),
-          target: 'tags',
-          description: t(
-            `Tags help you quickly access related events and view the tag distribution for a set of events.`
-          ),
-        },
-        {
-          title: t('Breadcrumbs'),
-          target: 'breadcrumbs',
-          description: t(
-            `Check out the play by play of what your user experienced till they encountered the exception.`
-          ),
-        },
-        {
-          title: t('Discover'),
-          target: 'open_in_discover',
-          description: t(
-            `Uncover trends with Discover — analyze errors by URL, geography, device, browser, etc.`
-          ),
-        },
-      ],
-    },
-    {
-      guide: 'releases',
-      requiredTargets: ['release_version'],
-      steps: [
-        {
-          title: t('Release'),
-          target: 'release_version',
-          description: t(
-            `Click here to easily identify new issues, regressions, and track the health of every release.`
-          ),
-        },
-      ],
-    },
-    {
-      guide: 'release_details',
-      requiredTargets: ['release_chart'],
-      steps: [
-        {
-          title: t('Chart'),
-          target: 'release_chart',
-          description: t('Click and drag to zoom in on a specific section of the chart.'),
-        },
-        {
-          title: t('Discover'),
-          target: 'release_issues_open_in_discover',
-          description: t('Analyze these errors by URL, geography, device, browser, etc.'),
-        },
-        {
-          title: t('Discover'),
-          target: 'release_transactions_open_in_discover',
-          description: t(
-            `Analyze these performance issues by URL, geography, device, browser, etc.`
-          ),
-        },
-      ],
-    },
-    {
-      guide: 'discover_landing',
-      requiredTargets: ['discover_landing_header'],
-      steps: [
-        {
-          title: t('Discover'),
-          target: 'discover_landing_header',
-          description: t(
-            `Click into any of the queries below to identify trends in event data.`
-          ),
-        },
-      ],
-    },
-    {
-      guide: 'discover_event_view',
-      requiredTargets: ['create_alert_from_discover'],
-      steps: [
-        {
-          title: t('Create Alert'),
-          target: 'create_alert_from_discover',
-          description: t(
-            `Create an alert based on this query to get notified when an event exceeds user-defined thresholds.`
-          ),
-        },
-        {
-          title: t('Columns'),
-          target: 'columns_header_button',
-          description: t(
-            `There's a whole lot more to... _discover_. View all the query conditions.`
-          ),
-        },
-      ],
-    },
-    {
-      guide: 'transaction_details',
-      requiredTargets: ['span_tree'],
-      steps: [
-        {
-          title: t('Span Tree'),
-          target: 'span_tree',
-          description: t(
-            `Expand the spans to see span details from start date, end date to the operation.`
-          ),
-        },
-        {
-          title: t('Breadcrumbs'),
-          target: 'breadcrumbs',
-          description: t(
-            `Check out the play by play of what your user experienced till they encountered the performance issue.`
-          ),
-        },
-      ],
-    },
-  ];
-}
-
-function getDemoModeGuidesV2(): GuidesContent {
   return [
     {
       guide: 'sidebar_v2',

+ 52 - 156
static/app/components/demo/demoHeader.tsx

@@ -1,7 +1,6 @@
 import styled from '@emotion/styled';
 
 import Button from 'sentry/components/button';
-import ExternalLink from 'sentry/components/links/externalLink';
 import LogoSentry from 'sentry/components/logoSentry';
 import {t} from 'sentry/locale';
 import PreferencesStore from 'sentry/stores/preferencesStore';
@@ -11,7 +10,6 @@ import trackAdvancedAnalyticsEvent from 'sentry/utils/analytics/trackAdvancedAna
 import {
   extraQueryParameter,
   extraQueryParameterWithEmail,
-  isDemoWalkthrough,
   urlAttachQueryParams,
 } from 'sentry/utils/demoMode';
 
@@ -22,119 +20,60 @@ export default function DemoHeader() {
 
   const collapsed = !!useLegacyStore(PreferencesStore).collapsed;
 
-  let docsBtn, reqDemoBtn, signUpBtn;
-
-  if (isDemoWalkthrough()) {
-    docsBtn = (
-      <DocsDemoBtn
-        onClick={() =>
-          trackAdvancedAnalyticsEvent('growth.demo_click_docs', {organization: null})
-        }
-        href={urlAttachQueryParams('https://docs.sentry.io/', extraSearchParams)}
-        external
-      >
-        {t('Documentation')}
-      </DocsDemoBtn>
-    );
-
-    reqDemoBtn = (
-      <NewRequestDemoBtn
-        onClick={() =>
-          trackAdvancedAnalyticsEvent('growth.demo_click_request_demo', {
-            organization: null,
-          })
-        }
-        href={urlAttachQueryParams('https://sentry.io/_/demo/', extraSearchParams)}
-        external
-      >
-        {t('Request a Demo')}
-      </NewRequestDemoBtn>
-    );
-
-    signUpBtn = (
-      <FreeTrial
-        onClick={() => {
-          const url =
-            sandboxData?.cta?.url ||
-            urlAttachQueryParams(
-              'https://sentry.io/signup/',
-              extraQueryParameterWithEmail()
-            );
-
-          // Using window.open instead of href={} because we need to read `email`
-          // from localStorage when the user clicks the button.
-          window.open(url, '_blank');
-
-          trackAdvancedAnalyticsEvent('growth.demo_click_get_started', {
-            cta: sandboxData?.cta?.id,
-            organization: null,
-          });
-        }}
-      >
-        <FreeTrialTextLong>
-          {sandboxData?.cta?.title || t('Start Free Trial')}
-        </FreeTrialTextLong>
-        <FreeTrialTextShort>
-          {sandboxData?.cta?.shortTitle || t('Sign Up')}
-        </FreeTrialTextShort>
-      </FreeTrial>
-    );
-  } else {
-    docsBtn = (
-      <StyledExternalLink
-        onClick={() =>
-          trackAdvancedAnalyticsEvent('growth.demo_click_docs', {organization: null})
-        }
-        href={urlAttachQueryParams('https://docs.sentry.io/', extraSearchParams)}
-        openInNewTab
-      >
-        {t('Documentation')}
-      </StyledExternalLink>
-    );
-
-    reqDemoBtn = (
-      <RequestDemoBtn
-        onClick={() =>
-          trackAdvancedAnalyticsEvent('growth.demo_click_request_demo', {
-            organization: null,
-          })
-        }
-        href={urlAttachQueryParams('https://sentry.io/_/demo/', extraSearchParams)}
-        external
-      >
-        {t('Request a Demo')}
-      </RequestDemoBtn>
-    );
-
-    signUpBtn = (
-      <GetStarted
-        onClick={() => {
-          const url =
-            sandboxData?.cta?.url ||
-            urlAttachQueryParams(
-              'https://sentry.io/signup/',
-              extraQueryParameterWithEmail()
-            );
+  const docsBtn = (
+    <DocsDemoBtn
+      onClick={() =>
+        trackAdvancedAnalyticsEvent('growth.demo_click_docs', {organization: null})
+      }
+      href={urlAttachQueryParams('https://docs.sentry.io/', extraSearchParams)}
+      external
+    >
+      {t('Documentation')}
+    </DocsDemoBtn>
+  );
 
-          // Using window.open instead of href={} because we need to read `email`
-          // from localStorage when the user clicks the button.
-          window.open(url, '_blank');
+  const reqDemoBtn = (
+    <NewRequestDemoBtn
+      onClick={() =>
+        trackAdvancedAnalyticsEvent('growth.demo_click_request_demo', {
+          organization: null,
+        })
+      }
+      href={urlAttachQueryParams('https://sentry.io/_/demo/', extraSearchParams)}
+      external
+    >
+      {t('Request a Demo')}
+    </NewRequestDemoBtn>
+  );
 
-          trackAdvancedAnalyticsEvent('growth.demo_click_get_started', {
-            cta: sandboxData?.cta?.id,
-            organization: null,
-          });
-        }}
-      >
-        <GetStartedTextLong>
-          {sandboxData?.cta?.title || t('Sign Up for Free')}
-        </GetStartedTextLong>
-        <GetStartedTextShort>
-          {sandboxData?.cta?.shortTitle || t('Sign Up')}
-        </GetStartedTextShort>
-      </GetStarted>
-    );
-  }
+  const signUpBtn = (
+    <FreeTrial
+      onClick={() => {
+        const url =
+          sandboxData?.cta?.url ||
+          urlAttachQueryParams(
+            'https://sentry.io/signup/',
+            extraQueryParameterWithEmail()
+          );
+
+        // Using window.open instead of href={} because we need to read `email`
+        // from localStorage when the user clicks the button.
+        window.open(url, '_blank');
+
+        trackAdvancedAnalyticsEvent('growth.demo_click_get_started', {
+          cta: sandboxData?.cta?.id,
+          organization: null,
+        });
+      }}
+    >
+      <FreeTrialTextLong>
+        {sandboxData?.cta?.title || t('Start Free Trial')}
+      </FreeTrialTextLong>
+      <FreeTrialTextShort>
+        {sandboxData?.cta?.shortTitle || t('Sign Up')}
+      </FreeTrialTextShort>
+    </FreeTrial>
+  );
 
   return (
     <Wrapper collapsed={collapsed}>
@@ -183,49 +122,6 @@ const StyledLogoSentry = styled(LogoSentry)`
   color: ${p => p.theme.textColor};
 `;
 
-const BaseButton = styled(Button)`
-  border-radius: 2rem;
-  text-transform: uppercase;
-`;
-
-const RequestDemoBtn = styled(BaseButton)`
-  @media (max-width: ${p => p.theme.breakpoints.small}) {
-    display: none;
-  }
-`;
-
-const GetStartedTextShort = styled('span')`
-  display: none;
-`;
-
-const GetStartedTextLong = styled('span')``;
-
-// Note many of the colors don't come from the theme as they come from the marketing site
-const GetStarted = styled(BaseButton)`
-  border-color: transparent;
-  box-shadow: 0 2px 0 rgb(54 45 89 / 10%);
-  background-color: #e1567c;
-  color: #fff;
-  .short-text {
-    display: none;
-  }
-  @media (max-width: 650px) {
-    ${GetStartedTextLong} {
-      display: none;
-    }
-    ${GetStartedTextShort} {
-      display: inline;
-    }
-  }
-`;
-
-const StyledExternalLink = styled(ExternalLink)`
-  color: #584774;
-  @media (max-width: 500px) {
-    display: none;
-  }
-`;
-
 const FreeTrialTextShort = styled('span')`
   display: none;
 `;

+ 66 - 22
static/app/components/modals/demoSignUp.tsx

@@ -1,36 +1,54 @@
 import {css} from '@emotion/react';
 import styled from '@emotion/styled';
 
+import habitsSuccessfulCustomer from 'sentry-images/spot/habitsSuccessfulCustomer.jpg';
+
 import {ModalRenderProps} from 'sentry/actionCreators/modal';
 import Button from 'sentry/components/button';
 import ButtonBar from 'sentry/components/buttonBar';
-import HighlightModalContainer from 'sentry/components/highlightModalContainer';
+import HighlightCornerContainer from 'sentry/components/highlightCornerModal';
+import {IconClose} from 'sentry/icons';
 import {t} from 'sentry/locale';
 import space from 'sentry/styles/space';
 import trackAdvancedAnalyticsEvent from 'sentry/utils/analytics/trackAdvancedAnalyticsEvent';
-import {extraQueryParameterWithEmail, urlAttachQueryParams} from 'sentry/utils/demoMode';
+import {extraQueryParameter, urlAttachQueryParams} from 'sentry/utils/demoMode';
 
 type Props = ModalRenderProps;
 
 const DemoSignUpModal = ({closeModal}: Props) => {
   const signupUrl = urlAttachQueryParams(
     'https://sentry.io/signup/',
-    extraQueryParameterWithEmail()
+    extraQueryParameter()
+  );
+  const demoUrl = urlAttachQueryParams(
+    'https://sentry.io/_/demo/',
+    extraQueryParameter()
   );
 
   return (
-    <HighlightModalContainer>
+    <HighlightCornerContainer>
+      <CloseButton
+        icon={<IconClose size="xs" />}
+        size="xs"
+        aria-label={t('Close')}
+        onClick={() => {
+          trackAdvancedAnalyticsEvent('growth.demo_modal_clicked_close', {
+            organization: null,
+          });
+          closeModal();
+        }}
+      />
       <div>
         <TrialCheckInfo>
-          <Subheader>{t('Sandbox Signup')}</Subheader>
-          <h2>{t('Hey, love what you see?')}</h2>
+          <Subheader>{t('Sign Up')}</Subheader>
+          <h2>{t('Hey, like what you see?')}</h2>
           <p>
             {t(
-              'Sign up now to setup your own project to see problems within your code and learn how to quickly improve your project.'
+              "Start your free trial, and create your first project to see what's broken in your code and how to fix it."
             )}
           </p>
         </TrialCheckInfo>
-        <StyledButtonBar gap={2}>
+        <StyledButtonBar gap={1}>
           <Button
             priority="primary"
             href={signupUrl}
@@ -40,43 +58,48 @@ const DemoSignUpModal = ({closeModal}: Props) => {
               })
             }
           >
-            {t('Sign up now')}
+            {t('Start free trial')}
           </Button>
           <Button
             priority="default"
-            onClick={() => {
-              trackAdvancedAnalyticsEvent('growth.demo_modal_clicked_continue', {
+            href={demoUrl}
+            onClick={() =>
+              trackAdvancedAnalyticsEvent('growth.demo_modal_clicked_demo', {
                 organization: null,
-              });
-              closeModal();
-            }}
+              })
+            }
           >
-            {t('Keep Exploring')}
+            {t('Request a demo')}
           </Button>
         </StyledButtonBar>
       </div>
-    </HighlightModalContainer>
+      <ImagePosition>
+        <PositionRight src={habitsSuccessfulCustomer} />
+      </ImagePosition>
+    </HighlightCornerContainer>
   );
 };
 
 const TrialCheckInfo = styled('div')`
   padding: ${space(3)} 0;
   p {
-    font-size: ${p => p.theme.fontSizeMedium};
+    font-size: ${p => p.theme.fontSizeLarge};
     margin: 0;
   }
   h2 {
-    font-size: 1.5em;
+    font-size: 2em;
   }
 `;
 
 export const modalCss = css`
   width: 100%;
-  max-width: 730px;
+  max-width: 1000px;
   [role='document'] {
     position: relative;
     padding: 70px 80px;
-    overflow: hidden;
+    overflow: visible;
+    display: flex;
+    gap: 30px;
   }
 `;
 
@@ -85,12 +108,33 @@ const Subheader = styled('h4')`
   text-transform: uppercase;
   font-weight: bold;
   color: ${p => p.theme.activeText};
-  font-size: ${p => p.theme.fontSizeExtraSmall};
+  font-size: ${p => p.theme.fontSizeMedium};
 `;
 
 const StyledButtonBar = styled(ButtonBar)`
   margin-top: ${space(2)};
-  max-width: fit-content;
+  max-width: 250px;
+`;
+
+const ImagePosition = styled('div')`
+  max-width: 360px;
+  margin: auto;
+`;
+
+const PositionRight = styled('img')`
+  border-radius: 0.5rem;
+  pointer-events: none;
+`;
+
+const CloseButton = styled(Button)`
+  position: absolute;
+  top: -15px;
+  right: -15px;
+  height: 30px;
+  width: 30px;
+  border-radius: 50%;
+  background: ${p => p.theme.background};
+  color: ${p => p.theme.textColor};
 `;
 
 export default DemoSignUpModal;

+ 0 - 144
static/app/components/modals/demoSignUpV2.tsx

@@ -1,144 +0,0 @@
-import {css} from '@emotion/react';
-import styled from '@emotion/styled';
-
-import habitsSuccessfulCustomer from 'sentry-images/spot/habitsSuccessfulCustomer.jpg';
-
-import {ModalRenderProps} from 'sentry/actionCreators/modal';
-import Button from 'sentry/components/button';
-import ButtonBar from 'sentry/components/buttonBar';
-import HighlightCornerContainer from 'sentry/components/highlightCornerModal';
-import {IconClose} from 'sentry/icons';
-import {t} from 'sentry/locale';
-import space from 'sentry/styles/space';
-import trackAdvancedAnalyticsEvent from 'sentry/utils/analytics/trackAdvancedAnalyticsEvent';
-import {
-  extraQueryParameter,
-  extraQueryParameterWithEmailV2,
-  urlAttachQueryParams,
-} from 'sentry/utils/demoMode';
-
-type Props = ModalRenderProps;
-
-const DemoSignUpModalV2 = ({closeModal}: Props) => {
-  const signupUrl = urlAttachQueryParams(
-    'https://sentry.io/signup/',
-    extraQueryParameterWithEmailV2()
-  );
-  const demoUrl = urlAttachQueryParams(
-    'https://sentry.io/_/demo/',
-    extraQueryParameter()
-  );
-
-  return (
-    <HighlightCornerContainer>
-      <CloseButton
-        icon={<IconClose size="xs" />}
-        size="xs"
-        aria-label={t('Close')}
-        onClick={() => {
-          trackAdvancedAnalyticsEvent('growth.demo_modal_clicked_close', {
-            organization: null,
-          });
-          closeModal();
-        }}
-      />
-      <div>
-        <TrialCheckInfo>
-          <Subheader>{t('Sign Up')}</Subheader>
-          <h2>{t('Hey, like what you see?')}</h2>
-          <p>
-            {t(
-              "Start your free trial, and create your first project to see what's broken in your code and how to fix it."
-            )}
-          </p>
-        </TrialCheckInfo>
-        <StyledButtonBar gap={1}>
-          <Button
-            priority="primary"
-            href={signupUrl}
-            onClick={() =>
-              trackAdvancedAnalyticsEvent('growth.demo_modal_clicked_signup', {
-                organization: null,
-              })
-            }
-          >
-            {t('Start free trial')}
-          </Button>
-          <Button
-            priority="default"
-            href={demoUrl}
-            onClick={() =>
-              trackAdvancedAnalyticsEvent('growth.demo_modal_clicked_demo', {
-                organization: null,
-              })
-            }
-          >
-            {t('Request a demo')}
-          </Button>
-        </StyledButtonBar>
-      </div>
-      <ImagePosition>
-        <PositionRight src={habitsSuccessfulCustomer} />
-      </ImagePosition>
-    </HighlightCornerContainer>
-  );
-};
-
-const TrialCheckInfo = styled('div')`
-  padding: ${space(3)} 0;
-  p {
-    font-size: ${p => p.theme.fontSizeLarge};
-    margin: 0;
-  }
-  h2 {
-    font-size: 2em;
-  }
-`;
-
-export const modalCss = css`
-  width: 100%;
-  max-width: 1000px;
-  [role='document'] {
-    position: relative;
-    padding: 70px 80px;
-    overflow: visible;
-    display: flex;
-    gap: 30px;
-  }
-`;
-
-const Subheader = styled('h4')`
-  margin-bottom: ${space(2)};
-  text-transform: uppercase;
-  font-weight: bold;
-  color: ${p => p.theme.activeText};
-  font-size: ${p => p.theme.fontSizeMedium};
-`;
-
-const StyledButtonBar = styled(ButtonBar)`
-  margin-top: ${space(2)};
-  max-width: 250px;
-`;
-
-const ImagePosition = styled('div')`
-  max-width: 360px;
-  margin: auto;
-`;
-
-const PositionRight = styled('img')`
-  border-radius: 0.5rem;
-  pointer-events: none;
-`;
-
-const CloseButton = styled(Button)`
-  position: absolute;
-  top: -15px;
-  right: -15px;
-  height: 30px;
-  width: 30px;
-  border-radius: 50%;
-  background: ${p => p.theme.background};
-  color: ${p => p.theme.textColor};
-`;
-
-export default DemoSignUpModalV2;

+ 10 - 10
static/app/components/onboardingWizard/taskConfig.tsx

@@ -78,16 +78,6 @@ export function getOnboardingTasks({
 }: Options): OnboardingTaskDescriptor[] {
   if (isDemoWalkthrough()) {
     return [
-      {
-        task: OnboardingTaskKey.SIDEBAR_GUIDE,
-        title: t('Check out the different tabs'),
-        description: t('Press the start button for a guided tour through each tab.'),
-        skippable: false,
-        requisites: [],
-        actionType: 'app',
-        location: `/organizations/${organization.slug}/projects/`,
-        display: true,
-      },
       {
         task: OnboardingTaskKey.ISSUE_GUIDE,
         title: t('Issues'),
@@ -124,6 +114,16 @@ export function getOnboardingTasks({
         location: `/organizations/${organization.slug}/releases/`,
         display: true,
       },
+      {
+        task: OnboardingTaskKey.SIDEBAR_GUIDE,
+        title: t('Check out the different tabs'),
+        description: t('Press the start button for a guided tour through each tab.'),
+        skippable: false,
+        requisites: [],
+        actionType: 'app',
+        location: `/organizations/${organization.slug}/projects/`,
+        display: true,
+      },
     ];
   }
   return [

+ 5 - 13
static/app/components/sidebar/onboardingStatus.tsx

@@ -10,7 +10,7 @@ import ProgressRing, {
   RingText,
 } from 'sentry/components/progressRing';
 import {t, tct} from 'sentry/locale';
-import HookStore from 'sentry/stores/hookStore';
+import ConfigStore from 'sentry/stores/configStore';
 import space from 'sentry/styles/space';
 import {OnboardingTaskStatus, Organization, Project} from 'sentry/types';
 import trackAdvancedAnalyticsEvent from 'sentry/utils/analytics/trackAdvancedAnalyticsEvent';
@@ -27,17 +27,6 @@ type Props = CommonSidebarProps & {
   projects: Project[];
 };
 
-/**
- * This is used to determine if we show the sidebar or not.
- * The Sandbox will set this hook to implement custom logic not based
- * on a feature flag.
- */
-export const shouldShowSidebar = (organization: Organization) => {
-  const defaultHook = () => organization.features?.includes('onboarding');
-  const featureHook = HookStore.get('onboarding:show-sidebar')[0] || defaultHook;
-  return featureHook(organization);
-};
-
 export const getSidebarTasks = isDemoWalkthrough()
   ? useSandboxSidebarTasks
   : getMergedTasks;
@@ -65,7 +54,10 @@ function OnboardingStatus({
   };
   const [onboardingState] = usePersistedOnboardingState();
 
-  if (!shouldShowSidebar(org)) {
+  const shouldShowSidebar =
+    org.features?.includes('onboarding') || ConfigStore.get('demoMode');
+
+  if (!shouldShowSidebar) {
     return null;
   }
 

+ 0 - 1
static/app/types/hooks.tsx

@@ -193,7 +193,6 @@ export type InterfaceChromeHooks = {
 export type OnboardingHooks = {
   'onboarding-wizard:skip-help': GenericOrganizationComponentHook;
   'onboarding:extra-chrome': GenericComponentHook;
-  'onboarding:show-sidebar': (organization: Organization) => boolean;
   'onboarding:targeted-onboarding-header': (opts: {source: string}) => React.ReactNode;
 };
 

+ 1 - 11
static/app/utils/demoMode.tsx

@@ -16,16 +16,6 @@ export function extraQueryParameterWithEmail(): URLSearchParams {
   return params;
 }
 
-export function extraQueryParameterWithEmailV2(): URLSearchParams {
-  const params = extraQueryParameter();
-  const email = localStorage.getItem('email');
-  if (email) {
-    params.append('email', email);
-  }
-  params.append('referrer', 'sandbox-walkthrough');
-  return params;
-}
-
 export function urlAttachQueryParams(url: string, params: URLSearchParams): string {
   const queryString = params.toString();
   if (queryString) {
@@ -37,7 +27,7 @@ export function urlAttachQueryParams(url: string, params: URLSearchParams): stri
 // For the Sandbox, we are testing a new walkthrough. This affects a few different components of Sentry including the Onboarding Sidebar, Onboarding Tasks, the Demo End Modal, Demo Sign Up Modal, Guides, and more.
 // Outside of the Sandbox, this should have no effect on other elements of Sentry.
 export function isDemoWalkthrough(): boolean {
-  return ConfigStore.get('demoMode') && localStorage.getItem('new-walkthrough') === '1';
+  return ConfigStore.get('demoMode');
 }
 
 // Function to determine which tour has completed depending on the guide that is being passed in.