Skip to content

fix(onboarding): Open replay panel in quick start action #77516

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

Merged
merged 1 commit into from
Sep 13, 2024
Merged
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
20 changes: 16 additions & 4 deletions static/app/components/onboardingWizard/taskConfig.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ import type {OnboardingContextProps} from 'sentry/components/onboarding/onboardi
import {filterSupportedTasks} from 'sentry/components/onboardingWizard/filterSupportedTasks';
import {taskIsDone} from 'sentry/components/onboardingWizard/utils';
import {filterProjects} from 'sentry/components/performanceOnboarding/utils';
import {SidebarPanelKey} from 'sentry/components/sidebar/types';
import {sourceMaps} from 'sentry/data/platformCategories';
import {t} from 'sentry/locale';
import SidebarPanelStore from 'sentry/stores/sidebarPanelStore';
import pulsingIndicatorStyles from 'sentry/styles/pulsingIndicator';
import {space} from 'sentry/styles/space';
import type {
Expand Down Expand Up @@ -320,10 +322,20 @@ export function getOnboardingTasks({
),
skippable: true,
requisites: [OnboardingTaskKey.FIRST_PROJECT, OnboardingTaskKey.FIRST_EVENT],
actionType: 'app',
location: normalizeUrl(
`/organizations/${organization.slug}/replays/#replay-sidequest`
),
actionType: 'action',
action: router => {
router.push(
normalizeUrl({
pathname: `/organizations/${organization.slug}/replays/`,
query: {referrer: 'onboarding_task'},
})
);
// Since the quick start panel is already open and closes on route change
// Wait for the next tick to open the replay onboarding panel
setTimeout(() => {
SidebarPanelStore.activatePanel(SidebarPanelKey.REPLAYS_ONBOARDING);
}, 0);
},
display: organization.features?.includes('session-replay'),
SupplementComponent: withApi(
({api, task, onCompleteTask}: FirstEventWaiterProps) =>
Expand Down
Loading