|
@@ -1,4 +1,4 @@
|
|
-import {Fragment, useMemo} from 'react';
|
|
|
|
|
|
+import {Fragment, useMemo, useState} from 'react';
|
|
import styled from '@emotion/styled';
|
|
import styled from '@emotion/styled';
|
|
|
|
|
|
import HookOrDefault from 'sentry/components/hookOrDefault';
|
|
import HookOrDefault from 'sentry/components/hookOrDefault';
|
|
@@ -6,6 +6,7 @@ import ExternalLink from 'sentry/components/links/externalLink';
|
|
import List from 'sentry/components/list';
|
|
import List from 'sentry/components/list';
|
|
import ListItem from 'sentry/components/list/listItem';
|
|
import ListItem from 'sentry/components/list/listItem';
|
|
import {AuthTokenGeneratorProvider} from 'sentry/components/onboarding/gettingStartedDoc/authTokenGenerator';
|
|
import {AuthTokenGeneratorProvider} from 'sentry/components/onboarding/gettingStartedDoc/authTokenGenerator';
|
|
|
|
+import ReplayConfigToggle from 'sentry/components/onboarding/gettingStartedDoc/replayConfigToggle';
|
|
import {Step} from 'sentry/components/onboarding/gettingStartedDoc/step';
|
|
import {Step} from 'sentry/components/onboarding/gettingStartedDoc/step';
|
|
import {
|
|
import {
|
|
ConfigType,
|
|
ConfigType,
|
|
@@ -60,6 +61,8 @@ export function OnboardingLayout({
|
|
const {isLoading: isLoadingRegistry, data: registryData} =
|
|
const {isLoading: isLoadingRegistry, data: registryData} =
|
|
useSourcePackageRegistries(organization);
|
|
useSourcePackageRegistries(organization);
|
|
const selectedOptions = useUrlPlatformOptions(docsConfig.platformOptions);
|
|
const selectedOptions = useUrlPlatformOptions(docsConfig.platformOptions);
|
|
|
|
+ const [mask, setMask] = useState(true);
|
|
|
|
+ const [block, setBlock] = useState(true);
|
|
|
|
|
|
const {platformOptions} = docsConfig;
|
|
const {platformOptions} = docsConfig;
|
|
|
|
|
|
@@ -84,6 +87,8 @@ export function OnboardingLayout({
|
|
},
|
|
},
|
|
platformOptions: selectedOptions,
|
|
platformOptions: selectedOptions,
|
|
newOrg,
|
|
newOrg,
|
|
|
|
+ mask,
|
|
|
|
+ block,
|
|
};
|
|
};
|
|
|
|
|
|
return {
|
|
return {
|
|
@@ -109,6 +114,8 @@ export function OnboardingLayout({
|
|
registryData,
|
|
registryData,
|
|
selectedOptions,
|
|
selectedOptions,
|
|
configType,
|
|
configType,
|
|
|
|
+ mask,
|
|
|
|
+ block,
|
|
]);
|
|
]);
|
|
|
|
|
|
return (
|
|
return (
|
|
@@ -131,9 +138,36 @@ export function OnboardingLayout({
|
|
</Header>
|
|
</Header>
|
|
<Divider withBottomMargin />
|
|
<Divider withBottomMargin />
|
|
<Steps>
|
|
<Steps>
|
|
- {steps.map(step => (
|
|
|
|
- <Step key={step.title ?? step.type} {...step} />
|
|
|
|
- ))}
|
|
|
|
|
|
+ {steps.map(step =>
|
|
|
|
+ step.isOptional && step.isReplayConfigStep ? (
|
|
|
|
+ <Step
|
|
|
|
+ key={step.title ?? step.type}
|
|
|
|
+ {...{
|
|
|
|
+ ...step,
|
|
|
|
+ additionalInfo: (
|
|
|
|
+ <ReplayConfigToggle
|
|
|
|
+ blockToggle={block}
|
|
|
|
+ maskToggle={mask}
|
|
|
|
+ onBlockToggle={() => setBlock(!block)}
|
|
|
|
+ onMaskToggle={() => setMask(!mask)}
|
|
|
|
+ />
|
|
|
|
+ ),
|
|
|
|
+ }}
|
|
|
|
+ />
|
|
|
|
+ ) : (
|
|
|
|
+ <Fragment key={step.title ?? step.type}>
|
|
|
|
+ <Step key={step.title ?? step.type} {...step} />
|
|
|
|
+ {step.isReplayConfigStep ? (
|
|
|
|
+ <ReplayConfigToggle
|
|
|
|
+ blockToggle={block}
|
|
|
|
+ maskToggle={mask}
|
|
|
|
+ onBlockToggle={() => setBlock(!block)}
|
|
|
|
+ onMaskToggle={() => setMask(!mask)}
|
|
|
|
+ />
|
|
|
|
+ ) : null}
|
|
|
|
+ </Fragment>
|
|
|
|
+ )
|
|
|
|
+ )}
|
|
</Steps>
|
|
</Steps>
|
|
{nextSteps.length > 0 && (
|
|
{nextSteps.length > 0 && (
|
|
<Fragment>
|
|
<Fragment>
|