Skip to content

Commit 9149a05

Browse files
authored
fix(onboarding): Open replay panel in quick start action (#77516)
1 parent 4528981 commit 9149a05

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

static/app/components/onboardingWizard/taskConfig.tsx

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ import type {OnboardingContextProps} from 'sentry/components/onboarding/onboardi
77
import {filterSupportedTasks} from 'sentry/components/onboardingWizard/filterSupportedTasks';
88
import {taskIsDone} from 'sentry/components/onboardingWizard/utils';
99
import {filterProjects} from 'sentry/components/performanceOnboarding/utils';
10+
import {SidebarPanelKey} from 'sentry/components/sidebar/types';
1011
import {sourceMaps} from 'sentry/data/platformCategories';
1112
import {t} from 'sentry/locale';
13+
import SidebarPanelStore from 'sentry/stores/sidebarPanelStore';
1214
import pulsingIndicatorStyles from 'sentry/styles/pulsingIndicator';
1315
import {space} from 'sentry/styles/space';
1416
import type {
@@ -320,10 +322,20 @@ export function getOnboardingTasks({
320322
),
321323
skippable: true,
322324
requisites: [OnboardingTaskKey.FIRST_PROJECT, OnboardingTaskKey.FIRST_EVENT],
323-
actionType: 'app',
324-
location: normalizeUrl(
325-
`/organizations/${organization.slug}/replays/#replay-sidequest`
326-
),
325+
actionType: 'action',
326+
action: router => {
327+
router.push(
328+
normalizeUrl({
329+
pathname: `/organizations/${organization.slug}/replays/`,
330+
query: {referrer: 'onboarding_task'},
331+
})
332+
);
333+
// Since the quick start panel is already open and closes on route change
334+
// Wait for the next tick to open the replay onboarding panel
335+
setTimeout(() => {
336+
SidebarPanelStore.activatePanel(SidebarPanelKey.REPLAYS_ONBOARDING);
337+
}, 0);
338+
},
327339
display: organization.features?.includes('session-replay'),
328340
SupplementComponent: withApi(
329341
({api, task, onCompleteTask}: FirstEventWaiterProps) =>

0 commit comments

Comments
 (0)