Skip to content

Commit f8c9f4b

Browse files
priscilawebdevJesse-Box
authored andcommitted
ref(onboarding): Split Sveltekit onboarding docs (#102563)
Contributes to https://linear.app/getsentry/issue/TET-864/introduce-folders-for-onboarding-platforms
1 parent 8782380 commit f8c9f4b

File tree

11 files changed

+310
-275
lines changed

11 files changed

+310
-275
lines changed

static/app/gettingStartedDocs/javascript/sveltekit.tsx

Lines changed: 0 additions & 274 deletions
This file was deleted.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import {getNodeAgentMonitoringOnboarding} from 'sentry/gettingStartedDocs/node/node/utils';
2+
3+
export const agentMonitoring = getNodeAgentMonitoringOnboarding({
4+
packageName: '@sentry/sveltekit',
5+
configFileName: 'instrumentation.server.js',
6+
});
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
import {widgetCalloutBlock} from 'sentry/components/onboarding/gettingStartedDoc/feedback/widgetCallout';
2+
import type {
3+
DocsParams,
4+
OnboardingConfig,
5+
} from 'sentry/components/onboarding/gettingStartedDoc/types';
6+
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types';
7+
import {
8+
getCrashReportJavaScriptInstallSteps,
9+
getCrashReportModalConfigDescription,
10+
getCrashReportModalIntroduction,
11+
} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding';
12+
13+
export const crashReport: OnboardingConfig = {
14+
introduction: () => getCrashReportModalIntroduction(),
15+
install: (params: DocsParams) => getCrashReportJavaScriptInstallSteps(params),
16+
configure: () => [
17+
{
18+
type: StepType.CONFIGURE,
19+
content: [
20+
{
21+
type: 'text',
22+
text: getCrashReportModalConfigDescription({
23+
link: 'https://docs.sentry.io/platforms/javascript/guides/sveltekit/user-feedback/configuration/#crash-report-modal',
24+
}),
25+
},
26+
widgetCalloutBlock({
27+
link: 'https://docs.sentry.io/platforms/javascript/guides/sveltekit/user-feedback/#user-feedback-widget',
28+
}),
29+
],
30+
},
31+
],
32+
verify: () => [],
33+
nextSteps: () => [],
34+
};
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
import crashReportCallout from 'sentry/components/onboarding/gettingStartedDoc/feedback/crashReportCallout';
2+
import type {
3+
DocsParams,
4+
OnboardingConfig,
5+
} from 'sentry/components/onboarding/gettingStartedDoc/types';
6+
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types';
7+
import {
8+
getFeedbackConfigureDescription,
9+
getFeedbackSDKSetupSnippet,
10+
} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding';
11+
import {tct} from 'sentry/locale';
12+
13+
import {getConfigStep} from './utils';
14+
15+
export const feedback: OnboardingConfig = {
16+
install: (params: DocsParams) => [
17+
{
18+
type: StepType.INSTALL,
19+
content: [
20+
{
21+
type: 'text',
22+
text: tct(
23+
'For the User Feedback integration to work, you must have the Sentry browser SDK package, or an equivalent framework SDK (e.g. [code:@sentry/sveltekit]) installed, minimum version 7.85.0.',
24+
{
25+
code: <code />,
26+
}
27+
),
28+
},
29+
...getConfigStep(params),
30+
],
31+
},
32+
],
33+
configure: (params: DocsParams) => [
34+
{
35+
type: StepType.CONFIGURE,
36+
content: [
37+
{
38+
type: 'text',
39+
text: getFeedbackConfigureDescription({
40+
linkConfig:
41+
'https://docs.sentry.io/platforms/javascript/guides/sveltekit/user-feedback/configuration/',
42+
linkButton:
43+
'https://docs.sentry.io/platforms/javascript/guides/sveltekit/user-feedback/configuration/#bring-your-own-button',
44+
}),
45+
},
46+
{
47+
type: 'code',
48+
tabs: [
49+
{
50+
label: 'JavaScript',
51+
language: 'javascript',
52+
code: getFeedbackSDKSetupSnippet({
53+
importStatement: `import * as Sentry from "@sentry/sveltekit";`,
54+
dsn: params.dsn.public,
55+
feedbackOptions: params.feedbackOptions,
56+
}),
57+
},
58+
],
59+
},
60+
{
61+
type: 'custom',
62+
content: crashReportCallout({
63+
link: 'https://docs.sentry.io/platforms/javascript/guides/sveltekit/user-feedback/#crash-report-modal',
64+
}),
65+
},
66+
],
67+
},
68+
],
69+
verify: () => [],
70+
nextSteps: () => [],
71+
};

0 commit comments

Comments
 (0)