Skip to content

Conversation

SoonIter
Copy link
Member

Summary

feat(theme)!: add CodeBlock / CodeButtonGroup components

className change

  • migrate rp-toc rp-doc-outline to rp-toc-include

Related Issue

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@Copilot Copilot AI review requested due to automatic review settings October 15, 2025 08:06
Copy link

netlify bot commented Oct 15, 2025

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit 54485a4
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/68ef6579bdc2b200081adc4b
😎 Deploy Preview https://deploy-preview-2656--rspress-v2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces new CodeBlock and CodeButtonGroup components while migrating CSS class names from rp-toc and rp-doc-outline to rp-toc-include and updating code block styling to use rp-codeblock class structure.

  • Adds new standalone CodeBlock and CodeButtonGroup components with improved architecture
  • Migrates CSS class names for better consistency (rp-tocrp-toc-include, language-specific classes → rp-codeblock)
  • Refactors code block structure to use new component system with updated styling approach

Reviewed Changes

Copilot reviewed 29 out of 39 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/theme-default/src/components/CodeBlock/index.tsx New CodeBlock component providing styling wrapper for Shiki-generated code
packages/theme-default/src/components/CodeButtonGroup/index.tsx Refactored CodeButtonGroup with updated hook and ref handling
packages/theme-default/src/components/DocContent/docComponents/pre.tsx New ShikiPre component replacing old pre component structure
packages/theme-default/src/components/DocContent/docComponents/title.tsx Updated heading components to use rp-toc-include class with clsx
packages/theme-default/src/styles/shiki.scss Updated CSS selectors to use new .shiki class structure
packages/core/src/node/mdx/rehypePlugins/transformers/add-lang.ts New transformer to add lang property to pre elements
e2e/fixtures/**/*.test.ts Updated test selectors to match new CSS class names
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@SoonIter SoonIter changed the title feat(theme)!: add CodeBlock / CodeButtonGroup components feat(theme)!: add CodeBlock / CodeButtonGroup components and migrate .rp-doc-outline to rp-toc-include Oct 15, 2025
@SoonIter SoonIter requested a review from Timeless0911 October 15, 2025 11:46
@SoonIter SoonIter merged commit 155c83e into main Oct 15, 2025
8 checks passed
@SoonIter SoonIter deleted the syt/dom-structure-adjust branch October 15, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants