Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
2bb4e1f
wip
obostjancic Apr 2, 2025
3d9cc93
poc
obostjancic Apr 4, 2025
095f213
remove changes
obostjancic Apr 4, 2025
c16199d
fix type
obostjancic Apr 4, 2025
9d250c5
add steps
obostjancic Apr 4, 2025
318bebb
improve
obostjancic Apr 7, 2025
8c41150
revert usage
obostjancic Apr 7, 2025
f396fd4
remove usage
obostjancic Apr 7, 2025
15a1528
revert
obostjancic Apr 7, 2025
4721029
test
obostjancic Apr 7, 2025
e2fe5b6
Merge branch 'master' into ogi/feat/demo-tours
obostjancic Apr 8, 2025
74925c9
added tests
obostjancic Apr 8, 2025
16b5852
Merge branch 'master' into ogi/feat/demo-tours
obostjancic Apr 8, 2025
40405a9
backwards compatibility
obostjancic Apr 8, 2025
0521bf9
switch to undefiend
obostjancic Apr 8, 2025
a2cb040
test fix
obostjancic Apr 8, 2025
a4e6af6
Merge branch 'master' into ogi/feat/demo-tours
obostjancic Apr 8, 2025
215c143
wip
obostjancic Apr 9, 2025
0673045
fix test
obostjancic Apr 9, 2025
b424f3c
remove .Provider
obostjancic Apr 9, 2025
e1e5cd7
export
obostjancic Apr 9, 2025
05036fd
use wrapper
obostjancic Apr 10, 2025
3dfd15e
remove test
obostjancic Apr 10, 2025
caf7964
rename
obostjancic Apr 10, 2025
2ae8825
Merge branch 'ogi/feat/demo-tours' into ogi/feat/performance-tour
obostjancic Apr 10, 2025
21db8bc
performance tour port
obostjancic Apr 10, 2025
c2a6430
:hammer_and_wrench: apply pre-commit fixes
getsantry[bot] Apr 10, 2025
8706d18
ts fix
obostjancic Apr 10, 2025
25c5312
feat(demo-mode): releases tour
obostjancic Apr 10, 2025
32e8ae3
Merge branch 'master' into ogi/feat/performance-tour
obostjancic Apr 11, 2025
acf837e
rename hooks
obostjancic Apr 11, 2025
96ace02
test fix
obostjancic Apr 11, 2025
f9d4fd2
remove params
obostjancic Apr 11, 2025
4fbb2a8
make context val optional
obostjancic Apr 11, 2025
d6882b7
revert issues change
obostjancic Apr 11, 2025
c862cb3
Merge branch 'ogi/feat/performance-tour' into ogi/feat/releases-tour
obostjancic Apr 11, 2025
13e6ca2
getTourTask fix
obostjancic Apr 11, 2025
85a2463
Merge branch 'ogi/feat/performance-tour' into ogi/feat/releases-tour
obostjancic Apr 11, 2025
e303f62
feat(demo-mode): issues tour
obostjancic Apr 11, 2025
3cd796c
Merge branch 'master' into ogi/feat/demo-issues-tour
obostjancic Apr 15, 2025
9684784
add props and comment
obostjancic Apr 15, 2025
0bf9615
Merge branch 'master' into ogi/feat/demo-issues-tour
obostjancic Apr 15, 2025
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
7 changes: 4 additions & 3 deletions static/app/components/onboardingWizard/content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ import {space} from 'sentry/styles/space';
import {type OnboardingTask, OnboardingTaskKey} from 'sentry/types/onboarding';
import {trackAnalytics} from 'sentry/utils/analytics';
import {isDemoModeActive} from 'sentry/utils/demoMode';
import {DemoTour, DemoTourStep, useDemoTours} from 'sentry/utils/demoMode/demoTours';
import {DemoTour, useDemoTours} from 'sentry/utils/demoMode/demoTours';
import {updateDemoWalkthroughTask} from 'sentry/utils/demoMode/guides';
import testableTransition from 'sentry/utils/testableTransition';
import {useLocalStorageState} from 'sentry/utils/useLocalStorageState';
Expand Down Expand Up @@ -274,11 +274,12 @@ function Task({task, hidePanel, showWaitingIndicator}: TaskProps) {
e.stopPropagation();

if (isDemoModeActive()) {
// Performance guide is updated to use the new tour
if (task.task === OnboardingTaskKey.PERFORMANCE_GUIDE) {
tours?.[DemoTour.PERFORMANCE]?.startTour(DemoTourStep.PERFORMANCE_TABLE);
tours?.[DemoTour.PERFORMANCE]?.startTour();
} else if (task.task === OnboardingTaskKey.RELEASE_GUIDE) {
tours?.[DemoTour.RELEASES]?.startTour();
} else if (task.task === OnboardingTaskKey.ISSUE_GUIDE) {
tours?.[DemoTour.ISSUES]?.startTour();
} else {
DemoWalkthroughStore.activateGuideAnchor(task.task);
}
Expand Down
10 changes: 1 addition & 9 deletions static/app/components/stream/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ import TimeSince from 'sentry/components/timeSince';
import {Tooltip} from 'sentry/components/tooltip';
import {DEFAULT_STATS_PERIOD} from 'sentry/constants';
import {t} from 'sentry/locale';
import DemoWalkthroughStore from 'sentry/stores/demoWalkthroughStore';
import GroupStore from 'sentry/stores/groupStore';
import SelectedGroupStore from 'sentry/stores/selectedGroupStore';
import {useLegacyStore} from 'sentry/stores/useLegacyStore';
Expand All @@ -42,7 +41,6 @@ import type {NewQuery} from 'sentry/types/organization';
import type {User} from 'sentry/types/user';
import {defined, percent} from 'sentry/utils';
import {trackAnalytics} from 'sentry/utils/analytics';
import {isDemoModeActive} from 'sentry/utils/demoMode';
import EventView from 'sentry/utils/discover/eventView';
import {SavedQueryDatasets} from 'sentry/utils/discover/types';
import {isCtrlKeyPressed} from 'sentry/utils/isCtrlKeyPressed';
Expand Down Expand Up @@ -520,12 +518,6 @@ function StreamGroup({
<Placeholder height="18px" />
);

const issueStreamAnchor = isDemoModeActive() ? (
<GuideAnchor target="issue_stream" disabled={!DemoWalkthroughStore.get('issue')} />
) : (
<GuideAnchor target="issue_stream" />
);

Comment on lines -523 to -528
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We no longer use Guide anchors for demo mode

const onClick = (e: React.MouseEvent<HTMLDivElement>) => {
if (displayReprocessingLayout) {
return;
Expand Down Expand Up @@ -581,7 +573,7 @@ function StreamGroup({
<EventOrGroupHeader index={index} data={group} query={query} source={referrer} />
<EventOrGroupExtraDetails data={group} showLifetime={false} />
</GroupSummary>
{hasGuideAnchor && issueStreamAnchor}
{hasGuideAnchor && <GuideAnchor target="issue_stream" />}

{withColumns.includes('lastSeen') && (
<LastSeenWrapper breakpoint={COLUMN_BREAKPOINTS.LAST_SEEN}>
Expand Down
2 changes: 1 addition & 1 deletion static/app/utils/demoMode/demoTours.spec.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ describe('DemoTours', () => {
[DemoTour.ISSUES]: {
currentStepId: null,
isCompleted: false,
orderedStepIds: [DemoTourStep.ISSUES_STREAM, DemoTourStep.ISSUES_TAGS],
orderedStepIds: [DemoTourStep.ISSUES_STREAM, DemoTourStep.ISSUES_AGGREGATES],
isRegistered: true,
tourKey: DemoTour.ISSUES,
},
Expand Down
49 changes: 43 additions & 6 deletions static/app/utils/demoMode/demoTours.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ import {createContext, useCallback, useContext, useMemo} from 'react';

import {recordFinish} from 'sentry/actionCreators/guides';
import {
TourElement,
TourElementContent,
type TourElementProps,
} from 'sentry/components/tours/components';
import {
type TourContextType,
type TourEnumType,
type TourState,
useTourReducer,
} from 'sentry/components/tours/tourContext';
Expand All @@ -31,9 +33,9 @@ export const enum DemoTourStep {
SIDEBAR_DISCOVER = 'demo-tour-sidebar-discover',
// Issues steps
ISSUES_STREAM = 'demo-tour-issues-stream',
ISSUES_TAGS = 'demo-tour-issues-tags',
ISSUES_STACKTRACE = 'demo-tour-issues-stacktrace',
ISSUES_BREADCRUMBS = 'demo-tour-issues-breadcrumbs',
ISSUES_AGGREGATES = 'demo-tour-issues-aggregates',
ISSUES_EVENT_DETAILS = 'demo-tour-issues-event-details',
ISSUES_DETAIL_SIDEBAR = 'demo-tour-issues-detail-sidebar',
// Releases steps
RELEASES_COMPARE = 'demo-tour-releases-compare',
RELEASES_DETAILS = 'demo-tour-releases-details',
Expand Down Expand Up @@ -80,9 +82,9 @@ const TOUR_STEPS: Record<DemoTour, DemoTourStep[]> = {
],
[DemoTour.ISSUES]: [
DemoTourStep.ISSUES_STREAM,
DemoTourStep.ISSUES_TAGS,
DemoTourStep.ISSUES_STACKTRACE,
DemoTourStep.ISSUES_BREADCRUMBS,
DemoTourStep.ISSUES_AGGREGATES, // Metadata and metrics // view data in aggregate 1/6
DemoTourStep.ISSUES_EVENT_DETAILS, // Explore details // Explore details 3/6
DemoTourStep.ISSUES_DETAIL_SIDEBAR, // Share updates // 6/6
],
[DemoTour.RELEASES]: [
DemoTourStep.RELEASES_COMPARE,
Expand Down Expand Up @@ -242,3 +244,38 @@ export function DemoTourElement({
</TourElementContent>
);
}

/**
* A component that renders either a DemoTourElement or regular TourElement depending on whether
* demo mode is active. This allows the same tour content to be shared between demo mode and
* regular product tours.
*/
export function SharedTourElement<T extends TourEnumType>({
id,
demoTourId,
title,
description,
children,
tourContext,
...props
}: TourElementProps<T> & {demoTourId: DemoTourStep}) {
if (isDemoModeActive()) {
return (
<DemoTourElement id={demoTourId} title={title} description={description}>
{children}
</DemoTourElement>
);
}

return (
<TourElement
{...props}
id={id}
title={title}
description={description}
tourContext={tourContext}
>
{children}
</TourElement>
);
}
58 changes: 1 addition & 57 deletions static/app/utils/demoMode/guides.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,6 @@ export function getTourTask(
return {tour: 'tabs', task: OnboardingTaskKey.SIDEBAR_GUIDE};
case 'issues':
return {tour: 'issues', task: OnboardingTaskKey.ISSUE_GUIDE};
// TODO(ogi): Remove this once we merge the new issues tour
case 'issues_v3':
return {tour: 'issues', task: OnboardingTaskKey.ISSUE_GUIDE};
case 'releases':
return {tour: 'releases', task: OnboardingTaskKey.RELEASE_GUIDE};
case 'performance':
Expand All @@ -68,17 +65,7 @@ export function getTourTask(
}

export function getDemoGuides() {
return [
{guide: 'sidebar_v2', seen: false},
{guide: 'issues_v3', seen: false},
{guide: 'releases', seen: false},
// {guide: 'react-release', seen: false},
// {guide: 'release-details_v2', seen: false},e
{guide: 'performance', seen: false},
// {guide: 'transaction_summary', seen: false},
// {guide: 'transaction_details_v2', seen: false},
{guide: 'issue_stream_v3', seen: false},
];
return [{guide: 'sidebar_v2', seen: false}];
}

export function getDemoModeGuides(): GuidesContent {
Expand Down Expand Up @@ -127,48 +114,5 @@ export function getDemoModeGuides(): GuidesContent {
},
],
},
{
guide: 'issue_stream_v3',
requiredTargets: ['issue_stream'],
steps: [
{
title: t('Issues'),
target: 'issue_stream',
description: t(
`Sentry automatically groups similar events together into an issue. Similarity is
determined by stack trace and other factors. Click on an issue to learn more.`
),
},
],
},
{
guide: 'issues_v3',
requiredTargets: ['tags'],
steps: [
{
title: t('Metadata and metrics'),
target: 'tags',
description: t(
`See tags like specific users affected by the event, device, OS, and browser type.
On the right side of the page you can view the number of affected users and exception frequency overtime.`
),
},
{
title: t('Find your broken code'),
target: 'stacktrace',
description: t(
`View the stack trace to see the exact sequence of function calls leading to the error in question.`
),
},
{
title: t('Retrace your steps'),
target: 'breadcrumbs',
description: t(
`Sentry automatically captures breadcrumbs for events so you can see the sequence of events leading up to the error.`
),
nextText: t('Got it'),
},
],
},
];
}
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {useTheme} from '@emotion/react';
import styled from '@emotion/styled';

import {TourElement} from 'sentry/components/tours/components';
import {t} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import type {Event} from 'sentry/types/event';
import type {Group} from 'sentry/types/group';
import type {Project} from 'sentry/types/project';
import {DemoTourStep, SharedTourElement} from 'sentry/utils/demoMode/demoTours';
import {getConfigForIssueType} from 'sentry/utils/issueTypeConfig';
import useMedia from 'sentry/utils/useMedia';
import {
Expand Down Expand Up @@ -58,20 +58,22 @@ export function GroupDetailsLayout({
sidebarOpen={issueDetails.isSidebarOpen}
>
<div>
<TourElement<IssueDetailsTour>
tourContext={IssueDetailsTourContext}
<SharedTourElement<IssueDetailsTour>
id={IssueDetailsTour.AGGREGATES}
demoTourId={DemoTourStep.ISSUES_AGGREGATES}
tourContext={IssueDetailsTourContext}
title={t('View data in aggregate')}
description={t(
'The top section of the page always displays data in aggregate, including trends over time or tag value distributions.'
)}
position="bottom"
>
<EventDetailsHeader event={event} group={group} project={project} />
</TourElement>
<TourElement<IssueDetailsTour>
tourContext={IssueDetailsTourContext}
</SharedTourElement>
<SharedTourElement<IssueDetailsTour>
id={IssueDetailsTour.EVENT_DETAILS}
demoTourId={DemoTourStep.ISSUES_EVENT_DETAILS}
tourContext={IssueDetailsTourContext}
title={t('Explore details')}
description={t(
'Here we capture everything we know about this data example, like context, trace, breadcrumbs, replay, and tags.'
Expand All @@ -86,7 +88,7 @@ export function GroupDetailsLayout({
</NavigationSidebarWrapper>
<ContentPadding>{children}</ContentPadding>
</GroupContent>
</TourElement>
</SharedTourElement>
</div>
{shouldDisplaySidebar ? (
<StreamlinedSidebar group={group} event={event} project={project} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import styled from '@emotion/styled';
import ErrorBoundary from 'sentry/components/errorBoundary';
import * as Layout from 'sentry/components/layouts/thirds';
import * as SidebarSection from 'sentry/components/sidebarSection';
import {TourElement} from 'sentry/components/tours/components';
import {t} from 'sentry/locale';
import {space} from 'sentry/styles/space';
import type {Event} from 'sentry/types/event';
import type {Group, TeamParticipant, UserParticipant} from 'sentry/types/group';
import type {Project} from 'sentry/types/project';
import {DemoTourStep, SharedTourElement} from 'sentry/utils/demoMode/demoTours';
import {getConfigForIssueType} from 'sentry/utils/issueTypeConfig';
import useMedia from 'sentry/utils/useMedia';
import useOrganization from 'sentry/utils/useOrganization';
Expand Down Expand Up @@ -52,9 +52,10 @@ export default function StreamlinedSidebar({group, event, project}: Props) {
const isBottomSidebar = useMedia(`(max-width: ${theme.breakpoints.large})`);

return (
<TourElement<IssueDetailsTour>
<SharedTourElement<IssueDetailsTour>
tourContext={IssueDetailsTourContext}
id={IssueDetailsTour.SIDEBAR}
demoTourId={DemoTourStep.ISSUES_DETAIL_SIDEBAR}
title={t('Share updates')}
description={t(
'Leave a comment for a teammate or link your favorite ticketing system - this area helps you collaborate and track progress on the issue.'
Expand Down Expand Up @@ -105,7 +106,7 @@ export default function StreamlinedSidebar({group, event, project}: Props) {
</Fragment>
)}
</Side>
</TourElement>
</SharedTourElement>
);
}

Expand Down
Loading
Loading