Skip to content

feat:add anchor component and icons#1812

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

feat:add anchor component and icons#1812
lichunn merged 3 commits into
opentiny:developfrom
xuanlid:feat/add-tiny-vue-components

Conversation

@xuanlid

@xuanlid xuanlid commented Jun 4, 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

    • Introduced TinyAnchor component for anchor navigation with offset, affix, container linking, link list and display type options.
    • Added TinyAnchor snippets for quick insertion and usage examples.
  • Updates

    • Updated TinyActionMenu icon to a clearer action-menu glyph.
    • Expanded component registry to include TinyAnchor across schema configurations.

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

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Important

Review skipped

Review was skipped due to path filters

⛔ Files ignored due to path filters (6)
  • packages/design-core/assets/funnel.svg is excluded by !**/*.svg
  • packages/design-core/assets/gauge.svg is excluded by !**/*.svg
  • packages/design-core/assets/graph.svg is excluded by !**/*.svg
  • packages/design-core/assets/process.svg is excluded by !**/*.svg
  • packages/design-core/assets/scatter.svg is excluded by !**/*.svg
  • packages/design-core/assets/waterfall.svg is excluded by !**/*.svg

CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including **/dist/** will override the default block on the dist directory, by removing the pattern from both the lists.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 2bfa7d6b-153d-4801-b876-fcdcc3262ebf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

Adds a new TinyAnchor component definition and snippet to the designer mock bundle, registers TinyAnchor in two app-center schema maps, and corrects TinyActionMenu icon values from dropdown to action-menu.

Changes

TinyAnchor Component Integration

Layer / File(s) Summary
TinyAnchor metadata and properties definition
designer-demo/public/mock/bundle.json
Adds complete TinyAnchor component entry with metadata (name, icon, description, version), a detailed property/config schema (container-id, mark-class, offset-top, is-affix, type, links), and configure/contextMenu rules.
TinyAnchor snippet template and schema registration
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
Adds a TinyAnchor snippet object (snippetName and schema.props including links and type:"dot") to the bundle and registers TinyAnchor in two schema registries with package: @opentiny/vue``, exportName: TinyAnchor, `destructuring: true`, `version: 3.22.0`.
TinyActionMenu icon value corrections
designer-demo/public/mock/bundle.json
Updates TinyActionMenu icon values from dropdown to action-menu in two locations within the bundle.

🎯 2 (Simple) | ⏱️ ~10 minutes

Suggested reviewers

  • hexqi

"I nibble on JSON and hop with cheer,
TinyAnchor lands and the snippets appear,
Icons align, the bundle sings,
Designer dreams with anchored springs,
⚓🐇✨"

🚥 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 PR title 'feat: add anchor component and icons' accurately reflects the main changes—TinyAnchor component definition added to bundle.json and schema files, with icon adjustments (dropdown → action-menu).
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: 1

🤖 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`:
- Line 12: TinyAnchor's metadata icon is inconsistent: update the icon key used
in the TinyAnchor metadata entry (currently "hr") so it matches the snippet's
icon ("anchor"); search for the "TinyAnchor" metadata and snippet entries in
bundle.json, replace the metadata "icon": "hr" with "icon": "anchor" (or vice
versa if you prefer "hr" globally), and ensure both the metadata and the snippet
for TinyAnchor use the exact same string value.
🪄 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: ac06358c-e6ea-4442-80a1-04f08822feb2

📥 Commits

Reviewing files that changed from the base of the PR and between fdad821 and 686f085.

⛔ Files ignored due to path filters (6)
  • packages/design-core/assets/action-menu.svg is excluded by !**/*.svg
  • packages/design-core/assets/alert.svg is excluded by !**/*.svg
  • packages/design-core/assets/anchor.svg is excluded by !**/*.svg
  • packages/design-core/assets/container.svg is excluded by !**/*.svg
  • packages/design-core/assets/drawer.svg is excluded by !**/*.svg
  • packages/design-core/assets/file-upload.svg is excluded by !**/*.svg
📒 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 Outdated
@lichunn lichunn merged commit 7db6a09 into opentiny:develop Jun 8, 2026
1 check 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