|
@@ -6,6 +6,7 @@ import type {
|
|
|
PlatformOption,
|
|
|
} from 'sentry/components/onboarding/gettingStartedDoc/types';
|
|
|
import {
|
|
|
+ getFeedbackConfigureDescription,
|
|
|
getReplayConfigOptions,
|
|
|
getReplayConfigureDescription,
|
|
|
getUploadSourceMapsStep,
|
|
@@ -105,7 +106,7 @@ const onboarding: OnboardingConfig<PlatformOptions> = {
|
|
|
configurations: getInstallConfig(params),
|
|
|
},
|
|
|
],
|
|
|
- configure: params => [
|
|
|
+ configure: (params: Params) => [
|
|
|
{
|
|
|
type: StepType.CONFIGURE,
|
|
|
configurations: [
|
|
@@ -164,7 +165,7 @@ const onboarding: OnboardingConfig<PlatformOptions> = {
|
|
|
],
|
|
|
},
|
|
|
],
|
|
|
- nextSteps: params => getNextStep(params),
|
|
|
+ nextSteps: (params: Params) => getNextStep(params),
|
|
|
};
|
|
|
|
|
|
export const nextSteps = [
|
|
@@ -208,6 +209,14 @@ function getSdkSetupSnippet(params: Params) {
|
|
|
? `
|
|
|
Sentry.browserTracingIntegration(),`
|
|
|
: ''
|
|
|
+ }${
|
|
|
+ params.isFeedbackSelected
|
|
|
+ ? `
|
|
|
+ Sentry.feedbackIntegration({
|
|
|
+// Additional SDK configuration goes in here, for example:
|
|
|
+colorScheme: "light",
|
|
|
+}),`
|
|
|
+ : ''
|
|
|
}${
|
|
|
params.isReplaySelected
|
|
|
? `
|
|
@@ -268,7 +277,7 @@ const replayOnboarding: OnboardingConfig<PlatformOptions> = {
|
|
|
configurations: getInstallConfig(params),
|
|
|
},
|
|
|
],
|
|
|
- configure: params => [
|
|
|
+ configure: (params: Params) => [
|
|
|
{
|
|
|
type: StepType.CONFIGURE,
|
|
|
description: getReplayConfigureDescription({
|
|
@@ -293,9 +302,48 @@ const replayOnboarding: OnboardingConfig<PlatformOptions> = {
|
|
|
nextSteps: () => [],
|
|
|
};
|
|
|
|
|
|
+const feedbackOnboarding: OnboardingConfig<PlatformOptions> = {
|
|
|
+ install: (params: Params) => [
|
|
|
+ {
|
|
|
+ type: StepType.INSTALL,
|
|
|
+ description: tct(
|
|
|
+ 'For the User Feedback integration to work, you must have the Sentry browser SDK package, or an equivalent framework SDK (e.g. [codeAngular:@sentry/angular] or [codeIvy:@sentry/angular-ivy]) installed, minimum version 7.85.0.',
|
|
|
+ {
|
|
|
+ codeAngular: <code />,
|
|
|
+ codeIvy: <code />,
|
|
|
+ }
|
|
|
+ ),
|
|
|
+ configurations: getInstallConfig(params),
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ configure: (params: Params) => [
|
|
|
+ {
|
|
|
+ type: StepType.CONFIGURE,
|
|
|
+ description: getFeedbackConfigureDescription({
|
|
|
+ link: 'https://docs.sentry.io/platforms/javascript/guides/angular/user-feedback/',
|
|
|
+ }),
|
|
|
+ configurations: [
|
|
|
+ {
|
|
|
+ code: [
|
|
|
+ {
|
|
|
+ label: 'JavaScript',
|
|
|
+ value: 'javascript',
|
|
|
+ language: 'javascript',
|
|
|
+ code: getSdkSetupSnippet(params),
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ verify: () => [],
|
|
|
+ nextSteps: () => [],
|
|
|
+};
|
|
|
+
|
|
|
const docs: Docs<PlatformOptions> = {
|
|
|
onboarding,
|
|
|
platformOptions,
|
|
|
+ feedbackOnboardingNpm: feedbackOnboarding,
|
|
|
replayOnboardingNpm: replayOnboarding,
|
|
|
customMetricsOnboarding: getJSMetricsOnboarding({getInstallConfig}),
|
|
|
};
|