-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ref: use new onboarding component (#75345)
Uses the new onboarding component that does not fetch onboarding from the docs.
- Loading branch information
Showing
15 changed files
with
292 additions
and
306 deletions.
There are no files selected for viewing
63 changes: 63 additions & 0 deletions
63
static/app/components/onboarding/gettingStartedDoc/utils/profilingOnboarding.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
import type React from 'react'; | ||
import {Fragment} from 'react'; | ||
|
||
import { | ||
type StepProps, | ||
TabbedCodeSnippet, | ||
} from 'sentry/components/onboarding/gettingStartedDoc/step'; | ||
import type {DocsParams} from 'sentry/components/onboarding/gettingStartedDoc/types'; | ||
import {t, tct} from 'sentry/locale'; | ||
|
||
export function getProfilingDocumentHeaderConfigurationStep(): StepProps { | ||
return { | ||
title: 'Add Document-Policy: js-profiling header', | ||
description: ( | ||
<Fragment> | ||
<p> | ||
{tct( | ||
`For the JavaScript browser profiler to start, the document response header needs | ||
to include a Document-Policy header key with the js-profiling value. How you do | ||
this will depend on how your assets are served. | ||
If you're using a server like Express, you'll be able to use the response.set function to set the header value. | ||
`, | ||
{} | ||
)} | ||
</p> | ||
<TabbedCodeSnippet | ||
tabs={[ | ||
{ | ||
code: `response.set('Document-Policy', 'js-profiling')`, | ||
language: 'javascript', | ||
value: 'javascript', | ||
label: 'Express', | ||
}, | ||
]} | ||
/> | ||
</Fragment> | ||
), | ||
}; | ||
} | ||
|
||
export function MaybeBrowserProfilingBetaWarning( | ||
props: DocsParams<any> | ||
): React.ReactElement | null { | ||
if (!props.isProfilingSelected) { | ||
return null; | ||
} | ||
|
||
return ( | ||
<p> | ||
{tct( | ||
`Browser profiling is currently in Beta as we wait for the JS Self Profiling spec to gain wider support. You can read the detailed explanation [explainer].`, | ||
{ | ||
explainer: ( | ||
<a href="https://docs.sentry.io/platforms/javascript/profiling/"> | ||
{t('here')} | ||
</a> | ||
), | ||
} | ||
)} | ||
</p> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
118 changes: 0 additions & 118 deletions
118
static/app/components/profiling/ProfilingOnboarding/util.ts
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.