-
-
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.
feat(onboarding): Generic copy DSN (#83088)
Move the "copy DSN" section into manual configuration. Add it to every platform doc that instructs to use the wizard. Closes #80179
- Loading branch information
1 parent
6bce634
commit 23036d1
Showing
6 changed files
with
106 additions
and
89 deletions.
There are no files selected for viewing
40 changes: 40 additions & 0 deletions
40
static/app/components/onboarding/gettingStartedDoc/copyDsnField.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,40 @@ | ||
import styled from '@emotion/styled'; | ||
|
||
import type {DocsParams} from 'sentry/components/onboarding/gettingStartedDoc/types'; | ||
import TextCopyInput from 'sentry/components/textCopyInput'; | ||
import {tct} from 'sentry/locale'; | ||
import {space} from 'sentry/styles/space'; | ||
import {trackAnalytics} from 'sentry/utils/analytics'; | ||
|
||
export function CopyDsnField({params}: {params: DocsParams<any>}) { | ||
return ( | ||
<Wrapper> | ||
<p> | ||
{tct( | ||
"If you already have the configuration for Sentry in your application, and just need this project's ([projectSlug]) DSN, you can find it below:", | ||
{ | ||
projectSlug: <code>{params.projectSlug}</code>, | ||
} | ||
)} | ||
</p> | ||
<TextCopyInput | ||
onCopy={() => | ||
trackAnalytics('onboarding.dsn-copied', { | ||
organization: params.organization, | ||
platform: params.platformKey, | ||
}) | ||
} | ||
> | ||
{params.dsn.public} | ||
</TextCopyInput> | ||
</Wrapper> | ||
); | ||
} | ||
|
||
const Wrapper = styled('div')` | ||
padding-top: ${space(2)}; | ||
border-top: 1px solid ${p => p.theme.border}; | ||
display: flex; | ||
flex-direction: column; | ||
gap: ${space(1)}; | ||
`; |
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
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
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
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
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