sentry icon indicating copy to clipboard operation
sentry copied to clipboard

feat(profiling): enhance onboarding codeblock

Open eliashussary opened this issue 2 years ago • 4 comments

This PR adds a CodeSnippet component for profile onboarding. The CodeSnippet aligns better to the one found in our docs and enables copy to clipboard functionality.

Note: swift syntax highlighting doesn't work, gotta investigate prism-sentry

https://user-images.githubusercontent.com/7349258/191118455-66e46c99-9016-4fa6-b654-659675d1c07d.mov

dark theme for ref: image

eliashussary avatar Sep 19 '22 21:09 eliashussary

size-limit report 📦

Path Size
src/sentry/static/sentry/dist/entrypoints/app.js 63.23 KB (+0.1% 🔺)
src/sentry/static/sentry/dist/entrypoints/sentry.css 69.2 KB (0%)

github-actions[bot] avatar Sep 19 '22 21:09 github-actions[bot]

@eliashussary we do have this component in storybook. https://storybook.sentry.dev/?path=/story/components-html-code--default

Doesn't give you the header ux you built, but thought I would share this if you want to expend this component.

Jesse-Box avatar Sep 20 '22 07:09 Jesse-Box

@eliashussary we do have this component in storybook. https://storybook.sentry.dev/?path=/story/components-html-code--default

Doesn't give you the header ux you built, but thought I would share this if you want to expend this component.

Yeah this is initially what I modeled it off but avoided making changes to it so i wasn't stuck refactoring a bunch of code we don't own. However, it looks like it is only being used in one other spot so I can get away with moving my changes here.

eliashussary avatar Sep 20 '22 12:09 eliashussary

This was built by the replay team.

Cc @ryan953

Jesse-Box avatar Sep 20 '22 13:09 Jesse-Box