feat:Drag Handle Check#778
Conversation
WalkthroughThe changes introduce enhancements to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant PluginPanel
participant useLayout
User->>PluginPanel: Interacts with plugin
PluginPanel->>useLayout: getPluginByLayout(fixedName)
useLayout-->>PluginPanel: Returns alignment
PluginPanel->>PluginPanel: Update isLeftResizer, isRightResizer
PluginPanel->>User: Render updated view
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 using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 1
Outside diff range, codebase verification and nitpick comments (1)
packages/common/component/PluginPanel.vue (1)
73-73: Approve the changes and suggest adding comments for clarity.The inclusion of
getPluginByLayoutin thesetupfunction and the creation ofisLeftResizerandisRightResizerare well-implemented. These changes dynamically adjust the visibility of resizers based on the plugin's layout alignment. Consider adding comments to explain how these reactive references are derived from the alignment data for better maintainability.+ // Determine the alignment of the plugin to set resizer visibility const align = ref(getPluginByLayout(props.fixedName)) const isLeftResizer = ref(align.value.includes('left')) const isRightResizer = ref(align.value.includes('right'))Also applies to: 112-115
Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Files selected for processing (3)
- packages/common/component/PluginPanel.vue (4 hunks)
- packages/controller/src/useLayout.js (2 hunks)
- packages/design-core/config/addons.js (1 hunks)
Files skipped from review due to trivial changes (1)
- packages/design-core/config/addons.js
Additional comments not posted (2)
packages/controller/src/useLayout.js (2)
176-176: LGTM!The function
changePluginWidthcorrectly checks for the existence of the plugin before updating its width.
183-183: LGTM!The function
getPluginByLayoutcorrectly defaults to 'leftTop' if the alignment property is not defined, enhancing the functionality by allowing access to layout-related properties of plugins.
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?
feat:Drag Handle Check
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information
Summary by CodeRabbit
New Features
Bug Fixes
Chores