Skip to content

Commit

Permalink
Revert "ref(getting-started-docs): Source sdks version from sentry re…
Browse files Browse the repository at this point in the history
…lease registry (#54675)"

This reverts commit d5615b9.

Co-authored-by: priscilawebdev <29228205+priscilawebdev@users.noreply.github.com>
  • Loading branch information
getsentry-bot and priscilawebdev committed Aug 17, 2023
1 parent 8e90ede commit 0f1c8ff
Show file tree
Hide file tree
Showing 75 changed files with 313 additions and 844 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {useEffect, useState} from 'react';

import LoadingIndicator from 'sentry/components/loadingIndicator';
import {useSourcePackageRegistries} from 'sentry/components/onboarding/gettingStartedDoc/useSourcePackageRegistries';
import {ProductSolution} from 'sentry/components/onboarding/productSelection';
import {PlatformKey} from 'sentry/data/platformCategories';
import type {Organization, PlatformIntegration, Project, ProjectKey} from 'sentry/types';
Expand All @@ -23,7 +22,6 @@ export type ModuleProps = {
organization?: Organization;
platformKey?: PlatformKey;
projectId?: Project['id'];
sourcePackageRegistries?: ReturnType<typeof useSourcePackageRegistries>;
};

// Loads the component containing the documentation for the specified platform
Expand All @@ -35,8 +33,6 @@ export function SdkDocumentation({
organization,
projectId,
}: SdkDocumentationProps) {
const sourcePackageRegistries = useSourcePackageRegistries();

const [module, setModule] = useState<null | {
default: React.ComponentType<ModuleProps>;
}>(null);
Expand Down Expand Up @@ -99,7 +95,6 @@ export function SdkDocumentation({
}

const {default: GettingStartedDoc} = module;

return (
<GettingStartedDoc
dsn={projectKeys[0].dsn.public}
Expand All @@ -108,7 +103,6 @@ export function SdkDocumentation({
platformKey={platform?.id}
organization={organization}
projectId={projectId}
sourcePackageRegistries={sourcePackageRegistries}
/>
);
}
7 changes: 0 additions & 7 deletions static/app/components/onboarding/gettingStartedDoc/step.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ type ConfigurationType = {
* A callback to be invoked when the configuration is selected and copied to the clipboard
*/
onSelectAndCopy?: () => void;
/**
* Whether or not the configuration or parts of it are currently being loaded
*/
partialLoading?: boolean;
};

interface BaseStepProps {
Expand Down Expand Up @@ -83,7 +79,6 @@ function getConfiguration({
additionalInfo,
onCopy,
onSelectAndCopy,
partialLoading,
}: ConfigurationType) {
return (
<Configuration>
Expand All @@ -94,8 +89,6 @@ function getConfiguration({
language={language}
onCopy={onCopy}
onSelectAndCopy={onSelectAndCopy}
hideCopyButton={partialLoading}
disableUserSelection={partialLoading}
>
{language === 'javascript'
? beautify.js(code, {indent_size: 2, e4x: true})
Expand Down

This file was deleted.

29 changes: 6 additions & 23 deletions static/app/gettingStartedDocs/android/android.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import {t, tct} from 'sentry/locale';
// Configuration Start
export const steps = ({
dsn,
sourcePackageRegistries,
}: Partial<
Pick<ModuleProps, 'dsn' | 'sourcePackageRegistries'>
> = {}): LayoutProps['steps'] => [
}: {
dsn?: string;
} = {}): LayoutProps['steps'] => [
{
type: StepType.INSTALL,
description: (
Expand All @@ -29,16 +28,10 @@ export const steps = ({
configurations: [
{
language: 'groovy',
partialLoading: sourcePackageRegistries?.isLoading,
code: `
plugins {
id "com.android.application" // should be in the same module
id "io.sentry.android.gradle" version "${
sourcePackageRegistries?.isLoading
? t('\u2026loading')
: sourcePackageRegistries?.data?.['sentry.java.android.gradle-plugin']?.version ??
'3.12.0'
}"
id "io.sentry.android.gradle" version "3.12.0"
}
`,
},
Expand Down Expand Up @@ -146,18 +139,8 @@ export const nextSteps = [
];
// Configuration End

export function GettingStartedWithAndroid({
dsn,
sourcePackageRegistries,
...props
}: ModuleProps) {
return (
<Layout
steps={steps({dsn, sourcePackageRegistries})}
nextSteps={nextSteps}
{...props}
/>
);
export function GettingStartedWithAndroid({dsn, ...props}: ModuleProps) {
return <Layout steps={steps({dsn})} nextSteps={nextSteps} {...props} />;
}

export default GettingStartedWithAndroid;
28 changes: 6 additions & 22 deletions static/app/gettingStartedDocs/apple/apple-ios.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import {t, tct} from 'sentry/locale';
// Configuration Start
export const steps = ({
dsn,
sourcePackageRegistries,
}: Partial<
Pick<ModuleProps, 'dsn' | 'sourcePackageRegistries'>
> = {}): LayoutProps['steps'] => [
}: {
dsn?: string;
} = {}): LayoutProps['steps'] => [
{
type: StepType.INSTALL,
description: (
Expand Down Expand Up @@ -45,13 +44,8 @@ https://github.com/getsentry/sentry-cocoa.git
</p>
),
language: 'swift',
partialLoading: sourcePackageRegistries?.isLoading,
code: `
.package(url: "https://github.com/getsentry/sentry-cocoa", from: "${
sourcePackageRegistries?.isLoading
? t('\u2026loading')
: sourcePackageRegistries?.data?.['sentry.cocoa']?.version ?? '8.9.3'
}"),
.package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.9.3"),
`,
},
],
Expand Down Expand Up @@ -237,18 +231,8 @@ export const nextSteps = [
];
// Configuration End

export function GettingStartedWithIos({
dsn,
sourcePackageRegistries,
...props
}: ModuleProps) {
return (
<Layout
steps={steps({dsn, sourcePackageRegistries})}
nextSteps={nextSteps}
{...props}
/>
);
export function GettingStartedWithIos({dsn, ...props}: ModuleProps) {
return <Layout steps={steps({dsn})} nextSteps={nextSteps} {...props} />;
}

export default GettingStartedWithIos;
28 changes: 6 additions & 22 deletions static/app/gettingStartedDocs/apple/apple-macos.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import {t, tct} from 'sentry/locale';
// Configuration Start
export const steps = ({
dsn,
sourcePackageRegistries,
}: Partial<
Pick<ModuleProps, 'dsn' | 'sourcePackageRegistries'>
> = {}): LayoutProps['steps'] => [
}: {
dsn?: string;
} = {}): LayoutProps['steps'] => [
{
type: StepType.INSTALL,
description: (
Expand Down Expand Up @@ -45,13 +44,8 @@ https://github.com/getsentry/sentry-cocoa.git
</p>
),
language: 'swift',
partialLoading: sourcePackageRegistries?.isLoading,
code: `
.package(url: "https://github.com/getsentry/sentry-cocoa", from: "${
sourcePackageRegistries?.isLoading
? t('\u2026loading')
: sourcePackageRegistries?.data?.['sentry.cocoa']?.version ?? '8.9.3'
}"),
.package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.9.3"),
`,
},
],
Expand Down Expand Up @@ -189,18 +183,8 @@ export const nextSteps = [
];
// Configuration End

export function GettingStartedWithMacos({
dsn,
sourcePackageRegistries,
...props
}: ModuleProps) {
return (
<Layout
steps={steps({dsn, sourcePackageRegistries})}
nextSteps={nextSteps}
{...props}
/>
);
export function GettingStartedWithMacos({dsn, ...props}: ModuleProps) {
return <Layout steps={steps({dsn})} nextSteps={nextSteps} {...props} />;
}

export default GettingStartedWithMacos;
28 changes: 6 additions & 22 deletions static/app/gettingStartedDocs/apple/apple.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import {t, tct} from 'sentry/locale';
// Configuration Start
export const steps = ({
dsn,
sourcePackageRegistries,
}: Partial<
Pick<ModuleProps, 'dsn' | 'sourcePackageRegistries'>
> = {}): LayoutProps['steps'] => [
}: {
dsn?: string;
} = {}): LayoutProps['steps'] => [
{
type: StepType.INSTALL,
description: (
Expand Down Expand Up @@ -45,13 +44,8 @@ https://github.com/getsentry/sentry-cocoa.git
</p>
),
language: 'swift',
partialLoading: sourcePackageRegistries?.isLoading,
code: `
.package(url: "https://github.com/getsentry/sentry-cocoa", from: "${
sourcePackageRegistries?.isLoading
? t('\u2026loading')
: sourcePackageRegistries?.data?.['sentry.cocoa']?.version ?? '8.9.3'
}"),
.package(url: "https://github.com/getsentry/sentry-cocoa", from: "8.9.3"),
`,
},
],
Expand Down Expand Up @@ -189,18 +183,8 @@ export const nextSteps = [
];
// Configuration End

export function GettingStartedWithApple({
dsn,
sourcePackageRegistries,
...props
}: ModuleProps) {
return (
<Layout
steps={steps({dsn, sourcePackageRegistries})}
nextSteps={nextSteps}
{...props}
/>
);
export function GettingStartedWithApple({dsn, ...props}: ModuleProps) {
return <Layout steps={steps({dsn})} nextSteps={nextSteps} {...props} />;
}

export default GettingStartedWithApple;
4 changes: 3 additions & 1 deletion static/app/gettingStartedDocs/capacitor/capacitor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import {t, tct} from 'sentry/locale';
// Configuration Start
export const steps = ({
dsn,
}: Partial<Pick<ModuleProps, 'dsn'>> = {}): LayoutProps['steps'] => [
}: {
dsn?: string;
} = {}): LayoutProps['steps'] => [
{
type: StepType.INSTALL,
description: t(
Expand Down
4 changes: 3 additions & 1 deletion static/app/gettingStartedDocs/cordova/cordova.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ import {t, tct} from 'sentry/locale';
// Configuration Start
export const steps = ({
dsn,
}: Partial<Pick<ModuleProps, 'dsn'>> = {}): LayoutProps['steps'] => [
}: {
dsn?: string;
} = {}): LayoutProps['steps'] => [
{
type: StepType.INSTALL,
description: t('Install our SDK using the cordova command:'),
Expand Down
22 changes: 6 additions & 16 deletions static/app/gettingStartedDocs/dart/dart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@ import {t, tct} from 'sentry/locale';
// Configuration Start
export const steps = ({
dsn,
sourcePackageRegistries,
}: Partial<
Pick<ModuleProps, 'dsn' | 'sourcePackageRegistries'>
> = {}): LayoutProps['steps'] => [
}: {
dsn?: string;
} = {}): LayoutProps['steps'] => [
{
type: StepType.INSTALL,
description: (
Expand All @@ -26,14 +25,9 @@ export const steps = ({
configurations: [
{
language: 'yml',
partialLoading: sourcePackageRegistries?.isLoading,
code: `
dependencies:
sentry: ^${
sourcePackageRegistries?.isLoading
? t('\u2026loading')
: sourcePackageRegistries?.data?.['sentry.dart']?.version ?? '7.8.0'
}
sentry: ^7.8.0
`,
},
],
Expand Down Expand Up @@ -168,12 +162,8 @@ Future<void> processOrderBatch(ISentrySpan span) async {
];
// Configuration End

export function GettingStartedWithDart({
dsn,
sourcePackageRegistries,
...props
}: ModuleProps) {
return <Layout steps={steps({dsn, sourcePackageRegistries})} {...props} />;
export function GettingStartedWithDart({dsn, ...props}: ModuleProps) {
return <Layout steps={steps({dsn})} {...props} />;
}

export default GettingStartedWithDart;
Loading

0 comments on commit 0f1c8ff

Please sign in to comment.