Conversation
…nother parent page (#1264)
WalkthroughThis pull request applies a series of systematic changes across the repository. Most notably, version numbers in numerous Changes
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)
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
Possibly related PRs
Poem
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
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 functionThe
useStylefunction 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
UseStyleApitype 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
📒 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
textandtext-dimtotip-textandtip-text-dimmakes 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, andheightproperties to the.tipclass, 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
isDefaulttofalsewhen 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
awaitwith a Promise chain that conditionally executeseditPageonly 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 thesettingDefaultPagefunction, ensuring thateditPageis 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: AddinginheritAttrs: falseto 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_NAMEandactiveSettingfromuseLayout(). This reduces redundancy and improves readability.
158-158: Better code consistency using constants.Replacing hardcoded string 'props' with
PLUGIN_NAME.Propsmakes the code more maintainable and less prone to typo errors.
161-161: Better code consistency using constants.Replacing hardcoded string 'event' with
PLUGIN_NAME.Eventimproves 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 tsLength 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. inpackages/common/vite.config.tswhere it’s imported and used withglob.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 tsLength of output: 112
Style Service Constant Addition Verified
The new
Styleconstant defined as'engine.service.style'inpackages/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 5Length 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 withparams.page_contentas payload. Our verification confirms that multiple parts of the codebase (e.g., inpackages/toolbars/save/src/Main.vueandpackages/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 CorrectlyThe 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 ConfirmedThe 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 VerifiedThe 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 UpdateThe 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 SuccessfulThe 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:
Theversionfield has been updated from the previous version (presumably "2.3.0") to "2.4.0" for the@opentiny/tiny-engine-plugin-materialspackage. 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-settinghas 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-datasourceis 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-tutorialpackage 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-logoutpackage 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.
Theversionfield 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.
Theversionfield 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 widthThe 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 releaseThe 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 releaseThe 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
appCreatedlifecycle 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 vueLength of output: 186
Enhanced Lifecycle Hook: Renderer API Pass-Through Verified
The update in
packages/canvas/render/src/runner.tsat line 69 now correctly passes the renderer API as a second parameter toappCreated. An extended search—including Vue files using a custom file type addition—did not reveal any other implementations ofappCreatedthat 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 managementThis 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 semanticsThe replacement of
--te-layout-setting-bg-color-hoverwith--te-layout-panel-active-colormaintains 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 StyleServiceThe 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 handlingAdding 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 thatcontentsalways has a string value for each language.packages/layout/src/DesignSettings.vue (2)
201-201: CSS variable standardization updateChanged the background color variable from
--ti-lowcode-common-component-bgto--te-layout-common-bg-color, maintaining consistent naming conventions across the project.
343-347: Updated animation color variablesChanged the glow animation box-shadow colors from
--ti-lowcode-canvas-handle-hover-bgto--te-layout-panel-active-colorfor 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_TYPEparameter 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 catLength of output: 457
Attention: Verify CDN Configuration Consistency
The update in
packages/engine-cli/template/designer/env/.env.alphaswitching 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-Hflag 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 catVerify that all relevant environment files contain the updated CDN configuration.
packages/settings/styles/src/components/spacing/SpacingGroup.vue (2)
392-392: Added watch importAdded import for the
watchfunction from Vue to support the new reactive watcher added below.
484-493: Added reactive style watcherAdded 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 checksAdded important validation logic to the copy operation:
- Early return if no nodes are selected
- 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.comThe 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 watcherAdding
{ immediate: true }ensures that the watcher executes upon initialization, which properly sets the initial state ofclassNameState.curSelectorandclassNameState.curSelectorEditablewithout waiting for a change event.packages/plugins/robot/src/Main.vue (2)
470-470: Improved UX with cursor: pointerAdding 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 specificityChanged from
.chat-submitto.chat-submit.chat-submitto 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 accessThe addition of the optional chaining operator (
?.) when accessinggetPageByIdmethod is a defensive programming improvement that prevents potential runtime errors ifgetMetaApi(META_APP.AppManage)returns null or undefined.packages/canvas/render/src/RenderMain.ts (3)
66-66: Enhanced API surface with additional accessorThe
getConditionsmethod is now being destructured fromactivePageContextalongside the existingsetCondition. This provides read access to the conditions previously only settable through the API.
78-79: Expanded API surface with getter methodsBoth
getControllerandgetConditionsare now exposed through thesetCurrentApi, 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 clarityThe
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 patternThe updated export now includes
initStylePanelWatchin 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 registryThe
useStylehook has been added to theHOOK_NAMEconstant, expanding the available hooks in the system. This follows the established pattern for hook registration.
65-65: Initialized style hook stateAdded an entry for the
useStylehook in thehooksStateobject, 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 configurationThe 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 releaseThe 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 handlingAdded
onMountedandonUnmountedlifecycle hooks to properly manage window resize event listeners.
93-94: Enhanced responsiveness with panel width trackingAdding 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 logicThe 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 handlingThe implementation of resize handling with appropriate lifecycle hooks ensures that:
- Event listeners are properly attached when the component is mounted
- 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 functionAdded
getControllerimport to complement the existingsetController, maintaining API symmetry.
11-12: Enhanced API interface designTwo key improvements:
- Added
getConditionstoIPageContextAPIfor symmetry withsetCondition- Simplified
ICanvasFunctionAPIdefinition by directly extending from the return type ofuseCustomRendererThese changes make the API more complete and easier to maintain.
16-16: Added getter method to complement existing setterAdded
getControllerto theICanvasFunctionAPIinterface to provide a complete API for controller management.
35-35: Implemented new getter methods in the API objectThe implementation of
getControllerandgetConditionsmethods 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
English | 简体中文
PR
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
Background and solution
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
Chores
UI Enhancements
Reliability Improvements
Configuration Updates