Skip to content

fix(theme/Sidebar): add rp-doc class to inline-code sidebar titles - #3372

Merged
SoonIter merged 2 commits into
mainfrom
copilot/add-rp-doc-classname-to-span
May 15, 2026
Merged

fix(theme/Sidebar): add rp-doc class to inline-code sidebar titles#3372
SoonIter merged 2 commits into
mainfrom
copilot/add-rp-doc-classname-to-span

Conversation

Copilot AI commented May 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the rp-doc class to sidebar title spans so inline-code titles keep the same document typography styles
  • extend the inline-markdown E2E coverage to assert the sidebar code title keeps the rp-doc hook
image

Related Issue

  • N/A

Checklist

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

Copilot AI and others added 2 commits May 11, 2026 11:56
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented May 11, 2026

Copy link
Copy Markdown

Deploying rspress-v2 with  Cloudflare Pages  Cloudflare Pages

Latest commit: 7445fa8
Status: ✅  Deploy successful!
Preview URL: https://db78a626.rspress-v2.pages.dev
Branch Preview URL: https://copilot-add-rp-doc-classname.rspress-v2.pages.dev

View logs

@github-actions

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 3 projects in monorepo, 2 projects with changes.

📊 Quick Summary
Project Total Size Change
node 13.1 MB +88.0 KB (0.7%)
node_md 1.6 MB 0
web 16.5 MB +19.0 B (0.0%)
📋 Detailed Reports (Click to expand)

📁 node

Path: website/doc_build/diff-rsdoctor/node/rsdoctor-data.json

📌 Baseline Commit: 7509695cbb | PR: #3369

Metric Current Baseline Change
📊 Total Size 13.1 MB 13.0 MB +88.0 KB (0.7%)
📄 JavaScript 0 B 0 B 0
🎨 CSS 0 B 0 B 0
🌐 HTML 13.1 MB 13.0 MB +88.0 KB (0.7%)
📁 Other Assets 0 B 0 B 0

📦 Download Diff Report: node Bundle Diff

📁 web

Path: website/doc_build/diff-rsdoctor/web/rsdoctor-data.json

📌 Baseline Commit: 7509695cbb | PR: #3369

Metric Current Baseline Change
📊 Total Size 16.5 MB 16.5 MB +19.0 B (0.0%)
📄 JavaScript 16.2 MB 16.2 MB +19.0 B (0.0%)
🎨 CSS 137.2 KB 137.2 KB 0
🌐 HTML 0 B 0 B 0
📁 Other Assets 167.9 KB 167.9 KB 0

📦 Download Diff Report: web Bundle Diff

Generated by Rsdoctor GitHub Action

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 updates the theme sidebar item rendering so inline-markdown sidebar titles (notably inline code) retain the same document typography styling by adding the rp-doc class, and it strengthens the inline-markdown E2E test to assert the presence of that hook on an inline-code sidebar title.

Changes:

  • Add rp-doc class to the sidebar item title <span> that receives renderInlineMarkdown(...).
  • Extend the inline-markdown Playwright E2E test to assert the <code> title is inside a span.rp-doc.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/core/src/theme/components/Sidebar/SidebarItem.tsx Adds rp-doc class to sidebar item title span to preserve doc typography for inline markdown.
e2e/fixtures/inline-markdown/index.test.ts Adds an assertion ensuring inline-code sidebar titles are rendered under span.rp-doc.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/core/src/theme/components/Sidebar/SidebarItem.tsx
@SoonIter
SoonIter enabled auto-merge (squash) May 12, 2026 03:49
@SoonIter
SoonIter merged commit e7f32f5 into main May 15, 2026
12 checks passed
@SoonIter
SoonIter deleted the copilot/add-rp-doc-classname-to-span branch May 15, 2026 08:34
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.

4 participants