-
-
Notifications
You must be signed in to change notification settings - Fork 199
docs: add components #2891
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: add components #2891
Conversation
✅ Deploy Preview for rspress-v2 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this 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
tagfrom required to optional, but the component doesn't handle the case whentagis undefined or an empty string. Whentagis 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.
packages/core/src/theme/components/DocContent/docComponents/title.tsx
Outdated
Show resolved
Hide resolved
Rsdoctor Bundle Diff Analysis📊 Quick Summary (Click to expand)
📁 webPath:
📦 Download Diff Report: web Bundle Diff Generated by Rsdoctor GitHub Action |
4ab8034 to
5f5d527
Compare
There was a problem hiding this 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.
|
@copilot open a new pull request to apply changes based on the comments in this thread |
Co-authored-by: copilot-swe-agent[bot] <[email protected]> Co-authored-by: SoonIter <[email protected]>
|
|
Summary
docs: add components
Related Issue
Checklist