Skip to content

feat: add alert, link, divider components#1811

Open
xuanlid wants to merge 1 commit into
opentiny:developfrom
xuanlid:feat/tiny-vue-components
Open

feat: add alert, link, divider components#1811
xuanlid wants to merge 1 commit into
opentiny:developfrom
xuanlid:feat/tiny-vue-components

Conversation

@xuanlid
Copy link
Copy Markdown
Contributor

@xuanlid xuanlid commented Jun 1, 2026

English | 简体中文

PR

image

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

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

coderabbitai Bot commented Jun 1, 2026

Review Change Stack

Walkthrough

This PR extends the tiny-engine designer with three new Vue components—TinyAlert, TinyLink, and TinyDivider—by adding comprehensive metadata definitions, designer snippets, and schema registrations across mock configuration files.

Changes

Vue Component Metadata and Schema Registration

Layer / File(s) Summary
Component definitions and designer snippets
designer-demo/public/mock/bundle.json
Defines full component schemas, configure rules, events, slots, and i18n metadata for TinyAlert, TinyLink, and TinyDivider. Adds two new designer snippet entries (链接(组件) for TinyLink and 警告 for TinyAlert) with default schema properties.
Component registration in app center schemas
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 componentsMap for both schema versions, specifying @opentiny/vue as the npm package, matching export names, destructuring: true, and version 3.22.0.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 Three tiny components join the fray,
Alert, Link, and Divider here to stay,
With schemas and snippets all in place,
The designer's palette now has more grace!

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely describes the main change: adding three new Vue components (alert, link, divider) to the codebase.
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.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ 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 `@mockServer/src/mock/get/app-center/v1/apps/schema/1.json`:
- Around line 2158-2164: Duplicate registration of componentName "TinyAlert" in
componentsMap causes ambiguous resolution; remove the later entry (the block
with package "`@opentiny/vue`" exportName "TinyAlert" version "3.22.0") and
instead update the existing componentsMap entry for TinyAlert (the earlier
block) to reflect the intended exportName and version so there is only one
canonical TinyAlert definition.

In `@mockServer/src/mock/get/app-center/v1/apps/schema/16.json`:
- Around line 1188-1194: Remove the duplicate TinyAlert entry from componentsMap
(the second block with componentName "TinyAlert") and instead update the
original TinyAlert block (the earlier entry in componentsMap) to use the desired
package/exportName/version values shown in the duplicate; specifically, edit the
existing TinyAlert object to set package "`@opentiny/vue`", exportName
"TinyAlert", destructuring true and version "3.22.0" and delete the later
duplicated object to avoid inconsistent component lookup.
🪄 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: baf142cf-6a63-409a-92cf-bfab2cc54fcd

📥 Commits

Reviewing files that changed from the base of the PR and between 87ac1e0 and 7105acd.

📒 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 mockServer/src/mock/get/app-center/v1/apps/schema/1.json
Comment thread mockServer/src/mock/get/app-center/v1/apps/schema/16.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