tiny-engine icon indicating copy to clipboard operation
tiny-engine copied to clipboard

refactor(styles): apply new styles to props panel

Open gene9831 opened this issue 1 year ago • 1 comments

English | 简体中文

PR

PR Checklist

Please check if your PR fulfills the following requirements:

  • [x] 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)
  • [x] 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?

属性面板改动点:

  1. 字体从14px改为12px
  2. 属性label位置规则修改:
    • 如果label较短,则label和简单输入组件为左右结果,处于同一行 {7651EF07-DB54-4268-9589-BFAF0E0D7A7C}
    • 如果label较长,则label和简单输入组件为上下结构,分两行展示 {A92E4D17-A33E-4612-B7A7-A05AD94F4C1A}
    • 如果是编辑代码组件,统一为上下结构 {2831DA36-5D83-463D-9E56-D2CD15407E64}
    • 如果是复选框组件,统一为左右结构 {C60B62D1-D7A8-4833-8A4C-9FD69BDC20A1}
  3. 只有少数几个选项的选择器,修改为选块(目前只修改了仅有2个选项并且文本较短的选择器) {45B5ADEB-8CBD-429F-98AF-2C9BDEE6CE72}
  4. 表格列"新增一列"修改位置和样式 {0E720DF3-3BEC-4680-9762-A4A22214DD75}
  5. 表格二级面板增加关联标题(标题为空展示为"未命名标题") image

Does this PR introduce a breaking change?

  • [ ] Yes
  • [x] No

Other information

Summary by CodeRabbit

Release Notes

  • New Features

    • Standardized label positions for form elements to enhance visual consistency.
    • Introduced new properties for input fields, including maxlength, autofocus, and clearable.
    • Added new components: TinyCarouselItem and TinyCarousel.
    • Implemented a new title display in MetaChildItem for improved UI clarity.
    • Added a dedicated button for adding items in ArrayItemConfigurator.
  • Bug Fixes

    • Enhanced event handling and styling for various components, improving overall functionality and user experience.
  • Style

    • Comprehensive updates to styling across multiple components to improve visual consistency and responsiveness.

gene9831 avatar Sep 29 '24 06:09 gene9831

Walkthrough

The pull request introduces a series of modifications across multiple components in a Vue.js application, focusing on configuration and schema definitions for UI elements. Key changes include adjustments to label positions, updates to widget components, and the introduction of new properties for enhanced functionality. Additionally, several components have undergone structural and stylistic refinements, improving code readability and visual consistency throughout the application.

Changes

File Path Change Summary
designer-demo/public/mock/bundle.json Adjusted label positions, replaced SwitchConfigurator with CheckBoxConfigurator, and added new properties.
packages/common/component/ConfigItem.vue Simplified template structure and improved code readability; no public entity changes.
packages/common/component/MetaChildItem.vue Added a new computed property title for enhanced UI; no public entity changes.
packages/common/component/MetaCodeEditor.vue Updated template structure and styles; no public entity changes.
packages/common/component/MetaList.vue Introduced a new bottom slot for flexible content placement; no public entity changes.
packages/common/component/MetaListItem.vue Modified event handling and styling; no public entity changes.
packages/configurator/src/array-item-configurator/ArrayItemConfigurator.vue Removed actions template, added bottom template for item addition.
packages/configurator/src/button-group-configurator/ButtonGroupConfigurator.vue Updated template and styles for button group; no public entity changes.
packages/configurator/src/checkbox-configurator/CheckBoxConfigurator.vue Simplified template structure and introduced change method; added inheritAttrs property.
packages/plugins/materials/src/js/options.js Added labelPosition attribute to properties in basePropertyOptions.
packages/theme/base/src/component-common.less Extensive styling adjustments across various UI components to enhance visual presentation and user interaction.
packages/settings/styles/src/components/border/BorderGroup.vue Restructured template and script for border and radius settings; added computed properties.
packages/settings/styles/src/components/buttons/ButtonGroup.vue Introduced a new button group component with tooltips and dynamic rendering.
packages/settings/styles/src/components/index.js Added export statement for the new ButtonGroup component.

Possibly related PRs

  • #536: The changes in this PR involve migrating meta components, including the CodeConfigurator, which relates to the updates made to the MetaCodeEditor component in the main PR.
  • #546: This PR introduces new configurator components, including CodeConfigurator, which is directly related to the changes made in the main PR regarding the MetaCodeEditor.
  • #601: This PR focuses on the migration of meta components, which aligns with the changes in the main PR that involve updating the MetaCodeEditor and other related components.
  • #826: The modifications in this PR include updates to the MetaCodeEditor, which is relevant to the changes made in the main PR regarding styling and layout adjustments.
  • #851: This PR addresses modifications to the styling of various UI components, including those related to collapsible items, which may indirectly relate to the overall UI changes in the main PR.

Suggested labels

enhancement

Suggested reviewers

  • hexqi
  • chilingling

Poem

🐇 In the garden where changes bloom,
New labels dance, dispelling gloom.
Buttons and checkboxes, side by side,
With every tweak, our joy will glide.
A hop, a skip, a leap so bright,
UI shines, oh what a sight! 🌼


📜 Recent review details

Configuration used: CodeRabbit UI Review profile: CHILL

📥 Commits

Files that changed from the base of the PR and between d29a3f7f8c9fb536efcc3fbe5a485f1fe88b8ab2 and fa7160e74d8e7f5f2f2497e1b5984b93e04fc5d3.

📒 Files selected for processing (1)
  • packages/common/component/MetaChildItem.vue (5 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/common/component/MetaChildItem.vue

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

coderabbitai[bot] avatar Sep 29 '24 06:09 coderabbitai[bot]