fix(theme/Sidebar): add rp-doc class to inline-code sidebar titles - #3372
Conversation
Agent-Logs-Url: https://github.com/web-infra-dev/rspress/sessions/2c2f62cd-ba2a-4742-a505-b73ecb8c8bb8 Co-authored-by: SoonIter <79413249+SoonIter@users.noreply.github.com>
Agent-Logs-Url: https://github.com/web-infra-dev/rspress/sessions/2c2f62cd-ba2a-4742-a505-b73ecb8c8bb8 Co-authored-by: SoonIter <79413249+SoonIter@users.noreply.github.com>
Deploying rspress-v2 with
|
| 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 |
Rsdoctor Bundle Diff AnalysisFound 3 projects in monorepo, 2 projects with changes. 📊 Quick Summary
📋 Detailed Reports (Click to expand)📁 nodePath:
📦 Download Diff Report: node Bundle Diff 📁 webPath:
📦 Download Diff Report: web Bundle Diff Generated by Rsdoctor GitHub Action |
There was a problem hiding this comment.
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-docclass to the sidebar item title<span>that receivesrenderInlineMarkdown(...). - Extend the inline-markdown Playwright E2E test to assert the
<code>title is inside aspan.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.
Summary
rp-docclass to sidebar title spans so inline-code titles keep the same document typography stylesrp-dochookRelated Issue
Checklist