Skip to content

Commit 395bad1

Browse files
1 parent 2d28dad commit 395bad1

File tree

4 files changed

+45
-42
lines changed

4 files changed

+45
-42
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import type {OnboardingConfig} from 'sentry/components/onboarding/gettingStartedDoc/types';
2+
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types';
3+
import {
4+
getCrashReportGenericInstallSteps,
5+
getCrashReportModalConfigDescription,
6+
getCrashReportModalIntroduction,
7+
} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding';
8+
9+
export const crashReport: OnboardingConfig = {
10+
introduction: () => getCrashReportModalIntroduction(),
11+
install: params => getCrashReportGenericInstallSteps(params),
12+
configure: () => [
13+
{
14+
type: StepType.CONFIGURE,
15+
content: [
16+
{
17+
type: 'text',
18+
text: getCrashReportModalConfigDescription({
19+
link: 'https://docs.sentry.io/platforms/dotnet/guides/wpf/user-feedback/configuration/#crash-report-modal',
20+
}),
21+
},
22+
],
23+
},
24+
],
25+
verify: () => [],
26+
nextSteps: () => [],
27+
};
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types';
2+
import {feedback} from 'sentry/gettingStartedDocs/dotnet/dotnet/feedback';
3+
4+
import {crashReport} from './crashReport';
5+
import {onboarding} from './onboarding';
6+
7+
const docs: Docs = {
8+
onboarding,
9+
feedbackOnboardingCrashApi: feedback,
10+
crashReportOnboarding: crashReport,
11+
};
12+
13+
export default docs;

static/app/gettingStartedDocs/dotnet/wpf.spec.tsx renamed to static/app/gettingStartedDocs/dotnet/wpf/onboarding.spec.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {textWithMarkupMatcher} from 'sentry-test/utils';
44

55
import {ProductSolution} from 'sentry/components/onboarding/gettingStartedDoc/types';
66

7-
import docs from './wpf';
7+
import docs from './index';
88

99
describe('wpf onboarding docs', () => {
1010
it('renders errors onboarding docs correctly', async () => {

static/app/gettingStartedDocs/dotnet/wpf.tsx renamed to static/app/gettingStartedDocs/dotnet/wpf/onboarding.tsx

Lines changed: 4 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,20 @@
11
import {ExternalLink} from 'sentry/components/core/link';
22
import type {
3-
Docs,
43
DocsParams,
54
OnboardingConfig,
65
OnboardingStep,
76
} from 'sentry/components/onboarding/gettingStartedDoc/types';
87
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types';
9-
import {
10-
getCrashReportGenericInstallSteps,
11-
getCrashReportModalConfigDescription,
12-
getCrashReportModalIntroduction,
13-
} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding';
14-
import {feedback} from 'sentry/gettingStartedDocs/dotnet/dotnet/feedback';
158
import {t, tct} from 'sentry/locale';
169
import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion';
1710

18-
type Params = DocsParams;
19-
20-
const getInstallSnippetPackageManager = (params: Params) => `
11+
const getInstallSnippetPackageManager = (params: DocsParams) => `
2112
Install-Package Sentry -Version ${getPackageVersion(params, 'sentry.dotnet', '3.34.0')}`;
2213

23-
const getInstallSnippetCoreCli = (params: Params) => `
14+
const getInstallSnippetCoreCli = (params: DocsParams) => `
2415
dotnet add package Sentry -v ${getPackageVersion(params, 'sentry.dotnet', '3.34.0')}`;
2516

26-
const getConfigureSnippet = (params: Params) => `
17+
const getConfigureSnippet = (params: DocsParams) => `
2718
using System.Windows.Threading;
2819
using System.Windows;
2920
using Sentry;
@@ -74,7 +65,7 @@ var span = transaction.StartChild("test-child-operation");
7465
span.Finish(); // Mark the span as finished
7566
transaction.Finish(); // Mark the transaction as finished and send it to Sentry`;
7667

77-
const onboarding: OnboardingConfig = {
68+
export const onboarding: OnboardingConfig = {
7869
install: params => [
7970
{
8071
type: StepType.INSTALL,
@@ -218,31 +209,3 @@ const onboarding: OnboardingConfig = {
218209
},
219210
],
220211
};
221-
222-
const crashReportOnboarding: OnboardingConfig = {
223-
introduction: () => getCrashReportModalIntroduction(),
224-
install: (params: Params) => getCrashReportGenericInstallSteps(params),
225-
configure: () => [
226-
{
227-
type: StepType.CONFIGURE,
228-
content: [
229-
{
230-
type: 'text',
231-
text: getCrashReportModalConfigDescription({
232-
link: 'https://docs.sentry.io/platforms/dotnet/guides/wpf/user-feedback/configuration/#crash-report-modal',
233-
}),
234-
},
235-
],
236-
},
237-
],
238-
verify: () => [],
239-
nextSteps: () => [],
240-
};
241-
242-
const docs: Docs = {
243-
onboarding,
244-
feedbackOnboardingCrashApi: feedback,
245-
crashReportOnboarding,
246-
};
247-
248-
export default docs;

0 commit comments

Comments
 (0)