Skip to content

Conversation

@lichunn
Copy link
Contributor

@lichunn lichunn commented Oct 31, 2025

English | 简体中文

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • The commit message follows our Commit Message Guidelines
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)
  • Built its own designer, fully self-validated

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

Background and solution

What is the current behavior?

Issue Number: N/A

What is the new behavior?

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Summary by CodeRabbit

  • Documentation
    • Added comprehensive schema documentation for 13 TinyEngine UI components (button, input, select, checkbox, radio, switch, carousel, tabs, breadcrumb, icon, search, and more).
    • Added comprehensive schema documentation for 21 Harmony components, including buttons, forms, navigation, media elements, and layout components.
    • Each component document includes schema structure definitions and JSON usage examples for reference.

@coderabbitai
Copy link

coderabbitai bot commented Oct 31, 2025

Walkthrough

Adds 34 new documentation files describing component schemas for TinyEngine (13 files) and Harmony/HarmonyComponent UI frameworks (21 files). Each file defines component structure including componentName, props, children, and id fields, with JSON usage examples.

Changes

Cohort / File(s) Summary
TinyEngine Component Schema Documentation
documents/tinyengine/CanvasFlexBox.md, documents/tinyengine/breadcrumb.md, documents/tinyengine/button.md, documents/tinyengine/carousel.md, documents/tinyengine/checkbox.md, documents/tinyengine/h1.md, documents/tinyengine/icon.md, documents/tinyengine/input.md, documents/tinyengine/radio.md, documents/tinyengine/seacrh.md, documents/tinyengine/select.md, documents/tinyengine/switch.md, documents/tinyengine/tabs.md
13 new markdown documentation files documenting TinyVue component schemas, each describing componentName, props with configuration options, children arrays, and sample JSON usage examples.
Harmony Component Schema Documentation
documents/agent/Harmony*.md (21 files)
21 new markdown documentation files describing Harmony component schemas for HarmonyBlock, HarmonyButton, HarmonyCheckbox, HarmonyEditor, HarmonyForm, HarmonyImage, HarmonyInput, HarmonyLabel, HarmonyNavigator, HarmonyPicker, HarmonyProgress, HarmonyRadio, HarmonyScrollView, HarmonySlider, HarmonySwiper, HarmonySwitch, HarmonyTabBar, HarmonyText, HarmonyTextarea, HarmonyVideo, and HarmonyView, each with structural definitions and JSON schema examples.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

  • Verify consistency of schema structure across all 34 documentation files
  • Check JSON code examples for accuracy and valid syntax
  • Confirm component prop definitions and usage patterns align within each framework
  • Note: File documents/tinyengine/seacrh.md contains a potential typo in the filename (should be "search")

Poem

🐰 Thirty-four schemas, neat and tidy,
Documents dancing, component-guided,
Props and children, structures defined,
A rabbit approves—these docs refined! 📋

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 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 tinyvue knowledge base" is directly related to the changeset, which adds 39 new markdown documentation files describing component schemas across two feature areas: TinyEngine components (button, input, select, carousel, tabs, etc.) and Harmony components (HarmonyButton, HarmonyInput, HarmonyForm, etc.). The title accurately captures the primary change—adding a collection of documentation files that serve as a knowledge base for component usage and schema generation. While the title specifically mentions "tinyvue" and doesn't explicitly reference the Harmony components in the documents/agent/ directory, the documentation collectively constitutes a knowledge base addition that aligns with the stated objective. The title is clear, specific, and non-generic, avoiding vague terms and successfully communicating the main intent of the changeset.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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: 4

🧹 Nitpick comments (3)
documents/harmony/HarmonyTabBar.md (1)

14-72: Hardcoded external CDN URLs require maintenance planning.

The JSON example references specific Huawei Cloud CDN asset paths (e.g., https://tinyengine-assets.obs.cn-north-4.myhuaweicloud.com/...). While these provide concrete examples, developers should understand these are CDN-dependent and may require updates if assets are moved or CDN configuration changes.

Consider adding a note after the JSON example clarifying that icon paths can be customized and describing the CDN dependency, or pointing to documentation on asset management practices.

Verify these external URLs are stable, documented in asset management guidelines, and monitored for availability. Can you confirm the asset URLs are part of the repository's documented infrastructure?

documents/tinyengine/tabs.md (1)

10-63: Consider removing inline JSON comments for spec compliance.

The JSON example contains inline comments (//-style), which technically violates the JSON specification and may cause issues if users attempt to validate or parse the example directly. While these comments are helpful for documentation, consider moving them to separate explanatory text above or below the code block to maintain valid JSON syntax.

Example refactor:

-```json
+```json
 {
   "componentName": "TinyTabs",
   "props": {
     "id": "tabs1",
-    "modelValue": "first", // 该字段必须有,可通过 modelValue 属性设置默认展示的标签页项
+    "modelValue": "first",

Then add explanatory text before or after the JSON block:

  • modelValue: Required field; sets the default displayed tab via modelValue property.
  • showEditIcon: Controls whether the edit icon is displayed.
  • tab-style: Sets tab style (card, border-card, or empty/default).
  • And so on for other properties...
documents/tinyengine/input.md (1)

10-33: Remove or relocate inline JSON comments for spec compliance.

Like the tabs.md example, this JSON contains inline comments that violate the JSON specification. Users copying this example directly may encounter validation or parsing errors. Move comments to separate explanatory text outside the code block to maintain valid JSON.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 50f5e0b and deaebdd.

📒 Files selected for processing (34)
  • documents/harmony/HarmonyBlock.md (1 hunks)
  • documents/harmony/HarmonyButton.md (1 hunks)
  • documents/harmony/HarmonyCheckbox.md (1 hunks)
  • documents/harmony/HarmonyEditor.md (1 hunks)
  • documents/harmony/HarmonyForm.md (1 hunks)
  • documents/harmony/HarmonyImage.md (1 hunks)
  • documents/harmony/HarmonyInput.md (1 hunks)
  • documents/harmony/HarmonyLabel.md (1 hunks)
  • documents/harmony/HarmonyNavigator.md (1 hunks)
  • documents/harmony/HarmonyPicker.md (1 hunks)
  • documents/harmony/HarmonyProgress.md (1 hunks)
  • documents/harmony/HarmonyRadio.md (1 hunks)
  • documents/harmony/HarmonyScrollView.md (1 hunks)
  • documents/harmony/HarmonySlider.md (1 hunks)
  • documents/harmony/HarmonySwiper.md (1 hunks)
  • documents/harmony/HarmonySwitch.md (1 hunks)
  • documents/harmony/HarmonyTabBar.md (1 hunks)
  • documents/harmony/HarmonyText.md (1 hunks)
  • documents/harmony/HarmonyTextarea.md (1 hunks)
  • documents/harmony/HarmonyVideo.md (1 hunks)
  • documents/harmony/HarmonyView.md (1 hunks)
  • documents/tinyengine/CanvasFlexBox.md (1 hunks)
  • documents/tinyengine/breadcrumb.md (1 hunks)
  • documents/tinyengine/button.md (1 hunks)
  • documents/tinyengine/carousel.md (1 hunks)
  • documents/tinyengine/checkbox.md (1 hunks)
  • documents/tinyengine/h1.md (1 hunks)
  • documents/tinyengine/icon.md (1 hunks)
  • documents/tinyengine/input.md (1 hunks)
  • documents/tinyengine/radio.md (1 hunks)
  • documents/tinyengine/seacrh.md (1 hunks)
  • documents/tinyengine/select.md (1 hunks)
  • documents/tinyengine/switch.md (1 hunks)
  • documents/tinyengine/tabs.md (1 hunks)
🔇 Additional comments (28)
documents/harmony/HarmonyLabel.md (1)

1-20: Documentation structure and content look good.

The component schema is clearly documented with props explanations in comments. Format and structure are consistent with other Harmony component docs in the PR.

documents/harmony/HarmonyBlock.md (1)

1-19: Clear and concise documentation.

Consistent with the established documentation pattern. JSON example appropriately demonstrates basic usage.

documents/harmony/HarmonyView.md (1)

1-20: Well-documented schema.

Consistent structure and formatting. The hoverClass prop explanation is helpful for users implementing hover effects.

documents/harmony/HarmonyTextarea.md (1)

1-25: Comprehensive prop documentation.

Excellent example demonstrating multiple configuration options for the textarea component. Clear comments explain the purpose of each prop, which will help users understand the component capabilities.

documents/harmony/HarmonyNavigator.md (1)

1-34: Excellent documentation of nested component usage.

The example effectively demonstrates how HarmonyNavigator can contain child components (HarmonyButton), which illustrates the component composition pattern. Detailed comments on prop options (e.g., open-type values, animation types) provide valuable reference for users.

documents/harmony/HarmonyVideo.md (1)

1-28: Comprehensive video component documentation.

Good coverage of video player props with real-world resource URLs in the example. Comments explain the purpose of each property. One minor note: width and height are shown as strings in the JSON example—verify whether the actual component expects strings, numbers, or both.

documents/harmony/HarmonyButton.md (1)

1-27: Well-documented button component with semantic type options.

Excellent coverage of button styling (size, type, round, plain) and state management (disabled, loading, autofocus). The documented type options (primary, success, warning, danger, info, text) provide clear semantic choices for different use cases.

documents/harmony/HarmonySwitch.md (1)

1-22: Clean and concise documentation for switch component.

Appropriately covers the essential props for a toggle/switch component. Simple, focused documentation that matches the component's purpose.

documents/harmony/HarmonyInput.md (1)

1-24: Documentation format and content look good.

The schema structure is clear, JSON is valid, and inline explanations are helpful for developers.

documents/harmony/HarmonyPicker.md (1)

1-32: Schema is well-documented with clear mode and range configurations.

The JSON example effectively demonstrates the picker's selector, date, and time modes.

documents/harmony/HarmonyRadio.md (1)

1-23: Consistent documentation format with clear props and examples.

Single-select radio schema is properly documented.

documents/harmony/HarmonyCheckbox.md (1)

1-23: Well-structured checkbox component documentation.

Props are clearly documented with appropriate default and optional values.

documents/harmony/HarmonySwiper.md (1)

1-54: Comprehensive documentation of hierarchical component structure.

The nested HarmonySwiperItem children are well-documented with clear prop guidance and example structure.

documents/tinyengine/breadcrumb.md (1)

1-39: Breadcrumb schema is well-documented with routing and event binding examples.

Options structure and JSExpression event handling are clearly explained.

documents/harmony/HarmonyProgress.md (1)

1-23: Progress bar schema documentation is clear and complete.

Props configuration (stroke-width, percent, show-info, activeColor) is well-explained.

documents/harmony/HarmonyForm.md (1)

1-61: Clear and well-structured documentation.

The HarmonyForm schema documentation is well-organized with good examples of nested component composition. The inline comments in the JSON example effectively explain prop purposes.

documents/tinyengine/button.md (1)

14-29: Verify button event binding—onUpdate:modelValue may be unusual for button component.

Buttons typically don't use two-way model binding (onUpdate:modelValue). Common button events are onClick, onBlur, onFocus. The long comment on line 28 lists many events but onUpdate:modelValue seems inconsistent with button semantics.

Verify that TinyButton actually supports onUpdate:modelValue binding, or if this should be replaced with onClick or other button-specific events. Check the TinyVue button component API documentation to confirm the correct event bindings for this example.

documents/harmony/HarmonyText.md (1)

1-21: Clean and appropriate documentation for simple component.

The HarmonyText documentation is concise and correct. The minimal prop set is well-explained, and the empty children array is appropriate for a leaf component.

documents/tinyengine/switch.md (1)

1-28: Accurate switch component documentation.

The TinySwitch documentation properly documents two-way binding with modelValue and onUpdate:modelValue. The true-value/false-value pattern is correctly illustrated, and the size variant with mini prop is well-explained.

documents/tinyengine/select.md (1)

1-42: Comprehensive and well-structured select component documentation.

The TinySelect schema properly demonstrates the options array structure with value/label pairs, multi-select capabilities, and search/filter features. Props are comprehensively documented with clear explanations for each configuration option.

documents/tinyengine/radio.md (1)

1-29: Clear and accurate radio component documentation.

The TinyRadio schema properly separates label (selection value) from text (display text), and documents sizing options and HTML attribute support. Props are well-explained with appropriate defaults in the example.

documents/harmony/HarmonyScrollView.md (1)

1-21: Clean and appropriately minimal documentation.

The HarmonyScrollView documentation correctly documents the essential properties for scroll control (scroll-x and scroll-y). The simple structure is appropriate for this component's focused purpose.

documents/harmony/HarmonyImage.md (1)

1-22: Documentation structure is clear and complete.

The HarmonyImage component documentation properly describes the schema structure with inline comments explaining each prop. JSON example is valid and demonstrates realistic usage patterns.

documents/harmony/HarmonySlider.md (1)

1-25: Documentation is well-structured and consistent.

HarmonySlider documentation follows the established pattern with clear descriptions and valid JSON. All props are properly documented with inline comments.

documents/harmony/HarmonyEditor.md (1)

1-21: Documentation is clear and follows established patterns.

HarmonyEditor documentation properly describes the schema with valid JSON and helpful inline comments explaining each property's purpose.

documents/tinyengine/h1.md (1)

1-82: Well-structured multi-example documentation.

The h1 documentation provides multiple progressive examples covering basic usage, heading types, styling, ref, and id attributes. All JSON examples are valid, and the structure clearly progresses from simple to advanced use cases with helpful explanations.

documents/tinyengine/carousel.md (1)

1-69: Comprehensive nested component documentation.

The carousel documentation effectively demonstrates complex hierarchical component structure with proper nesting of TinyCarouselItem children. Event handling with JSExpression is clearly documented, and the JSON example is valid and realistic.

documents/tinyengine/icon.md (1)

1-20: Clean and informative Icon component documentation.

The documentation clearly explains the Icon component schema with valid JSON. Inline comments listing available icon names (IconDel, IconChevronRight, etc.) are helpful for users discovering component capabilities.

@lu-yg lu-yg merged commit 0854dde into opentiny:develop Oct 31, 2025
1 check passed
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: 1

🧹 Nitpick comments (1)
documents/agent/HarmonySwitch.md (1)

1-8: Consider standardizing documentation for schema files.

Documentation would benefit from additional structure to support programmatic generation and ease of reference across schema files:

  • Add property type information (e.g., boolean, string)
  • Document supported props, their types, and defaults
  • Include event handlers if applicable
  • Consider consistent title formatting and structure across all schema documentation
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between deaebdd and 4ce43e8.

📒 Files selected for processing (21)
  • documents/agent/HarmonyBlock.md (1 hunks)
  • documents/agent/HarmonyButton.md (1 hunks)
  • documents/agent/HarmonyCheckbox.md (1 hunks)
  • documents/agent/HarmonyEditor.md (1 hunks)
  • documents/agent/HarmonyForm.md (1 hunks)
  • documents/agent/HarmonyImage.md (1 hunks)
  • documents/agent/HarmonyInput.md (1 hunks)
  • documents/agent/HarmonyLabel.md (1 hunks)
  • documents/agent/HarmonyNavigator.md (1 hunks)
  • documents/agent/HarmonyPicker.md (1 hunks)
  • documents/agent/HarmonyProgress.md (1 hunks)
  • documents/agent/HarmonyRadio.md (1 hunks)
  • documents/agent/HarmonyScrollView.md (1 hunks)
  • documents/agent/HarmonySlider.md (1 hunks)
  • documents/agent/HarmonySwiper.md (1 hunks)
  • documents/agent/HarmonySwitch.md (1 hunks)
  • documents/agent/HarmonyTabBar.md (1 hunks)
  • documents/agent/HarmonyText.md (1 hunks)
  • documents/agent/HarmonyTextarea.md (1 hunks)
  • documents/agent/HarmonyVideo.md (1 hunks)
  • documents/agent/HarmonyView.md (1 hunks)
✅ Files skipped from review due to trivial changes (14)
  • documents/agent/HarmonyVideo.md
  • documents/agent/HarmonyRadio.md
  • documents/agent/HarmonyForm.md
  • documents/agent/HarmonyLabel.md
  • documents/agent/HarmonyProgress.md
  • documents/agent/HarmonyTabBar.md
  • documents/agent/HarmonyImage.md
  • documents/agent/HarmonyBlock.md
  • documents/agent/HarmonyView.md
  • documents/agent/HarmonyTextarea.md
  • documents/agent/HarmonyPicker.md
  • documents/agent/HarmonyEditor.md
  • documents/agent/HarmonyScrollView.md
  • documents/agent/HarmonySwiper.md
🔇 Additional comments (6)
documents/agent/HarmonyCheckbox.md (1)

1-22: Documentation structure is clear and consistent. File follows established pattern well, with helpful Chinese comments explaining each prop. JSON examples are easy to understand.

documents/agent/HarmonyText.md (1)

1-21: Consistent with established pattern. Clear documentation with appropriate Chinese explanations for each prop.

documents/agent/HarmonySlider.md (1)

1-25: Well-documented with comprehensive prop coverage. More detailed than simpler components, but Chinese comments remain clear and informative.

documents/agent/HarmonyInput.md (1)

1-25: Clear and well-structured. Consistent with other component documentation files. Props and their purposes are well-explained in Chinese.

documents/agent/HarmonyButton.md (1)

1-27: Excellent documentation of enum values and options. The inline comments clearly list possible values (e.g., size: large/medium/small/mini; type: primary/success/warning/danger/info/text), which helps developers understand component capabilities. Well-structured.

documents/agent/HarmonyNavigator.md (1)

1-34: Excellent example with nested component structure. The nested HarmonyButton child component demonstrates how TinyEngine handles component composition. Detailed comments explain each prop's purpose and valid values. Very helpful for developers.

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.

2 participants