Skip to content

Conversation

@wuyiping0628
Copy link
Collaborator

@wuyiping0628 wuyiping0628 commented Feb 4, 2026

Summary by CodeRabbit

  • New Features
    • Added Tiny Editor as a new product section with full documentation (Guide, Demo, API, Modules) and a dedicated product tab that becomes active when browsing Tiny Editor content.
  • Documentation
    • Centralized sidebar and routing for Tiny Editor docs to ensure consistent navigation across sections.
  • Style
    • Updated header layout: wider product navigation and replaced the central search with a theme-toggle control.
  • Chores
    • Added Tiny Editor as a repository submodule.

@wuyiping0628 wuyiping0628 added the enhancement New feature or request label Feb 4, 2026
@coderabbitai
Copy link

coderabbitai bot commented Feb 4, 2026

Warning

Rate limit exceeded

@wuyiping0628 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 15 minutes and 39 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Walkthrough

Adds Tiny Editor as a Git submodule and integrates its docs into the site: VitePress sidebar and rewrite routes for guide/demo/api/modules, a new product tab in the header, and a nav-tab class and path mapping for /tiny-editor/.

Changes

Cohort / File(s) Summary
Submodule Integration
\.gitmodules, tiny-editor
Added tiny-editor Git submodule entry in .gitmodules and a submodule commit reference for the tiny-editor directory.
VitePress Documentation Routing
\.vitepress/config.mts
Introduced TinyEditorSidebar, wired /tiny-editor/guide/, /tiny-editor/demo/, /tiny-editor/api/, /tiny-editor/modules/ into themeConfig.sidebar, and added rewrite mappings routing internal tiny-editor doc paths to those public bases.
Header Navigation
\.vitepress/theme/components/CustomHeader.vue
Increased tab navigation width, removed central search UI in tools in favor of a theme toggle, added a TinyEditor product tab (key/link/src), and extended route watcher/product-route detection to include Tiny Editor paths.
Navigation Configuration
\.vitepress/theme/entity/nav-tab.ts
Added TinyEditorNavTab class extending NavTab, registered it in navTabClassMap, and added '/tiny-editor/' to navPathMap.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Poem

🐰 I nibbled a branch and planted a slide,
Tiny docs unfurled, a new tab opened wide.
Sidebars aligned, routes hop in tune,
A tiny editor hums beneath the moon —
Come play, little keys, and type till June. ✨

🚥 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 PR title 'feat: add tiny-editor submodule' accurately summarizes the primary change: adding a new Git submodule for tiny-editor, which is reflected in changes to .gitmodules and related configuration files.
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 unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch wyp/add-tiny-editor-0127

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

@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

🤖 Fix all issues with AI agents
In @.vitepress/theme/components/CustomHeader.vue:
- Around line 344-354: productPathMap currently uses generic segments which
cause false matches; update the arrays in productPathMap (referencing the
productPathMap constant) so each product uses product-prefixed paths (e.g.
change "tiny-robot" entries to "/tiny-robot/components/" and
"/tiny-robot/tools/" and "tiny-editor" entries to "/tiny-editor/demo/",
"/tiny-editor/api/", "/tiny-editor/modules/"); keep the same downstream logic
that builds segments, uses isProductRoute (the segments.some(...) check against
route.path) and assigns activeNavTab so behavior remains the same but matching
is unambiguous.
- Around line 473-480: The TinyEditor tab object (key "tiny-editor") uses the
wrong asset name in the src expression: change the filename fragment from
"tiny-engine" to "tiny-editor" inside the src template string that references
activeProductTab.value, so it builds URLs like logo-active-tiny-editor.svg and
logo-normal-tiny-editor.svg; also ensure the corresponding files
(logo-active-tiny-editor.svg and logo-normal-tiny-editor.svg) are added under
public/images/ before deploying the change so the new src paths resolve
correctly.
🧹 Nitpick comments (2)
.vitepress/theme/entity/nav-tab.ts (1)

117-117: Minor: Extra blank line before export.

There's an extra blank line before the export statement that differs from the existing code style.

🧹 Suggested cleanup
-
-
 export { NavTabFactory }
.vitepress/theme/components/CustomHeader.vue (1)

508-510: Minor: Formatting inconsistency.

Missing space between } and else on line 510.

🧹 Suggested fix
     } else if (path.includes("/tiny-editor/")) {
       activeProductTab.value = "tiny-editor";
-    }else {
+    } else {
       activeProductTab.value = "";
     }

Copy link

@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

🤖 Fix all issues with AI agents
In @.vitepress/theme/components/CustomHeader.vue:
- Line 34: The search button's title is incorrect: update the button that calls
openSearch (the element with `@click`="openSearch") to use an appropriate title
like "Open search" or "Search" instead of "Toggle theme" so screen readers and
tooltips reflect its action; locate the button in CustomHeader.vue that binds
`@click`="openSearch" and replace the title attribute accordingly.
- Around line 489-491: The else branch after the path check has inconsistent
spacing ("}else {"); update the conditional formatting in the CustomHeader.vue
fragment so it matches the file style by changing the token sequence to "} else
{" where the code checks path.includes("/tiny-editor/") and sets
activeProductTab.value = "tiny-editor". Ensure only the spacing is changed and
no logic is modified.

@kagol kagol merged commit 372df3d into dev Feb 9, 2026
1 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants