-
Notifications
You must be signed in to change notification settings - Fork 271
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: 隐藏画布根节点的包裹元素的操作选项 #492
fix: 隐藏画布根节点的包裹元素的操作选项 #492
Conversation
WalkthroughThe recent updates introduce conditional checks and unique property additions to enhance the functionality and robustness of the Changes
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 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 as PR comments)
Additionally, you can add CodeRabbit Configration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
Review Details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (2)
- packages/canvas/src/components/container/CanvasAction.vue (1 hunks)
- packages/canvas/src/components/render/RenderMain.js (1 hunks)
Additional comments not posted (2)
packages/canvas/src/components/render/RenderMain.js (1)
383-383
: Ensure the new 'data-id' property does not interfere with existing functionality.Verification successful
The new 'data-id' property added to the root node in
RenderMain.js
does not interfere with existing functionality. The usages of 'data-id' inCanvasAction.vue
andPropertyList.vue
are contextually distinct and should not cause any conflicts.
- In
CanvasAction.vue
, the 'data-id' property is used in a conditional check to determine if the schema's 'data-id' is 'root-container'.- In
PropertyList.vue
, the 'data-id' property is used in av-for
directive to set a custom attribute on list items.Both usages are compatible with the new property addition.
Scripts Executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the new 'data-id' property does not interfere with existing functionality. # Test: Search for any potential conflicts or issues caused by the new property. rg --type javascript $'data-id'Length of output: 65
Script:
#!/bin/bash # Description: Verify that the new 'data-id' property does not interfere with existing functionality. # Test: Search for any potential conflicts or issues caused by the new property. rg --type js 'data-id'Length of output: 413
Script:
#!/bin/bash # Extract the relevant code snippet from CanvasAction.vue where 'data-id' is used. rg --type vue 'data-id' -A 5 -B 5 packages/canvas/src/components/container/CanvasAction.vue # Extract the relevant code snippet from PropertyList.vue where 'data-id' is used. rg --type vue 'data-id' -A 5 -B 5 packages/settings/design/src/components/PropertyList.vueLength of output: 238
Script:
#!/bin/bash # Extract the relevant code snippet from CanvasAction.vue where 'data-id' is used. rg 'data-id' -A 5 -B 5 packages/canvas/src/components/container/CanvasAction.vue # Extract the relevant code snippet from PropertyList.vue where 'data-id' is used. rg 'data-id' -A 5 -B 5 packages/settings/design/src/components/PropertyList.vueLength of output: 813
packages/canvas/src/components/container/CanvasAction.vue (1)
231-234
: Ensure the new logic correctly hides operation options for the root node without affecting other functionalities.
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
pr #259 合并后,画布根节点使用div包裹了一层,来自定义根节点的样式
What is the current behavior?
当根节点样式设置了margin时,选中根节点div会展示出操作选项,实际上这些操作选项是无效的。(根节点无法移动、复制、删除)
![image](https://private-user-images.githubusercontent.com/26267243/331448379-6cdea672-1b66-4762-a24a-b3a403070415.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MDc2NTUsIm5iZiI6MTcyNDcwNzM1NSwicGF0aCI6Ii8yNjI2NzI0My8zMzE0NDgzNzktNmNkZWE2NzItMWI2Ni00NzYyLWEyNGEtYjNhNDAzMDcwNDE1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI2VDIxMjIzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTRkNTUxOTkxOGY2ODU4YmE4YmQzMDFlZDY0N2U4MmUzMmU1NzZiZTZmYjU5ZWViZGY2NzlmNTI1NTYwZjc4YTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Of8IWRgIDbAkJTYjhOKhBGTSa6N4geupUj21APP_abw)
What is the new behavior?
隐藏根节点div的操作选项
![image](https://private-user-images.githubusercontent.com/26267243/331448746-aaadd717-add6-488e-9641-e95f2ed36693.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQ3MDc2NTUsIm5iZiI6MTcyNDcwNzM1NSwicGF0aCI6Ii8yNjI2NzI0My8zMzE0NDg3NDYtYWFhZGQ3MTctYWRkNi00ODhlLTk2NDEtZTk1ZjJlZDM2NjkzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjYlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODI2VDIxMjIzNVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPThlYjE3Y2NiOGRlNTc2OWEzMjA0ZmRmYWJhMjViMDExYTdlYjdiYjIzNjFkNzk4NjcyYWRjMjliY2Q1YTViMjImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.g6EHG94W6igFLAJMU7PepcMET2YkM4dfXr6HpP7Mt2w)
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit