-
Notifications
You must be signed in to change notification settings - Fork 1
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
Remove delete option for local cluster #320
Conversation
Reviewer's Guide by SourceryThis pull request removes the delete option for local clusters and refactors the ExtraButton component to conditionally render options based on cluster type and ownership. It also includes minor code formatting changes. Class diagram for ExtraButton component refactorclassDiagram
class ExtraButton {
+onEdit()
+onDelete()
+onShowLogs()
+item: CombinedBaseType
}
class ResourceExtraAction {
+options: IResourceExtraItem[]
}
ExtraButton --> ResourceExtraAction
class IResourceExtraItem {
+key: String
+label: String
+icon: ReactNode
+type: String
+onClick: Function
+className: String
}
class CombinedBaseType {
+type: String
+ownedBy: String
}
ExtraButton --> CombinedBaseType
ExtraButton --> IResourceExtraItem
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @nxtCoder19 - I've reviewed your changes - here's some feedback:
Overall Comments:
- The PR description lacks context. Please provide an explanation for why the delete option is being removed for local clusters.
- The new condition
item.ownedBy === null
for the delete option needs explanation. Consider adding a comment in the code or mentioning it in the PR description.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
key: 'delete', | ||
className: '!text-text-critical', |
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.
issue (code-quality): Delete should only be used for object properties. (only-delete-object-properties
)
Explanation
The `delete` operator is intended for use in deleting the properties of objects, and does not have meaningful behaviour otherwise.Remove delete option for local cluster
Remove delete option for local cluster
Remove delete option for local cluster
Summary by Sourcery
Remove the 'Delete' option for local clusters by refactoring the ExtraButton component to conditionally display the option based on cluster type and ownership.
Enhancements: