Skip to content

feat(website): add dev preview banner and REPL nav link#2312

Merged
Huxpro merged 3 commits into
mainfrom
Huxpro/add-dev-banner
Mar 6, 2026
Merged

feat(website): add dev preview banner and REPL nav link#2312
Huxpro merged 3 commits into
mainfrom
Huxpro/add-dev-banner

Conversation

@Huxpro
Copy link
Copy Markdown
Collaborator

@Huxpro Huxpro commented Mar 6, 2026

Summary

  • Add a Banner at the top of the website indicating this is the dev preview site, linking to https://lynxjs.org for official docs (dual language EN/ZH)
  • Add a "REPL" entry to the top navigation bar pointing to /repl

Test plan

  • Verify the banner displays correctly on the website in both EN and ZH locales
  • Verify clicking the banner navigates to https://lynxjs.org
  • Verify the REPL nav link appears and navigates to /repl

Summary by CodeRabbit

  • New Features
    • Added a "REPL" item to the top-level navigation menu.
    • Introduced a bilingual banner displayed before navigation with links to developer resources and official docs.

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.
Copilot AI review requested due to automatic review settings March 6, 2026 05:08
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 6, 2026

⚠️ No Changeset found

Latest commit: b206a4a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 6, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 56321248-b05a-474f-986f-e0555449d578

📥 Commits

Reviewing files that changed from the base of the PR and between 70c8a26 and b206a4a.

📒 Files selected for processing (1)
  • website/theme/Layout.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • website/theme/Layout.tsx

📝 Walkthrough

Walkthrough

Adds 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

Cohort / File(s) Summary
Navigation Configuration
website/rspress.config.ts
Added a new top-level navigation item "REPL" linking to /repl, positioned between "Guide" and "API".
Layout Component
website/theme/Layout.tsx
Added Layout component that composes BasicLayout and injects a Banner in beforeNav, using useLang to render English/Chinese banner copy with a link.
Module Exports
website/theme/index.tsx
Exported the new Layout from ./Layout.jsx, extending the theme public API alongside existing exports.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • colinaaa

Poem

🐰 I hopped into code with a curious peep,
Planted a REPL where the nav runs deep,
A banner in two tongues, polite and spry,
Linking docs and previews as passersby,
Cheers — a tiny rabbit's joyful leap!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main changes: adding a dev preview banner and REPL navigation link.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch Huxpro/add-dev-banner

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
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 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.tsx theme component that wraps the base rspress layout with a bilingual (EN/ZH) dev-preview Banner.
  • Exports the new Layout component from the theme's entry point (index.tsx).
  • Adds a "REPL" nav item linking to /repl in rspress.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.

Comment thread website/theme/Layout.tsx Outdated
Comment thread website/rspress.config.ts
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0d41253 and 70c8a26.

📒 Files selected for processing (3)
  • website/rspress.config.ts
  • website/theme/Layout.tsx
  • website/theme/index.tsx

Comment thread website/theme/Layout.tsx
Comment thread website/theme/Layout.tsx
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Mar 6, 2026

Merging this PR will degrade performance by 6.2%

⚡ 2 improved benchmarks
❌ 1 regressed benchmark
✅ 69 untouched benchmarks
⏩ 3 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
basic-performance-large-css 23.1 ms 16.1 ms +43.52%
basic-performance-nest-level-100 7.4 ms 6.9 ms +7.1%
basic-performance-text-200 17.9 ms 19.1 ms -6.2%

Comparing Huxpro/add-dev-banner (b206a4a) with main (c877fbd)2

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (0d41253) during the generation of this report, so c877fbd was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Mar 6, 2026

Web Explorer

#8019 Bundle Size — 384.5KiB (0%).

b206a4a(current) vs 0d41253 main#8009(baseline)

Bundle metrics  Change 1 change
                 Current
#8019
     Baseline
#8009
No change  Initial JS 155.59KiB 155.59KiB
No change  Initial CSS 35.1KiB 35.1KiB
Change  Cache Invalidation 0% 40.42%
No change  Chunks 8 8
No change  Assets 8 8
Change  Modules 239(+0.42%) 238
No change  Duplicate Modules 16 16
No change  Duplicate Code 2.98% 2.98%
No change  Packages 4 4
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#8019
     Baseline
#8009
No change  JS 253.55KiB 253.55KiB
No change  Other 95.85KiB 95.85KiB
No change  CSS 35.1KiB 35.1KiB

Bundle analysis reportBranch Huxpro/add-dev-bannerProject dashboard


Generated by RelativeCIDocumentationReport issue

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Xuan Huang (黄玄) <5563315+Huxpro@users.noreply.github.com>
@Huxpro Huxpro enabled auto-merge (squash) March 6, 2026 09:20
@Huxpro Huxpro merged commit 4daa4d9 into main Mar 6, 2026
43 of 44 checks passed
@Huxpro Huxpro deleted the Huxpro/add-dev-banner branch March 6, 2026 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants