Skip to content

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

Merged
lichunn merged 3 commits into
opentiny:developfrom
xuanlid:feat/add-components
Jun 12, 2026
Merged

feat:add drawer, container, file-upload components#1813
lichunn merged 3 commits into
opentiny:developfrom
xuanlid:feat/add-components

Conversation

@xuanlid

@xuanlid xuanlid commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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 ships with ready-to-use snippets, sensible presets (visibility/title/action/data), configurable properties (size, position, mask, z-index, hints), common events (show/confirm/close), and default/header/footer/header-right slots.
    • Editor integration: modal/container settings, nesting rules, and context-menu actions for easy authoring.

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

coderabbitai Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

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: 1e85e7e3-7b67-431d-8803-e2ae36bd0298

📥 Commits

Reviewing files that changed from the base of the PR and between 566d9ff and 011e4b6.

📒 Files selected for processing (1)
  • designer-demo/public/mock/bundle.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • designer-demo/public/mock/bundle.json

Walkthrough

Adds designer bundle metadata for TinyDrawer, creates designer snippets for TinyContainer/TinyFileUpload/TinyDrawer, and registers all three components in app schema componentsMap entries.

Changes

Add component metadata for TinyDrawer, TinyContainer, and TinyFileUpload

Layer / File(s) Summary
Component metadata (TinyDrawer)
designer-demo/public/mock/bundle.json
Adds full TinyDrawer metadata: props (title, draggable, mask, direction, closeIcon, header/footer visibility, visible, width/height, z-index, tips), events (onClose/onConfirm/onShow), slots (default/footer/header/header-right), and editor configuration.
Designer snippets (TinyContainer, TinyFileUpload, TinyDrawer)
designer-demo/public/mock/bundle.json
Adds snippets: TinyContainer preset with pattern: "default" and header/aside/footer Template slots, TinyFileUpload preset action/data with trigger slot rendering TinyButton, TinyDrawer preset visible: true and title with a minimal child div.
App schema registrations
mockServer/src/mock/get/app-center/v1/apps/schema/1.json, mockServer/src/mock/get/app-center/v1/apps/schema/16.json
Inserts componentsMap entries for TinyDrawer, TinyContainer, and TinyFileUpload pointing to @opentiny/vue with destructuring: true and version: "3.22.0".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • hexqi
  • lichunn

🐰 I hopped through JSON and snippets bright,
TinyDrawer yawns and opens to light.
Containers and uploads join the dance,
Snippets in place for every chance.
Designer springs forward—components take flight!

🚥 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 accurately summarizes the main change: adding three new components (drawer, container, file-upload) to the designer's mock bundle and component schemas.
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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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
Comment thread designer-demo/public/mock/bundle.json
Comment thread mockServer/src/mock/get/app-center/v1/apps/schema/1.json
@lichunn lichunn merged commit 6390a94 into opentiny:develop Jun 12, 2026
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