-
Notifications
You must be signed in to change notification settings - Fork 3
feat: deleting managed resources #301
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
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.
Pull Request Overview
This PR adds functionality to delete managed resources in the application. It introduces a comprehensive delete workflow with force deletion options and confirmation dialogs to ensure safe resource deletion.
Key changes:
- Adds new delete dialog component with force deletion capability
- Updates type definitions to support resource deletion operations
- Refactors existing delete confirmation form into reusable component
Reviewed Changes
Copilot reviewed 12 out of 13 changed files in this pull request and generated 4 comments.
Show a summary per file
File | Description |
---|---|
src/lib/shared/types.ts | Extends type definitions with spec.names and metadata fields needed for resource deletion |
src/lib/api/useApiResource.ts | Adds useCRDItemsMapping hook for mapping resource kinds to their plural forms |
src/lib/api/types/crate/deleteResource.ts | Defines API functions for deleting and force-deleting managed resources |
src/components/Helper/getPluralKind.ts | Helper function to get plural form of resource kind from mapping |
src/components/Dialogs/ManagedResourceDeleteDialog.tsx | New dialog component for managed resource deletion with force deletion option |
src/components/Dialogs/ManagedResourceDeleteDialog.module.css | Styling for the delete dialog |
src/components/Dialogs/DeleteConfirmationForm.tsx | Extracted reusable confirmation form component |
src/components/Dialogs/DeleteConfirmationDialog.tsx | Refactored to use extracted confirmation form component |
src/components/Dialogs/DeleteConfirmationDialog.cy.tsx | Updated test selectors to match new form component |
src/components/ControlPlane/ManagedResourcesActionMenu.tsx | Action menu component for resource operations |
src/components/ControlPlane/ManagedResources.tsx | Integrates delete functionality into managed resources table |
public/locales/en.json | Adds translation keys for delete functionality |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
8bdb367
to
68609b0
Compare
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.
Good job with the deletion requests, as far as I can see, they work. 👍🏻
I have a few remarks that we should tackle, especially:
- handling of the transition state (
deletingItems
) - responsibilities of the confirmation dialog
- menu + menu item vs. direct deletion button
See below for details. 🙌
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.
LGTM!
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.
👍
What this PR does / why we need it:
Adding functionality do delete managed resources.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer: