Skip to content

Conversation

@SoonIter
Copy link
Member

Summary

docs: add components

Related Issue

Checklist

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

Copilot AI review requested due to automatic review settings December 15, 2025 03:01
@netlify
Copy link

netlify bot commented Dec 15, 2025

Deploy Preview for rspress-v2 ready!

Name Link
🔨 Latest commit 26cf26d
🔍 Latest deploy log https://app.netlify.com/projects/rspress-v2/deploys/694249ea7de78e00081ad2b9
😎 Deploy Preview https://deploy-preview-2891--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 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 adds comprehensive documentation for built-in and runtime components, reorganizes the component documentation structure, and introduces a new tag system to categorize components as "eject-only", "non-ejectable", or "ejectable".

Key changes include:

  • Added automatic tag rendering in H1 headings based on frontmatter metadata
  • Created new documentation pages for 20+ components including HomeHero, HomeFooter, DocFooter, Steps, Tabs, and runtime components (Head, NoSSR)
  • Introduced warning callouts for eject-only and non-ejectable components
  • Refactored OverviewGroup component location and exports
  • Added i18n support for component tag descriptions

Reviewed changes

Copilot reviewed 78 out of 81 changed files in this pull request and generated 13 comments.

Show a summary per file
File Description
website/theme/index.tsx Enhanced MyH1 component to automatically render tags from frontmatter and display warnings for eject-only/non-ejectable components
website/theme/components/Tag/index.tsx Added support for "eject-only" and "non-ejectable" tag types; made tag parameter optional
website/i18n.json Added Chinese and English translations for eject-only and non-ejectable component descriptions
website/docs/zh/ui/components/*.mdx Added comprehensive Chinese documentation for 15+ built-in components (Banner, Badge, Steps, Tabs, HomeHero, etc.)
website/docs/en/ui/components/*.mdx Added comprehensive English documentation for 15+ built-in components with matching content
website/docs//ui/runtime-components/.mdx Created new documentation section for runtime components (Head, NoSSR) in both languages
website/docs/*/ui/_meta.json Added "Runtime components" section to UI documentation navigation
website/docs/*/ui/hooks/_meta.json Deleted hardcoded _meta.json files to allow automatic ordering
website/docs/*/ui/components/_meta.json Deleted hardcoded component ordering files
website/docs//plugin/official-plugins/.mdx Removed documentation for deprecated plugins (medium-zoom, last-updated)
website/docs/*/ui/vars.mdx Updated theme import from '@rspress/core/theme' to '@rspress/core/theme-original'
website/docs/*/guide/start/introduction.mdx Updated theme export examples to use '@rspress/core/theme-original'
packages/shared/src/types/index.ts Added optional tag field to FrontMatterMeta interface
packages/core/src/theme/layout/Layout/index.tsx Updated import to use useScrollReset from theme exports
packages/core/src/theme/index.ts Exported useScrollAfterNav and useScrollReset hooks; updated OverviewGroup import path
packages/core/src/theme/components/OverviewGroup/* Created new dedicated directory with OverviewGroup component, styles, and icon
packages/core/src/theme/components/LastUpdated/index.tsx Added logic to hide component when lastUpdated config is disabled
packages/core/src/theme/components/DocFooter/index.tsx Simplified by moving lastUpdated check into LastUpdated component
packages/core/src/theme/components/DocContent/index.tsx Added beforeDocContent and afterDocContent props; made FallbackTitle internal
packages/core/src/theme/components/Callout/index.tsx Added automatic title capitalization when title is not provided
packages/core/src/theme/components/Banner/index.tsx Improved conditional logic for setting height
packages/core/src/theme/components/Badge/index.scss Added white-space: nowrap to prevent badge text wrapping
packages/core/src/node/eject.ts Renamed 'Overview' to 'OverviewGroup' and added 'SourceCode' to ejectable components
Comments suppressed due to low confidence (1)

website/theme/components/Tag/index.tsx:16

  • The Tag component's type signature changes tag from required to optional, but the component doesn't handle the case when tag is undefined or an empty string. When tag is undefined/empty, none of the conditions will match and the component will render nothing. Consider adding an early return or default behavior to make this explicit.

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 16, 2025

Rsdoctor Bundle Diff Analysis

📊 Quick Summary (Click to expand)
Project Total Size Change
web 14.9 MB 📈 +334.7 KB (+2.2%)

📁 web

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

📌 Baseline Commit: 952a3b7197 | PR: #2897

Metric Current Baseline Change
📊 Total Size 14.9 MB 14.6 MB +334.7 KB (+2.2%)
📄 JavaScript 14.3 MB 14.0 MB +302.1 KB (+2.1%)
🎨 CSS 114.2 KB 113.7 KB 553.0 B (0.5%)
🌐 HTML 0 B 0 B N/A
📁 Other Assets 512.5 KB 480.4 KB +32.1 KB (+6.7%)

📦 Download Diff Report: web Bundle Diff

Generated by Rsdoctor GitHub Action

@SoonIter SoonIter requested review from Timeless0911 and removed request for Timeless0911 December 17, 2025 03:55
Timeless0911
Timeless0911 previously approved these changes Dec 17, 2025
Copy link
Contributor

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

Copilot reviewed 84 out of 86 changed files in this pull request and generated 13 comments.


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

@SoonIter
Copy link
Member Author

@copilot open a new pull request to apply changes based on the comments in this thread

Copy link
Contributor

Copilot AI commented Dec 17, 2025

@SoonIter I've opened a new pull request, #2900, to work on those changes. Once the pull request is ready, I'll request review from you.

Co-authored-by: copilot-swe-agent[bot] <[email protected]>
Co-authored-by: SoonIter <[email protected]>
@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.

✅ SoonIter
❌ Copilot
You have signed the CLA already but the status is still pending? Let us recheck it.

@SoonIter SoonIter marked this pull request as ready for review December 17, 2025 06:44
@SoonIter SoonIter merged commit a067d96 into main Dec 17, 2025
8 of 9 checks passed
@SoonIter SoonIter deleted the syt/docs-polish branch December 17, 2025 06:44
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