Skip to content

Conversation

Hubert-Szczepanski-SAP
Copy link
Contributor

What this PR does / why we need it:

Adding functionality do delete managed resources.

image

Which issue(s) this PR fixes:
Fixes #

Special notes for your reviewer:

@Hubert-Szczepanski-SAP Hubert-Szczepanski-SAP changed the title Feat/deleting managed resources feat: deleting managed resources Sep 29, 2025
Copy link
Contributor

@Copilot Copilot AI left a 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.

@Hubert-Szczepanski-SAP Hubert-Szczepanski-SAP force-pushed the feat/deleting-managed-resources branch from 8bdb367 to 68609b0 Compare October 2, 2025 06:58
Copy link
Contributor

@andreaskienle andreaskienle left a 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. 🙌

lucasgoral
lucasgoral previously approved these changes Oct 3, 2025
Copy link
Contributor

@lucasgoral lucasgoral left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@andreaskienle andreaskienle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Hubert-Szczepanski-SAP Hubert-Szczepanski-SAP merged commit 0662013 into main Oct 7, 2025
5 checks passed
@Hubert-Szczepanski-SAP Hubert-Szczepanski-SAP deleted the feat/deleting-managed-resources branch October 7, 2025 08:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants