Skip to content

Release v2.4.0 merge#1290

Merged
chilingling merged 16 commits intodevelopfrom
release-v2.4.0-merge
Apr 7, 2025
Merged

Release v2.4.0 merge#1290
chilingling merged 16 commits intodevelopfrom
release-v2.4.0-merge

Conversation

@hexqi
Copy link
Collaborator

@hexqi hexqi commented Apr 7, 2025

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

  • Chores

    • Updated package versions to 2.4.0 across most components to streamline dependency management.
  • UI Enhancements

    • Improved panel resizing responsiveness and refined styling for a smoother, more intuitive interface.
  • Reliability Improvements

    • Added extra safeguards during copy actions and enhanced filtering logic for a more robust user experience.
  • Configuration Updates

    • Adjusted environment settings to support new CDN endpoints, optimizing resource loading and performance.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Apr 7, 2025

Walkthrough

This pull request applies a series of systematic changes across the repository. Most notably, version numbers in numerous package.json files have been updated from 2.3.0 to 2.4.0. Several components and modules have been improved: error handling in canvas components (with optional chaining and additional reactive watchers), UI adjustments in plugin components, and refined environment settings for the engine CLI. There are also updates to hooks and registration infrastructure, as well as minor CSS and functionality tweaks across various plugins and settings modules.

Changes

File(s) Change Summary
designer-demo/package.json, mockServer/package.json, packages/{block-compiler, blockToWebComponentTemplate, build/vite-config, build/vite-plugin-meta-comments, builtinComponent, canvas, common, configurator, design-core, engine-cli, i18n, layout, plugins/*, register, settings/*, svgs, theme/base, toolbars/*, utils, vue-generator, webcomponent}/package.json Updated version numbers from 2.3.0 to 2.4.0 across all projects.
packages/canvas/DesignCanvas/src/DesignCanvas.vue
packages/canvas/CanvasResize.vue
packages/canvas/render/src/{RenderMain.ts, canvas-function/canvas-api.ts}
packages/canvas/render/src/runner.ts
packages/canvas/container/src/keyboard.ts
packages/canvas/container/src/components/CanvasMenu.vue
Enhanced canvas functionality by adding optional chaining to prevent errors, introducing reactive references and watchers (e.g. for panel resizing), and extending the canvas API with new methods (getConditions, getController). Event validation and proper lifecycle handling have been added.
packages/common/component/PluginPanel.vue
packages/plugins/block/src/BlockSetting.vue
packages/plugins/page/{src/PageGeneral.vue, src/PageSetting.vue, src/PageTree.vue, src/Tree.vue}
packages/plugins/robot/src/Main.vue
packages/plugins/schema/src/Main.vue
packages/plugins/i18n/{src/Main.vue, src/composable/useTranslate.ts}
Refactored UI and plugin components: improved type safety, updated styling (CSS color and cursor adjustments), removed redundant buttons, applied semantic HTML restructuring, and refined promise handling and fallback logics in plugin modules.
packages/engine-cli/template/designer/env/{.env.alpha, .env.development, .env.production} Changed CDN configuration: updated VITE_CDN_DOMAIN to https://registry.npmmirror.com and introduced VITE_CDN_TYPE=npmmirror for proper CDN type declaration.
packages/register/src/{constants.ts, hooks.ts} Expanded the registration and hook system by adding a new entry (Style) to the service metadata and introducing a new hook (useStyle) to extend hook functionality.
packages/settings/{design/package.json, styles/index.ts, styles/src/components/{classNamesContainer/index.vue, spacing/SpacingGroup.vue}, styles/src/js/{index.ts, useStyle.ts}}
packages/layout/src/DesignSettings.vue
Updated settings and style modules by integrating a new StyleService, refining CSS variables and animations, adding immediate watchers to enhance UI responsiveness, and simplifying the initialization of style-related functions.
Various minor plugin adjustments (e.g. in plugins/page, plugins/robot, plugins/schema) Applied additional small fixes such as grid column width adjustments, promise chain modifications, improved fallback handling in translations, and controlled attribute inheritance.

Sequence Diagram(s)

sequenceDiagram
    participant C as CanvasResize Component
    participant W as Window
    participant S as setScale Function

    C->>W: onMounted: addEventListener('resize', handleResize)
    W->>C: resize event occurs
    C->>S: handleResize() invokes setScale()
    C->>W: onUnmounted: removeEventListener('resize', handleResize)
Loading
sequenceDiagram
    participant R as Register Module
    participant H as Hook System

    R->>H: Register new hook (useStyle)
    H-->>R: useStyle hook available for use across modules
Loading

Possibly related PRs

  • v2.4.0 #1287: Updates the version bump for the designer-demo package, similar to transitioning from release candidate to stable in this PR.
  • chore(release): publish v2.2.0 #1084: Also involves version number updates in the package.json, transitioning from a pre-release version to a stable version.
  • feat: bump tiny-vue version #1008: Involves updating version numbers and dependencies for the designer-demo project, indicating a direct code-level connection with this PR.

Poem

Oh, how I hop with gleeful cheer,
For versions rise and bugs disappear.
My whiskers twitch at code so bright,
With watchers and hooks that feel just right.
In fields of updates, I leap and bound,
Celebrating changes that truly astound.
🐇💨 With every commit, joy is found!

✨ Finishing Touches
  • 📝 Generate Docstrings

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
🪧 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 generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai plan to trigger planning for file edits and PR creation.
  • @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.

Copy link
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: 1

🧹 Nitpick comments (3)
packages/build/vite-config/package.json (1)

13-14: Empty Build Script Warning
The "build" script is currently an empty string. If this is intentional, then it’s acceptable; otherwise, consider adding a valid build command to ensure proper build operations for this package.

packages/register/src/hooks.ts (1)

94-94: Added useStyle hook function

The useStyle function is implemented following the established pattern for hooks in this codebase. This completes the implementation of the new style hook.

However, the function lacks a return type annotation, unlike most other hook functions in this file:

-export const useStyle = (...args: any[]) => getHook(HOOK_NAME.useStyle, args)
+export const useStyle = (...args: any[]): UseStyleApi => getHook(HOOK_NAME.useStyle, args)

Consider adding a return type for consistency, assuming a UseStyleApi type is defined in the imports.

packages/common/component/PluginPanel.vue (1)

240-248: Consider scoping element queries to the component instance.

The query selectors might select elements outside this component if there are multiple instances on the page.

- const leftEl = document.querySelector('.resizer-left')
- const rightEl = document.querySelector('.resizer-right')
+ const leftEl = panel.value?.querySelector('.resizer-left')
+ const rightEl = panel.value?.querySelector('.resizer-right')
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f53ea7a and ed7916d.

📒 Files selected for processing (88)
  • designer-demo/package.json (1 hunks)
  • mockServer/package.json (1 hunks)
  • packages/block-compiler/package.json (1 hunks)
  • packages/blockToWebComponentTemplate/package.json (1 hunks)
  • packages/build/vite-config/package.json (1 hunks)
  • packages/build/vite-plugin-meta-comments/package.json (1 hunks)
  • packages/builtinComponent/package.json (1 hunks)
  • packages/canvas/DesignCanvas/src/DesignCanvas.vue (1 hunks)
  • packages/canvas/container/src/components/CanvasMenu.vue (2 hunks)
  • packages/canvas/container/src/components/CanvasResize.vue (4 hunks)
  • packages/canvas/container/src/keyboard.ts (1 hunks)
  • packages/canvas/package.json (1 hunks)
  • packages/canvas/render/src/RenderMain.ts (3 hunks)
  • packages/canvas/render/src/canvas-function/canvas-api.ts (2 hunks)
  • packages/canvas/render/src/runner.ts (1 hunks)
  • packages/common/component/PluginPanel.vue (3 hunks)
  • packages/common/js/http.js (2 hunks)
  • packages/common/package.json (2 hunks)
  • packages/configurator/package.json (1 hunks)
  • packages/design-core/package.json (1 hunks)
  • packages/engine-cli/package.json (1 hunks)
  • packages/engine-cli/template/designer/env/.env.alpha (1 hunks)
  • packages/engine-cli/template/designer/env/.env.development (1 hunks)
  • packages/engine-cli/template/designer/env/.env.production (1 hunks)
  • packages/engine-cli/template/designer/package.json (2 hunks)
  • packages/i18n/package.json (1 hunks)
  • packages/layout/package.json (1 hunks)
  • packages/layout/src/DesignSettings.vue (2 hunks)
  • packages/layout/src/styles/vars.less (1 hunks)
  • packages/plugins/block/package.json (1 hunks)
  • packages/plugins/block/src/BlockSetting.vue (0 hunks)
  • packages/plugins/bridge/package.json (1 hunks)
  • packages/plugins/datasource/package.json (1 hunks)
  • packages/plugins/help/package.json (1 hunks)
  • packages/plugins/i18n/package.json (1 hunks)
  • packages/plugins/i18n/src/Main.vue (1 hunks)
  • packages/plugins/i18n/src/composable/useTranslate.ts (1 hunks)
  • packages/plugins/materials/package.json (1 hunks)
  • packages/plugins/materials/src/composable/useResource.ts (1 hunks)
  • packages/plugins/page/package.json (1 hunks)
  • packages/plugins/page/src/PageGeneral.vue (3 hunks)
  • packages/plugins/page/src/PageSetting.vue (2 hunks)
  • packages/plugins/page/src/PageTree.vue (1 hunks)
  • packages/plugins/page/src/Tree.vue (1 hunks)
  • packages/plugins/robot/package.json (1 hunks)
  • packages/plugins/robot/src/Main.vue (2 hunks)
  • packages/plugins/schema/package.json (1 hunks)
  • packages/plugins/schema/src/Main.vue (1 hunks)
  • packages/plugins/script/package.json (1 hunks)
  • packages/plugins/state/package.json (1 hunks)
  • packages/plugins/tree/package.json (1 hunks)
  • packages/plugins/tutorial/package.json (1 hunks)
  • packages/register/package.json (1 hunks)
  • packages/register/src/constants.ts (1 hunks)
  • packages/register/src/hooks.ts (3 hunks)
  • packages/settings/design/package.json (1 hunks)
  • packages/settings/events/package.json (1 hunks)
  • packages/settings/panel/package.json (1 hunks)
  • packages/settings/props/package.json (1 hunks)
  • packages/settings/styles/index.ts (1 hunks)
  • packages/settings/styles/package.json (1 hunks)
  • packages/settings/styles/src/components/classNamesContainer/index.vue (1 hunks)
  • packages/settings/styles/src/components/spacing/SpacingGroup.vue (2 hunks)
  • packages/settings/styles/src/js/index.ts (1 hunks)
  • packages/settings/styles/src/js/useStyle.ts (1 hunks)
  • packages/svgs/package.json (1 hunks)
  • packages/theme/base/package.json (1 hunks)
  • packages/toolbars/breadcrumb/package.json (1 hunks)
  • packages/toolbars/clean/package.json (1 hunks)
  • packages/toolbars/collaboration/package.json (1 hunks)
  • packages/toolbars/fullscreen/package.json (1 hunks)
  • packages/toolbars/generate-code/package.json (1 hunks)
  • packages/toolbars/lang/package.json (1 hunks)
  • packages/toolbars/layout/package.json (1 hunks)
  • packages/toolbars/lock/package.json (1 hunks)
  • packages/toolbars/logo/package.json (1 hunks)
  • packages/toolbars/logout/package.json (1 hunks)
  • packages/toolbars/media/package.json (1 hunks)
  • packages/toolbars/preview/package.json (1 hunks)
  • packages/toolbars/redoundo/package.json (1 hunks)
  • packages/toolbars/refresh/package.json (1 hunks)
  • packages/toolbars/save/package.json (1 hunks)
  • packages/toolbars/setting/package.json (1 hunks)
  • packages/toolbars/themeSwitch/package.json (1 hunks)
  • packages/toolbars/view-setting/package.json (1 hunks)
  • packages/utils/package.json (1 hunks)
  • packages/vue-generator/package.json (1 hunks)
  • packages/webcomponent/package.json (1 hunks)
💤 Files with no reviewable changes (1)
  • packages/plugins/block/src/BlockSetting.vue
🧰 Additional context used
🧬 Code Definitions (5)
packages/plugins/i18n/src/composable/useTranslate.ts (1)
packages/design-core/src/preview/src/preview/generate.js (1)
  • locales (158-158)
packages/settings/styles/src/js/index.ts (2)
packages/register/src/constants.ts (1)
  • META_SERVICE (1-22)
packages/register/src/hooks.ts (2)
  • useStyle (94-94)
  • HOOK_NAME (21-42)
packages/canvas/render/src/runner.ts (1)
packages/canvas/render/src/render.ts (1)
  • renderer (228-321)
packages/canvas/render/src/canvas-function/canvas-api.ts (4)
packages/canvas/render/src/page-block-function/context.ts (1)
  • IPageContext (91-91)
packages/canvas/render/src/canvas-function/custom-renderer.ts (1)
  • useCustomRenderer (45-57)
packages/canvas/render/src/canvas-function/design-mode.ts (2)
  • getDesignMode (9-9)
  • setDesignMode (11-13)
packages/canvas/render/src/canvas-function/controller.ts (2)
  • setController (3-5)
  • getController (7-7)
packages/canvas/render/src/RenderMain.ts (1)
packages/canvas/container/src/container.ts (1)
  • getRenderer (74-74)
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: push-check
🔇 Additional comments (118)
packages/plugins/page/src/PageGeneral.vue (3)

50-53: Improved semantics with class renaming.

The renaming from text and text-dim to tip-text and tip-text-dim makes the class names more specific and better describes their purpose within the UI.


67-71: Enhanced DOM structure improves readability.

Restructuring the default page information from a single span to multiple div elements with appropriate class names improves the semantic structure and readability of the code.


326-334: CSS improvements for better text handling.

The addition of width, word-wrap, and height properties to the .tip class, along with consistent class name updates, will improve text wrapping and prevent overflow issues in the UI.

packages/plugins/page/src/Tree.vue (1)

115-115: Enhanced search functionality with case-insensitive filtering.

Converting both the node label and filter value to lowercase ensures a case-insensitive search experience, making the filtering more user-friendly and intuitive.

packages/plugins/page/src/PageTree.vue (1)

338-338: Proper state reset when moving pages.

Setting isDefault to false when a page is moved is a logical improvement. This ensures that moved pages don't retain their default status, which could lead to unexpected behavior in the navigation structure.

packages/plugins/page/src/PageSetting.vue (2)

313-317: Improved error handling in page update flow.

Replacing await with a Promise chain that conditionally executes editPage only when the update operation succeeds provides better error handling and prevents potential issues when updates fail.


332-332: Simplified control flow for default page setting.

Removing the chained .then(editPage) call complements the changes in the settingDefaultPage function, ensuring that editPage is only called when the update is successful.

packages/engine-cli/package.json (1)

3-3: Version Bump Confirmation
The version field is correctly updated from "2.3.0" to "2.4.0", aligning with the coordinated release effort. All other metadata remains consistent with release objectives.

packages/theme/base/package.json (1)

2-3: Version Update Verification
The version has been successfully updated to "2.4.0". The package meta-data (including publishConfig, scripts, and module type) is consistent, ensuring that the theme package aligns with the updated release version.

designer-demo/package.json (1)

4-4: Consistent Release Versioning
The version is properly updated to "2.4.0" in the designer-demo package, adhering to the overall release plan. This update is consistent with the coordinated version bumps across the repository.

packages/svgs/package.json (1)

2-3: SVGS Package Version Update
The version for the svgs package is correctly updated to "2.4.0". Both the "main" and "module" fields are maintained correctly, supporting both CommonJS and ESM consumers.

packages/i18n/package.json (1)

2-3: I18n Host Package Version Bump
The version update to "2.4.0" has been applied correctly. The accompanying scripts, dependencies, and peerDependencies are aligned with the new release, ensuring consistency with the overall project versioning.

packages/register/package.json (1)

3-3: Version Bump – Correct Update
The version has been correctly updated to "2.4.0", which aligns with the coordinated release effort in this PR.

packages/build/vite-config/package.json (1)

2-3: Version Update and Consistency Check
The version for "@opentiny/tiny-engine-vite-config" is updated to "2.4.0", matching the project-wide release.

packages/canvas/package.json (1)

2-3: Version Update Verification
The version for "@opentiny/tiny-engine-canvas" has been updated to "2.4.0", which is consistent with the overall release bump.

mockServer/package.json (1)

2-3: Mock Server Version Update Confirmed
The version for "@opentiny/tiny-engine-mock" is now "2.4.0". This update correctly reflects the new release version and is in line with the other packages.

packages/build/vite-plugin-meta-comments/package.json (1)

2-3: Version Increment Verification
The version for "@opentiny/tiny-engine-vite-plugin-meta-comments" has been updated to "2.4.0", ensuring consistency with the coordinated release.

packages/blockToWebComponentTemplate/package.json (1)

3-3: Version increment from 2.3.0 to 2.4.0 for release.

This update is part of the coordinated version bump across multiple packages for the v2.4.0 release.

packages/block-compiler/package.json (1)

3-3: Version increment from 2.3.0 to 2.4.0 for release.

This update aligns with the version changes across other packages in this release.

packages/settings/styles/package.json (1)

3-3: Version increment from 2.3.0 to 2.4.0 for release.

Part of the coordinated version update for the v2.4.0 release preparation.

packages/plugins/schema/src/Main.vue (1)

61-61: Adding inheritAttrs: false to control attribute inheritance.

This change prevents attributes that aren't explicitly defined as props from being automatically passed to the <plugin-panel> root element. This improves component encapsulation and gives more control over where attributes are applied in the template.

packages/canvas/container/src/components/CanvasMenu.vue (3)

148-149: Improved code organization with destructured constants.

Good refactoring to destructure PLUGIN_NAME and activeSetting from useLayout(). This reduces redundancy and improves readability.


158-158: Better code consistency using constants.

Replacing hardcoded string 'props' with PLUGIN_NAME.Props makes the code more maintainable and less prone to typo errors.


161-161: Better code consistency using constants.

Replacing hardcoded string 'event' with PLUGIN_NAME.Event improves maintainability and consistency with the approach used elsewhere.

packages/common/package.json (2)

3-3: Version updated for release 2.4.0.

The package version has been properly incremented from 2.3.0 to 2.4.0, matching the release version mentioned in the PR title.


54-54:

Details

✅ Verification successful

Added glob as a dev dependency.

The glob package (^10.3.4) has been added to devDependencies. This is commonly used for file pattern matching during build processes.


🏁 Script executed:

#!/bin/bash
# Check if the glob package is used in the codebase
rg -p "glob" --type js --type ts

Length of output: 24704


Approved: The addition of "glob": "^10.3.4" as a dev dependency is appropriate. Our search confirms that the package is used in build-related scripts—specifically in the common Vite configuration (e.g. in packages/common/vite.config.ts where it’s imported and used with glob.sync)—which aligns with its intended usage for file pattern matching during the build process.

No further changes are needed.

packages/register/src/constants.ts (1)

20-21:

Details

✅ Verification successful

Added Style service to META_SERVICE constant.

Good addition of a new Style service constant that follows the existing naming conventions. This will likely be used for styling-related functionality in the engine.


🏁 Script executed:

#!/bin/bash
# Check where the new Style service is being used
rg "engine.service.style" --type js --type ts

Length of output: 112


Style Service Constant Addition Verified

The new Style constant defined as 'engine.service.style' in packages/register/src/constants.ts (lines 20-21) follows our established naming conventions correctly. Our search confirmed that this service is currently only referenced within the constants file, which is expected for a freshly added constant intended for future styling-related functionalities.

packages/common/js/http.js (2)

15-15: Updated import to include useMessage.

Removed useCanvas import and added useMessage, reflecting the change in how page updates are handled.


65-69:

Details

✅ Verification successful

Changed page update notification mechanism.

Replaced the direct state update with a message publishing approach. This is likely part of a broader architectural shift toward a more event-driven communication pattern.

The code now publishes a 'pageOrBlockInit' event with the page content data, allowing other components to react to page updates through the messaging system.


🏁 Script executed:

#!/bin/bash
# Check for subscribers to the pageOrBlockInit topic
rg "pageOrBlockInit" --type js --type ts --context 5

Length of output: 3432


Updated Event-Driven Notification in HTTP Module

The change in packages/common/js/http.js (lines 65-69) correctly replaces the direct state update with a message publishing approach. The code now publishes a 'pageOrBlockInit' event with params.page_content as payload. Our verification confirms that multiple parts of the codebase (e.g., in packages/toolbars/save/src/Main.vue and packages/plugins/block/src/composable/useBlock.ts) are set up to subscribe to this topic, ensuring that the new event-driven mechanism is properly integrated.

packages/settings/events/package.json (1)

3-3: Version Bump Confirmed.
The version field has been successfully updated to "2.4.0" in this package, aligning with the overall release strategy. No further changes are required here.

packages/utils/package.json (1)

3-3: Version Bump Confirmed.
The update of the version number to "2.4.0" is correct and consistent with other package updates in this release.

packages/plugins/bridge/package.json (1)

3-3: Version Bump Confirmed.
The package version has been updated to "2.4.0" as expected. Ensure that any consumers of this package check for potential compatibility updates if needed.

packages/configurator/package.json (1)

3-3: Version Bump Confirmed.
The version field is correctly updated to "2.4.0". The metadata remains consistent with the project’s standards.

packages/plugins/block/package.json (1)

3-3: Version Bump Confirmed.
The version has been appropriately incremented to "2.4.0". All other configurations and dependency declarations are intact.

packages/builtinComponent/package.json (1)

3-3: Version Update Applied Correctly

The version field has been correctly updated from "2.3.0" to "2.4.0". This change is consistent with our coordinated release effort.

packages/plugins/tree/package.json (1)

3-3: Version Increment Confirmed

The package version is now "2.4.0", which aligns with the release strategy across all packages. No further modifications are required in this file.

packages/toolbars/media/package.json (1)

3-3: Version Bump Verified

The version update to "2.4.0" is correctly applied. All accompanying metadata remains consistent with our release guidelines.

packages/plugins/script/package.json (1)

3-3: Correct Version Update

The version field has been updated appropriately to "2.4.0", ensuring that this package conforms to the latest release versioning.

packages/plugins/robot/package.json (1)

3-3: Version Update Successful

The package's version has been successfully updated to "2.4.0". This update is in line with the overall coordinated release across the repository.

packages/toolbars/logo/package.json (1)

3-3: Version Update Confirmation:
The version number has been correctly updated to "2.4.0" to reflect the new release. All other metadata fields appear consistent with the package’s configuration.

packages/toolbars/save/package.json (1)

3-3: Version Bump Validation:
The version field is updated to "2.4.0", ensuring alignment with the overall release objectives. The metadata and dependencies remain accurate.

packages/settings/panel/package.json (1)

3-3: Release Version Update Check:
The version update to "2.4.0" is correctly applied. This aligns with the coordinated versioning across the repository as stated in the PR objectives.

packages/toolbars/lang/package.json (1)

3-3: Consistent Version Increment:
The version number is now "2.4.0", which is in accordance with the release update. All relevant metadata fields appear to be in order.

packages/toolbars/clean/package.json (1)

3-3: Version Number Update Confirmation:
The package’s version is updated to "2.4.0", consistent with the coordinated release strategy. The file retains its correct dependency and publishing settings.

packages/settings/props/package.json (1)

3-3: Version Bump Updated to "2.4.0".
The version is correctly updated to "2.4.0" to reflect the current release. Please ensure that all associated documentation and changelog entries are updated accordingly.

packages/toolbars/preview/package.json (1)

3-3: Confirmed Version Update for Toolbar Preview.
The package version has been updated to "2.4.0" as part of the coordinated release. Double-check that any integration or dependency requirements are documented.

packages/toolbars/layout/package.json (1)

3-3: Consistent Version Increment for Toolbar Layout.
The version change to "2.4.0" adheres to the coordinated update across packages. Please verify that any related build or dependency configurations reflect this update.

packages/toolbars/refresh/package.json (1)

3-3: Release Version Update for Toolbar Refresh.
The version number is updated to "2.4.0" as expected for this release. Confirm that the update is harmonized with other packages and that documentation/changelogs capture the change.

packages/toolbars/redoundo/package.json (1)

3-3: Version Bump Confirmed for Toolbar Redoundo.
The package version has been properly updated to "2.4.0". Ensure that any release notes or changelog sections mention this version increment.

packages/plugins/materials/package.json (1)

3-3: Version Updated to 2.4.0:
The version field has been updated from the previous version (presumably "2.3.0") to "2.4.0" for the @opentiny/tiny-engine-plugin-materials package. This reflects the coordinated release effort.

packages/toolbars/setting/package.json (1)

3-3: Version Update to 2.4.0:
The version field for @opentiny/tiny-engine-toolbar-setting has been bumped to "2.4.0". This ensures consistency across the release packages. No further changes are needed here.

packages/plugins/datasource/package.json (1)

3-3: Version Bump to 2.4.0:
The package version for @opentiny/tiny-engine-plugin-datasource is now "2.4.0". This update is part of the overall version synchronisation. Please verify that any downstream systems that depend on this version update are appropriately managed.

packages/plugins/tutorial/package.json (1)

3-3: Updated Package Version to 2.4.0:
The @opentiny/tiny-engine-plugin-tutorial package now reflects version "2.4.0". This change is in line with the release update. Ensure that the accompanying documentation and changelogs, if any, detail the updates or potential breaking changes for end users.

packages/toolbars/logout/package.json (1)

3-3: Version Number Updated to 2.4.0:
The updated version "2.4.0" for the @opentiny/tiny-engine-toolbar-logout package maintains consistency with the rest of the release. Double-check that any tools or pipelines referencing the version number are updated accordingly.

packages/plugins/help/package.json (1)

3-3: Version Bump Confirmed for Help Plugin
The version has been updated to "2.4.0" as part of the coordinated release. The change is straightforward and consistent with the release process.

packages/toolbars/themeSwitch/package.json (1)

3-3: Consistent Version Update for Theme Switch Toolbar
The version field is correctly updated to "2.4.0". This maintains alignment with the overall release version without affecting other configurations.

packages/plugins/schema/package.json (1)

3-3: Schema Plugin Version Upgrade
The version is now "2.4.0", matching the new release requirements. There are no additional changes beyond this version bump.

packages/toolbars/view-setting/package.json (1)

3-3: View-Setting Toolbar Version Update
The package version has been updated to "2.4.0". This change is clear and consistent with all other packages in the release.

packages/toolbars/collaboration/package.json (1)

3-3: Collaboration Toolbar Version Increment
The version is correctly updated to "2.4.0" in this package, ensuring consistency with the overall release strategy.

packages/settings/design/package.json (1)

3-3: Version Update Confirmed.
The version field has been correctly updated to "2.4.0", aligning with the new release. This change is simple and follows the coordinated version bump across packages.

packages/toolbars/fullscreen/package.json (1)

3-3: Version Bump Verified.
The version is updated to "2.4.0" as required by the release. The update is consistent with the other package changes and maintains proper semver progression.

packages/toolbars/lock/package.json (1)

3-3: Version Update Check Passed.
The version field is correctly updated to "2.4.0". The update is straightforward, and all ancillary metadata (like repository directory and dependencies) remain unchanged and valid.

packages/webcomponent/package.json (1)

3-3: Consistent Version Bump.
The version has been updated to "2.4.0" as expected. This change fits within the overall coordinated version update plan and maintains consistency with other packages.

packages/layout/package.json (1)

3-3: Version Increment Confirmed.
The package version has been successfully updated from "2.3.0" to "2.4.0" (as indicated by the version bump on line 3). All other metadata looks consistent, ensuring seamless integration into the new release.

packages/plugins/page/package.json (1)

3-3: Version bump update applied to "2.4.0".
Changing the version number to "2.4.0" correctly reflects the current release. Please ensure that any dependent components or integrations verify compatibility with this new version.

packages/plugins/i18n/package.json (1)

3-3: Version updated to "2.4.0".
This update is consistent with the coordinated release versioning across packages. Double-check that any scripts or tooling that reference this version number are updated accordingly.

packages/vue-generator/package.json (1)

3-3: Package version bumped to "2.4.0".
The version change matches the intended release. Ensure that the upgrade in this package does not introduce any incompatibilities with its consumers, especially given the extended test and build scripts.

packages/plugins/state/package.json (1)

3-3: Version bump to "2.4.0" confirmed.
The update reflects the proper release version for the state plugin. It is advisable to verify that any caching mechanisms or dependency resolutions in your build process acknowledge this change.

packages/design-core/package.json (1)

3-3: Design-core package version updated to "2.4.0".
This main package’s version bump is in line with the release cycle. Please ensure that all downstream dependencies, including references to internal “workspace:*” versions, remain in sync following this update.

packages/plugins/i18n/src/Main.vue (1)

56-56: UI adjustment to selection column width

The width of the selection column has been adjusted from 44px to 42px. This minor adjustment likely improves the visual alignment or spacing in the internationalization resource grid.

packages/toolbars/breadcrumb/package.json (1)

3-3: Version bump for v2.4.0 release

The package version has been updated from 2.3.0 to 2.4.0 as part of a coordinated version update across multiple packages in the repository.

packages/toolbars/generate-code/package.json (1)

3-3: Version bump for v2.4.0 release

The package version has been updated from 2.3.0 to 2.4.0 as part of a coordinated version update across multiple packages in the repository.

packages/canvas/render/src/runner.ts (1)

69-69:

Details

✅ Verification successful

Enhanced API access in lifecycle hook

The appCreated lifecycle hook now receives the renderer API as a second parameter, providing more capabilities to the hook. This enhancement allows implementations to access the rendering APIs for more complex configurations during app initialization.


🏁 Script executed:

#!/bin/bash
# Check if there are any implementations of appCreated in the codebase that might need to be updated

echo "Searching for appCreated implementations:"
rg -A 3 -B 3 "appCreated\s*[:=]" --type js --type ts --type vue

Length of output: 186


Enhanced Lifecycle Hook: Renderer API Pass-Through Verified

The update in packages/canvas/render/src/runner.ts at line 69 now correctly passes the renderer API as a second parameter to appCreated. An extended search—including Vue files using a custom file type addition—did not reveal any other implementations of appCreated that might be affected by this change. Please ensure manual verification if you suspect any edge-case usage, but the current evidence supports that this enhancement is localized and safe.

packages/settings/styles/src/js/index.ts (1)

1-14: Well-structured service implementation for style management

This new file creates a well-defined style service using the established pattern in the engine. The service makes proper use of the META_SERVICE constant for identification, exposes the useStyle APIs, and initializes a style panel watcher.

packages/layout/src/styles/vars.less (1)

15-15: CSS variable rename improves semantics

The replacement of --te-layout-setting-bg-color-hover with --te-layout-panel-active-color maintains the same value while providing a clearer name that better describes its purpose.

packages/settings/styles/index.ts (1)

15-15: Clean integration of the StyleService

The changes properly integrate the new StyleService into the module's exports, making it available both in the default export's metas array and as a named export.

Also applies to: 20-20, 24-24

packages/plugins/i18n/src/composable/useTranslate.ts (1)

72-72: Improved robustness for i18n content handling

Adding a fallback to an empty string ('') for missing language entries prevents potential issues with undefined values in the translation system. This defensive programming approach ensures that contents always has a string value for each language.

packages/layout/src/DesignSettings.vue (2)

201-201: CSS variable standardization update

Changed the background color variable from --ti-lowcode-common-component-bg to --te-layout-common-bg-color, maintaining consistent naming conventions across the project.


343-347: Updated animation color variables

Changed the glow animation box-shadow colors from --ti-lowcode-canvas-handle-hover-bg to --te-layout-panel-active-color for both keyframes states, keeping consistent with the new variable naming pattern.

packages/engine-cli/template/designer/env/.env.alpha (1)

4-7:

Details

❓ Verification inconclusive

Updated CDN configuration

Switched from unpkg.com to npmmirror.com CDN, which is a good optimization for regional performance, especially for users in China. The additional VITE_CDN_TYPE parameter properly identifies the CDN type to ensure correct URL formatting.


🏁 Script executed:

#!/bin/bash
# Verify if this change is consistent across other environment files
echo "Checking for consistent CDN configuration across environment files:"
fd -g ".env.*" packages/engine-cli/template/designer/env/ --exec grep -l "VITE_CDN" {} \; | xargs cat

Length of output: 457


Attention: Verify CDN Configuration Consistency

The update in packages/engine-cli/template/designer/env/.env.alpha switching the CDN from unpkg.com to npmmirror.com looks correct and should improve regional performance. However, the verification script did not include hidden files, so it wasn’t able to check all relevant environment files. Please update the verification command to include the -H flag so that hidden files (like .env.alpha) are processed. For example:

#!/bin/bash
echo "Checking for consistent CDN configuration across environment files:"
fd -H -g ".env.*" packages/engine-cli/template/designer/env/ --exec grep -l "VITE_CDN" {} \; | xargs cat

Verify that all relevant environment files contain the updated CDN configuration.

packages/settings/styles/src/components/spacing/SpacingGroup.vue (2)

392-392: Added watch import

Added import for the watch function from Vue to support the new reactive watcher added below.


484-493: Added reactive style watcher

Added a watcher to synchronize the property value in the modal when the style object changes externally. This is an important enhancement for user experience, ensuring the UI stays in sync with the underlying data model when changes occur from outside this component.

packages/canvas/container/src/keyboard.ts (1)

146-157: Enhanced copy operation with validation checks

Added important validation logic to the copy operation:

  1. Early return if no nodes are selected
  2. Verification that all selected nodes are valid (not empty) before copying

This defensive programming approach prevents potential errors when copying invalid selections and improves the overall robustness of the canvas clipboard functionality.

packages/engine-cli/template/designer/env/.env.development (1)

4-7: CDN configuration updated to use registry.npmmirror.com

The changes switch the CDN from unpkg.com to registry.npmmirror.com and add the required CDN type configuration. This is a good change, especially for users in regions where unpkg.com might have performance issues.

packages/settings/styles/src/components/classNamesContainer/index.vue (1)

170-171: Added immediate execution to className watcher

Adding { immediate: true } ensures that the watcher executes upon initialization, which properly sets the initial state of classNameState.curSelector and classNameState.curSelectorEditable without waiting for a change event.

packages/plugins/robot/src/Main.vue (2)

470-470: Improved UX with cursor: pointer

Adding the cursor: pointer style to the chat title dropdown improves user experience by providing a visual cue that the element is clickable.


577-577: Increased CSS selector specificity

Changed from .chat-submit to .chat-submit.chat-submit to increase the selector's specificity, ensuring these styles take precedence over potentially conflicting styles without using !important.

packages/canvas/DesignCanvas/src/DesignCanvas.vue (1)

276-276: Added optional chaining for safer API access

The addition of the optional chaining operator (?.) when accessing getPageById method is a defensive programming improvement that prevents potential runtime errors if getMetaApi(META_APP.AppManage) returns null or undefined.

packages/canvas/render/src/RenderMain.ts (3)

66-66: Enhanced API surface with additional accessor

The getConditions method is now being destructured from activePageContext alongside the existing setCondition. This provides read access to the conditions previously only settable through the API.


78-79: Expanded API surface with getter methods

Both getController and getConditions are now exposed through the setCurrentApi, making these methods available to external components. This is a good enhancement that provides more flexibility to consumers of this API.


279-280: Code reorganization for improved clarity

The pageRenderer = getRenderer() line has been moved up in the code. While this doesn't change functionality, it improves code organization by positioning the variable declaration closer to where it's being used in the return statement.

packages/settings/styles/src/js/useStyle.ts (1)

344-346: Improved module initialization pattern

The updated export now includes initStylePanelWatch in the returned object, simplifying the module's initialization process. This change ensures the style panel watcher is consistently available when the module is used, rather than requiring conditional initialization by consumers.

packages/register/src/hooks.ts (2)

40-42: Added new style hook to hooks registry

The useStyle hook has been added to the HOOK_NAME constant, expanding the available hooks in the system. This follows the established pattern for hook registration.


65-65: Initialized style hook state

Added an entry for the useStyle hook in the hooksState object, which is necessary for the hook to function properly within the system.

packages/engine-cli/template/designer/env/.env.production (1)

4-7: CDN provider update with proper configuration

The change from unpkg.com to registry.npmmirror.com as the CDN provider is well-structured with the addition of the necessary configuration to specify the CDN type. The comment effectively explains when to use the VITE_CDN_TYPE variable.

packages/engine-cli/template/designer/package.json (1)

14-15: Version bump for the v2.4.0 release

The version update from 2.3.0 to 2.4.0 for all @opentiny packages is consistent, which is important for maintaining compatibility between related packages in the same ecosystem.

Also applies to: 26-27

packages/canvas/container/src/components/CanvasResize.vue (4)

13-13: Addition of lifecycle hooks for proper event handling

Added onMounted and onUnmounted lifecycle hooks to properly manage window resize event listeners.


93-94: Enhanced responsiveness with panel width tracking

Adding a reactive reference for the draggable panel and setting up a watcher for its width improves the component's responsiveness to panel size changes.


104-108: Improved panel resizing logic

The added logic properly identifies and tracks resizable panels, ensuring that the canvas scale is updated correctly when panel dimensions change.


140-150: Proper window resize event handling

The implementation of resize handling with appropriate lifecycle hooks ensures that:

  1. Event listeners are properly attached when the component is mounted
  2. Event listeners are cleaned up when the component is unmounted

This prevents memory leaks and improves performance by managing event listeners correctly.

packages/canvas/render/src/canvas-function/canvas-api.ts (4)

6-6: Updated import to include getter function

Added getController import to complement the existing setController, maintaining API symmetry.


11-12: Enhanced API interface design

Two key improvements:

  1. Added getConditions to IPageContextAPI for symmetry with setCondition
  2. Simplified ICanvasFunctionAPI definition by directly extending from the return type of useCustomRenderer

These changes make the API more complete and easier to maintain.


16-16: Added getter method to complement existing setter

Added getController to the ICanvasFunctionAPI interface to provide a complete API for controller management.


35-35: Implemented new getter methods in the API object

The implementation of getController and getConditions methods in the API object delegates to the current API instance, maintaining consistency with the existing pattern.

Also applies to: 38-38

packages/common/component/PluginPanel.vue (14)

124-124: Good type addition for ref element.

Adding explicit type annotation for the panel ref enhances type safety and helps prevent null reference errors.


127-127: Improved animation management with requestAnimationFrame ID tracking.

Adding a variable to track the requestAnimationFrame ID allows for proper cleanup and prevents animation frame queuing during rapid interactions.


134-138: Good practice defining an interface for injected state.

Creating a dedicated interface for the panel state ensures type safety when accessing injected values and their methods.


140-140: Good use of optional chaining for null safety.

Using optional chaining on the injected state prevents null reference errors when the state is not available.


154-163: Excellent refactoring of width update logic.

Encapsulating the panel width update logic in a dedicated function using requestAnimationFrame improves performance and code organization. The implementation properly handles bounds checking and cancelation of pending animation frames.


165-168: Simplified resize handlers with reusable logic.

The mouse move handlers now use the centralized updateWidth function, reducing code duplication and making maintenance easier.

Also applies to: 170-173


175-177: Improved responsiveness with faster throttling.

Reducing the throttle time from 50ms to 16ms (~60fps) makes the resizing operation feel much smoother without overwhelming the browser.


179-182: Good type definition for resizer elements.

Creating a reusable type alias for resizer elements improves code readability and maintainability.


188-197: Improved resizing visual feedback and cleanup.

Adding visual cues during resizing and properly cleaning up animation frames prevents memory leaks and improves user experience.


200-209: Better mouse event handling for right resizer.

The implementation now properly handles cursor style changes, adds visual indicators, and safely accesses the panel width with optional chaining.


216-224: Consistent cleanup in mouse event handlers.

Ensuring proper cleanup of animation frames and cursor styles in all event handlers is a good practice for preventing lingering effects.


227-236: Consistent implementation for left resizer.

The left resizer implementation mirrors the right resizer with the same improvements for visual feedback and safety checks.


329-348: Improved resizer styling and visual feedback.

The updated styling with pseudo-elements and transitions provides better visual feedback during interactions, making the resizing more intuitive for users.

Also applies to: 355-360, 361-368


370-390: Consistent styling for left resizer.

Applying the same styling improvements to the left resizer ensures a consistent user experience regardless of which side is being used for resizing.

Also applies to: 392-398

@chilingling chilingling merged commit 0118f15 into develop Apr 7, 2025
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants