Skip to content

feat:add drawer, container, file-upload components#1813

Open
xuanlid wants to merge 2 commits into
opentiny:developfrom
xuanlid:feat/add-components
Open

feat:add drawer, container, file-upload components#1813
xuanlid wants to merge 2 commits into
opentiny:developfrom
xuanlid:feat/add-components

Conversation

@xuanlid
Copy link
Copy Markdown
Contributor

@xuanlid xuanlid commented Jun 8, 2026

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

  • New Features
    • Added three designer components: Drawer, Container, and File Upload. Each includes prebuilt snippets/templates, configurable properties (visibility, title, size, position, mask, z-index, hints), common events (show/confirm/close), default/header/footer/header-right slots, and editor settings (modal, styles, loop/condition) plus sensible presets for quick use.

@github-actions github-actions Bot added the enhancement New feature or request label Jun 8, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 8, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 0318902f-d181-4f64-ad91-67be5c41ec9d

📥 Commits

Reviewing files that changed from the base of the PR and between 155dc9d and 566d9ff.

📒 Files selected for processing (1)
  • designer-demo/public/mock/bundle.json

Walkthrough

This PR adds three new Vue components (TinyDrawer, TinyContainer, TinyFileUpload) to the Tiny Engine designer by introducing component metadata, schema properties, designer snippets, and registrations across bundle and app schema configuration files.

Changes

Add component metadata for TinyDrawer, TinyContainer, and TinyFileUpload

Layer / File(s) Summary
Component definitions and editor configuration
designer-demo/public/mock/bundle.json
Defines TinyDrawer, TinyContainer, and TinyFileUpload with full schema metadata including props with widgets and defaults, event signatures, slot definitions, and editor configuration flags (loop, condition, modal) plus context-menu action permissions.
Component designer snippets
designer-demo/public/mock/bundle.json
Adds designer snippet templates: TinyContainer with header/aside/footer layout sections, TinyFileUpload with default action and data plus button trigger, and TinyDrawer with visibility and title configuration.
Component schema registrations
mockServer/src/mock/get/app-center/v1/apps/schema/1.json, mockServer/src/mock/get/app-center/v1/apps/schema/16.json
Registers the three components in app schema componentsMap arrays, specifying @opentiny/vue package source, destructuring mode, and version 3.22.0.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested labels

enhancement

Suggested reviewers

  • hexqi
  • lichunn

🐰 Three new components hop into the designer's den,
TinyDrawer, TinyContainer, and TinyFileUpload—again and again!
With schemas and snippets and metadata laid clear,
The designer grows richer, the mockups appear.
Register them well in the schemas so fine,
And the building blocks multiply—a grand design! 🎨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat:add drawer, container, file-upload components' clearly and concisely summarizes the main change—adding three new components to the designer mock data.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

@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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@designer-demo/public/mock/bundle.json`:
- Around line 620-625: 组件配置中 TinyContainer
被标记为非容器,这与它定义的多插槽(default/header/aside/footer)和布局行为不一致;在 mock/bundle.json 中找到
TinyContainer 的 "configure" 对象(包含 loop/condition/styles 字段)并将 "isContainer":
false 改为 "isContainer": true,以便设计器识别其容器能力并启用嵌套/投放交互,其他字段保留不变。
- Around line 269-289: The "高度" field in the JSON bundle is bound to the wrong
property key: change the object whose "label.text.zh_CN" is "高度" (currently
containing "property": "width", "defaultValue": "100vh", "description":
"设置抽屉的高度") so that its "property" value is "height" instead of "width" to ensure
the designer updates height rather than width.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: d660f719-0da4-48f7-8ecf-68a02fd210ba

📥 Commits

Reviewing files that changed from the base of the PR and between 7db6a09 and 155dc9d.

📒 Files selected for processing (3)
  • designer-demo/public/mock/bundle.json
  • mockServer/src/mock/get/app-center/v1/apps/schema/1.json
  • mockServer/src/mock/get/app-center/v1/apps/schema/16.json

Comment thread designer-demo/public/mock/bundle.json
Comment thread designer-demo/public/mock/bundle.json
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.

1 participant