Skip to content

Conversation

jasonyuezhang
Copy link
Owner

Follow-up to getsentry#100646, which added a new InlineCode component to core.

This PR renames the existing CodeSnippet component to CodeBlock and brings it into core. It also colocates it with InlineCode.


Copied from getsentry#101052
Original PR: getsentry#101052

Copy link

cursor bot commented Oct 7, 2025

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on November 12.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

Copy link

Move CodeBlock Component into Core and Rename from CodeSnippet

This PR migrates the existing CodeSnippet component to the core component library as CodeBlock, colocating it with the previously introduced InlineCode component. The update includes renaming all imports and usages of CodeSnippet throughout the application and documentation to CodeBlock. The PR removes the old CodeSnippet file, refactors all relevant component stories, MDX docs, and usages to reference the new core/code location, and expands documentation with improved related component sections and accessibility references. It also updates InlineCode to live under the core/code folder and updates its MDX documentation accordingly.

Key Changes

• Renamed CodeSnippet to CodeBlock and moved it to static/app/components/core/code/codeBlock.tsx
• Updated all imports and usages of CodeSnippet to CodeBlock in component files, stories, tests, and onboarding/orchestration docs
• Colocated InlineCode with CodeBlock under core/code and updated its documentation and examples
• Refactored relevant MDX documentation to reference new components and adjust related links
• Removed the outdated static/app/components/codeSnippet and related type imports
• Adjusted internal component index exports and MDX stories to use the new organization

Affected Areas

static/app/components/core/code/codeBlock.tsx
static/app/components/core/code/inlineCode.tsx
• Component, documentation, and story imports for code snippets
• All usage sites across docs (mdx), stories (.stories.tsx), and Sentry UI components that displayed multi-line code blocks

This summary was automatically generated by @propel-code-bot

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants