Skip to content

Commit 3bc823a

Browse files
obostjancicbillyvg
authored andcommitted
feat(demo-mode): releases tour (#89271)
1 parent b8ac95e commit 3bc823a

File tree

6 files changed

+36
-58
lines changed

6 files changed

+36
-58
lines changed

static/app/components/onboardingWizard/content.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,8 @@ function Task({task, hidePanel, showWaitingIndicator}: TaskProps) {
277277
// Performance guide is updated to use the new tour
278278
if (task.task === OnboardingTaskKey.PERFORMANCE_GUIDE) {
279279
tours?.[DemoTour.PERFORMANCE]?.startTour(DemoTourStep.PERFORMANCE_TABLE);
280+
} else if (task.task === OnboardingTaskKey.RELEASE_GUIDE) {
281+
tours?.[DemoTour.RELEASES]?.startTour();
280282
} else {
281283
DemoWalkthroughStore.activateGuideAnchor(task.task);
282284
}

static/app/utils/demoMode/demoTours.tsx

+3-2
Original file line numberDiff line numberDiff line change
@@ -211,20 +211,21 @@ const getTourFromStep = (step: DemoTourStep): DemoTour => {
211211
type DemoTourElementProps = Omit<
212212
TourElementProps<DemoTourStep>,
213213
'tourContextValue' | 'tourContext'
214-
>;
214+
> & {disabled?: boolean};
215215

216216
export function DemoTourElement({
217217
id,
218218
title,
219219
description,
220220
children,
221221
position = 'top-start',
222+
disabled = false,
222223
...props
223224
}: DemoTourElementProps) {
224225
const tourKey = getTourFromStep(id);
225226
const tourContextValue = useDemoTour(tourKey);
226227

227-
if (!isDemoModeActive() || !tourContextValue) {
228+
if (!isDemoModeActive() || !tourContextValue || disabled) {
228229
return children;
229230
}
230231

static/app/utils/demoMode/guides.tsx

+3-46
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,6 @@ export function getTourTask(
5959
return {tour: 'issues', task: OnboardingTaskKey.ISSUE_GUIDE};
6060
case 'releases':
6161
return {tour: 'releases', task: OnboardingTaskKey.RELEASE_GUIDE};
62-
// TODO(ogi): Remove this once we merge the new releases tour
63-
case 'release-details_v2':
64-
return {tour: 'releases', task: OnboardingTaskKey.RELEASE_GUIDE};
6562
case 'performance':
6663
return {tour: 'performance', task: OnboardingTaskKey.PERFORMANCE_GUIDE};
6764

@@ -74,9 +71,9 @@ export function getDemoGuides() {
7471
return [
7572
{guide: 'sidebar_v2', seen: false},
7673
{guide: 'issues_v3', seen: false},
77-
{guide: 'releases_v2', seen: false},
78-
{guide: 'react-release', seen: false},
79-
{guide: 'release-details_v2', seen: false},
74+
{guide: 'releases', seen: false},
75+
// {guide: 'react-release', seen: false},
76+
// {guide: 'release-details_v2', seen: false},e
8077
{guide: 'performance', seen: false},
8178
// {guide: 'transaction_summary', seen: false},
8279
// {guide: 'transaction_details_v2', seen: false},
@@ -173,45 +170,5 @@ export function getDemoModeGuides(): GuidesContent {
173170
},
174171
],
175172
},
176-
{
177-
guide: 'releases_v2',
178-
requiredTargets: ['release_projects'],
179-
priority: 1,
180-
steps: [
181-
{
182-
title: t('Compare releases'),
183-
target: 'release_projects',
184-
description: t(
185-
`Click here and select the "react" project to see how the release is trending compared to previous releases.`
186-
),
187-
},
188-
],
189-
},
190-
{
191-
guide: 'react-release',
192-
requiredTargets: ['release_version'],
193-
steps: [
194-
{
195-
title: t('Release-specific trends'),
196-
target: 'release_version',
197-
description: t(
198-
`Select the latest release to review new and regressed issues, and business critical metrics like crash rate, and user adoption.`
199-
),
200-
},
201-
],
202-
},
203-
{
204-
guide: 'release-details_v2',
205-
requiredTargets: ['release_states'],
206-
steps: [
207-
{
208-
title: t('New and regressed issues'),
209-
target: 'release_states',
210-
description: t(
211-
`Along with reviewing how your release is trending over time compared to previous releases, you can view new and regressed issues here.`
212-
),
213-
},
214-
],
215-
},
216173
];
217174
}

static/app/views/releases/detail/overview/releaseIssues.tsx

+9-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import isEqual from 'lodash/isEqual';
55
import * as qs from 'query-string';
66

77
import type {Client} from 'sentry/api';
8-
import GuideAnchor from 'sentry/components/assistant/guideAnchor';
98
import {LinkButton} from 'sentry/components/core/button';
109
import {ButtonBar} from 'sentry/components/core/button/buttonBar';
1110
import {SegmentedControl} from 'sentry/components/core/segmentedControl';
@@ -17,6 +16,7 @@ import {t, tct} from 'sentry/locale';
1716
import {space} from 'sentry/styles/space';
1817
import type {Organization} from 'sentry/types/organization';
1918
import {browserHistory} from 'sentry/utils/browserHistory';
19+
import {DemoTourElement, DemoTourStep} from 'sentry/utils/demoMode/demoTours';
2020
import {MutableSearch} from 'sentry/utils/tokenizeSearch';
2121
import withApi from 'sentry/utils/withApi';
2222
import withOrganization from 'sentry/utils/withOrganization';
@@ -368,7 +368,13 @@ class ReleaseIssues extends Component<Props, State> {
368368
return (
369369
<Fragment>
370370
<ControlsWrapper>
371-
<GuideAnchor target="release_states">
371+
<DemoTourElement
372+
id={DemoTourStep.RELEASES_STATES}
373+
title={t('New and regressed issues')}
374+
description={t(
375+
`Along with reviewing how your release is trending over time compared to previous releases, you can view new and regressed issues here.`
376+
)}
377+
>
372378
<SegmentedControl
373379
aria-label={t('Issue type')}
374380
size="xs"
@@ -387,7 +393,7 @@ class ReleaseIssues extends Component<Props, State> {
387393
</SegmentedControl.Item>
388394
))}
389395
</SegmentedControl>
390-
</GuideAnchor>
396+
</DemoTourElement>
391397

392398
<OpenInButtonBar gap={1}>
393399
<LinkButton to={this.getIssuesUrl()} size="xs">

static/app/views/releases/list/index.tsx

+10-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import pick from 'lodash/pick';
55

66
import {fetchTagValues} from 'sentry/actionCreators/tags';
77
import type {Client} from 'sentry/api';
8-
import GuideAnchor from 'sentry/components/assistant/guideAnchor';
98
import {Alert} from 'sentry/components/core/alert';
109
import DeprecatedAsyncComponent from 'sentry/components/deprecatedAsyncComponent';
1110
import EmptyMessage from 'sentry/components/emptyMessage';
@@ -41,6 +40,7 @@ import type {AvatarProject, Project} from 'sentry/types/project';
4140
import type {Release} from 'sentry/types/release';
4241
import {ReleaseStatus} from 'sentry/types/release';
4342
import {trackAnalytics} from 'sentry/utils/analytics';
43+
import {DemoTourElement, DemoTourStep} from 'sentry/utils/demoMode/demoTours';
4444
import {SEMVER_TAGS} from 'sentry/utils/discover/fields';
4545
import Projects from 'sentry/utils/projects';
4646
import withApi from 'sentry/utils/withApi';
@@ -558,9 +558,16 @@ class ReleasesList extends DeprecatedAsyncComponent<Props, State> {
558558
{this.renderHealthCta()}
559559

560560
<ReleasesPageFilterBar condensed>
561-
<GuideAnchor target="release_projects">
561+
<DemoTourElement
562+
id={DemoTourStep.RELEASES_COMPARE}
563+
title={t('Compare releases')}
564+
description={t(
565+
'Click here and select the "react" project to see how the release is trending compared to previous releases.'
566+
)}
567+
position="bottom-start"
568+
>
562569
<ProjectPageFilter />
563-
</GuideAnchor>
570+
</DemoTourElement>
564571
<EnvironmentPageFilter />
565572
<DatePageFilter
566573
disallowArbitraryRelativeRanges

static/app/views/releases/list/releaseCard/index.tsx

+9-4
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import type {Location} from 'history';
55
import partition from 'lodash/partition';
66
import moment from 'moment-timezone';
77

8-
import GuideAnchor from 'sentry/components/assistant/guideAnchor';
98
import Collapsible from 'sentry/components/collapsible';
109
import {Tag} from 'sentry/components/core/badge/tag';
1110
import {Button} from 'sentry/components/core/button';
@@ -23,6 +22,7 @@ import {space} from 'sentry/styles/space';
2322
import type {PageFilters} from 'sentry/types/core';
2423
import type {Organization} from 'sentry/types/organization';
2524
import type {Release} from 'sentry/types/release';
25+
import {DemoTourElement, DemoTourStep} from 'sentry/utils/demoMode/demoTours';
2626
import {useUser} from 'sentry/utils/useUser';
2727
import useFinalizeRelease from 'sentry/views/releases/components/useFinalizeRelease';
2828
import type {ReleasesDisplayOption} from 'sentry/views/releases/list/releasesDisplayOptions';
@@ -129,14 +129,19 @@ function ReleaseCard({
129129
query: {project: getReleaseProjectId(release, selection)},
130130
}}
131131
>
132-
<GuideAnchor
132+
<DemoTourElement
133+
id={DemoTourStep.RELEASES_DETAILS}
133134
disabled={!isTopRelease || projectsToShow.length > 1}
134-
target="release_version"
135+
title={t('Release-specific trends')}
136+
description={t(
137+
'Select the latest release to review new and regressed issues, and business critical metrics like crash rate, and user adoption.'
138+
)}
139+
position="bottom-start"
135140
>
136141
<VersionWrapper>
137142
<StyledVersion version={version} tooltipRawVersion anchor={false} />
138143
</VersionWrapper>
139-
</GuideAnchor>
144+
</DemoTourElement>
140145
</GlobalSelectionLink>
141146
{commitCount > 0 && (
142147
<ReleaseCardCommits release={release} withHeading={false} />

0 commit comments

Comments
 (0)