Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 27 additions & 0 deletions static/app/gettingStartedDocs/dotnet/maui/crashReport.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import type {OnboardingConfig} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {
getCrashReportGenericInstallSteps,
getCrashReportModalConfigDescription,
getCrashReportModalIntroduction,
} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding';

export const crashReport: OnboardingConfig = {
introduction: () => getCrashReportModalIntroduction(),
install: params => getCrashReportGenericInstallSteps(params),
configure: () => [
{
type: StepType.CONFIGURE,
content: [
{
type: 'text',
text: getCrashReportModalConfigDescription({
link: 'https://docs.sentry.io/platforms/dotnet/guides/maui/user-feedback/configuration/#crash-report-modal',
}),
},
],
},
],
verify: () => [],
nextSteps: () => [],
};
13 changes: 13 additions & 0 deletions static/app/gettingStartedDocs/dotnet/maui/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
import type {Docs} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {feedback} from 'sentry/gettingStartedDocs/dotnet/dotnet/feedback';

This comment was marked as outdated.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a valid point, static/app/gettingStartedDocs/dotnet/dotnet/feedback does not exist. Maybe this PR should be based upon a dotnet one? (Or simply updated?)

Copy link
Member Author

Choose a reason for hiding this comment

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

sorry its back in draft, I clicked ready by mistake...the dotnet/dotnet has to be merged first


import {crashReport} from './crashReport';
import {onboarding} from './onboarding';

const docs: Docs = {
onboarding,
feedbackOnboardingCrashApi: feedback,
crashReportOnboarding: crashReport,
};

export default docs;
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {textWithMarkupMatcher} from 'sentry-test/utils';

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

import docs from './maui';
import docs from './index';

describe('maui onboarding docs', () => {
it('renders errors onboarding docs correctly', async () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,37 +1,28 @@
import {ExternalLink} from 'sentry/components/core/link';
import type {
Docs,
DocsParams,
OnboardingConfig,
OnboardingStep,
} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {StepType} from 'sentry/components/onboarding/gettingStartedDoc/types';
import {
getCrashReportGenericInstallSteps,
getCrashReportModalConfigDescription,
getCrashReportModalIntroduction,
} from 'sentry/components/onboarding/gettingStartedDoc/utils/feedbackOnboarding';
import {feedback} from 'sentry/gettingStartedDocs/dotnet/dotnet/feedback';
import {t, tct} from 'sentry/locale';
import {getPackageVersion} from 'sentry/utils/gettingStartedDocs/getPackageVersion';

type Params = DocsParams;

const getInstallSnippetPackageManager = (params: Params) => `
const getInstallSnippetPackageManager = (params: DocsParams) => `
Install-Package Sentry.Maui -Version ${getPackageVersion(
params,
'sentry.dotnet.maui',
'4.3.0'
)}`;

const getInstallSnippetCoreCli = (params: Params) => `
const getInstallSnippetCoreCli = (params: DocsParams) => `
dotnet add package Sentry.Maui -v ${getPackageVersion(
params,
'sentry.dotnet.maui',
'4.3.0'
)}`;

const getConfigureSnippet = (params: Params) => `
const getConfigureSnippet = (params: DocsParams) => `
public static MauiApp CreateMauiApp()
{
var builder = MauiApp.CreateBuilder();
Expand Down Expand Up @@ -86,7 +77,7 @@ var span = transaction.StartChild("test-child-operation");
span.Finish(); // Mark the span as finished
transaction.Finish(); // Mark the transaction as finished and send it to Sentry`;

const onboarding: OnboardingConfig = {
export const onboarding: OnboardingConfig = {
install: params => [
{
type: StepType.INSTALL,
Expand Down Expand Up @@ -232,31 +223,3 @@ const onboarding: OnboardingConfig = {
},
],
};

const crashReportOnboarding: OnboardingConfig = {
introduction: () => getCrashReportModalIntroduction(),
install: (params: Params) => getCrashReportGenericInstallSteps(params),
configure: () => [
{
type: StepType.CONFIGURE,
content: [
{
type: 'text',
text: getCrashReportModalConfigDescription({
link: 'https://docs.sentry.io/platforms/dotnet/guides/maui/user-feedback/configuration/#crash-report-modal',
}),
},
],
},
],
verify: () => [],
nextSteps: () => [],
};

const docs: Docs = {
onboarding,
feedbackOnboardingCrashApi: feedback,
crashReportOnboarding,
};

export default docs;
Loading