feat(website): add dev preview banner and REPL nav link#2312
Conversation
Add a Banner component to the website indicating this is a dev preview site, with a link to lynxjs.org for the official docs (in both EN/ZH). Also add a REPL entry to the top navigation bar.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a top-level "REPL" navigation item and introduces a new Layout component that wraps the basic site layout with a bilingual beforeNav banner; the Layout is exported from the theme public API. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Pull request overview
This PR adds two UI enhancements to the website: a dev preview banner at the top indicating this is a pre-release site (linking to the official docs at lynxjs.org), and a "REPL" entry in the top navigation bar.
Changes:
- Adds a
Layout.tsxtheme component that wraps the base rspress layout with a bilingual (EN/ZH) dev-previewBanner. - Exports the new
Layoutcomponent from the theme's entry point (index.tsx). - Adds a "REPL" nav item linking to
/replinrspress.config.ts.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
website/theme/Layout.tsx |
New custom Layout component wrapping rspress's base Layout with a bilingual dev-preview Banner |
website/theme/index.tsx |
Exports the new Layout component so rspress can pick it up as the theme layout |
website/rspress.config.ts |
Adds a "REPL" nav entry pointing to /repl |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@website/theme/Layout.tsx`:
- Around line 16-18: The English copy in the Layout component's message prop
uses the incorrect noun "Checkout"; update the string used when lang === 'en' to
use the phrasal verb "Check out" (i.e., change "This is the dev preview website.
Checkout the document at lynxjs.org" to "This is the dev preview website. Check
out the document at lynxjs.org") so the message text in the message prop is
grammatically correct.
- Around line 8-22: The Layout component currently ignores framework props and
contains a typo in the English message; update the Layout function signature to
accept incoming props (e.g., props or layoutProps) and forward them to
BasicLayout via spread (pass {...props}) so routing/page data and internal
wiring work, and fix the English copy in the Banner message from "Checkout the
document at lynxjs.org" to a correct phrase such as "Check out the documentation
at lynxjs.org"; references: Layout, BasicLayout, Banner, useLang.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 2d5751a1-fec4-420d-a9b5-a28c0653f5ea
📒 Files selected for processing (3)
website/rspress.config.tswebsite/theme/Layout.tsxwebsite/theme/index.tsx
Merging this PR will degrade performance by 6.2%
Performance Changes
Comparing Footnotes
|
Web Explorer#8019 Bundle Size — 384.5KiB (0%).b206a4a(current) vs 0d41253 main#8009(baseline) Bundle metrics
Bundle size by type
|
| Current #8019 |
Baseline #8009 |
|
|---|---|---|
253.55KiB |
253.55KiB |
|
95.85KiB |
95.85KiB |
|
35.1KiB |
35.1KiB |
Bundle analysis report Branch Huxpro/add-dev-banner Project dashboard
Generated by RelativeCI Documentation Report issue
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Xuan Huang (黄玄) <5563315+Huxpro@users.noreply.github.com>
Summary
/replTest plan
Summary by CodeRabbit