-
Notifications
You must be signed in to change notification settings - Fork 97
feat-AB-939 improve delete bp visibility #1273
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
Conversation
📝 WalkthroughWalkthroughBranches in the component tree now expose a right-click dropdown with a Delete action that emits a Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant Branch as BuilderSidebarComponentTreeBranch
participant Tree as BuilderSidebarComponentTree
participant Actions as useComponentActions
User->>Branch: right-click → select "Delete" (componentId)
Branch->>Branch: handleDropdownSelect -> emit delete(componentId)
Branch-->>Tree: forward delete(componentId)
Tree->>Actions: handleComponentDelete(componentId)
Actions-->>Tree: removeComponentSubtree(componentId)
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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. Comment |
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: 1
🤖 Fix all issues with AI agents
In `@src/ui/src/builder/sidebar/BuilderSidebarComponentTreeBranch.vue`:
- Around line 218-221: The delete emission in handleDropdownSelect isn't guarded
so a delete action could remove protected components; update
handleDropdownSelect to first check the deletion permission (use the existing
isDeleteAllowed flag/function) and only call emits("delete", props.componentId)
when isDeleteAllowed returns true (or is truthy), otherwise ignore the action or
emit a safe fallback; ensure you reference handleDropdownSelect,
isDeleteAllowed, emits and props.componentId when adding the conditional check.
7f4c688 to
0e139d8
Compare
Previously merged PR had no functionality to actually delete the component subtree of blueprints. I added a listener in the BuilderSidebarComponentTree for a delete event in BuilderSidebarComponentTreeBranch which calls the function to delete the subtree, this mimics the pattern in BuilderCodeSidePanel to delete python files
Summary by CodeRabbit
New Features
Bug Fixes / Improvements
✏️ Tip: You can customize this high-level summary in your review settings.