asadjan4611 opened a new issue, #17947: URL: https://github.com/apache/dolphinscheduler/issues/17947
### Search before asking - [x] I had searched in the [issues](https://github.com/apache/dolphinscheduler/issues?q=is%3Aissue) and found no similar feature requirement. ### Description #### Current Problem When deleting workflow definitions in DolphinScheduler, the current confirmation dialog (`NPopconfirm`) is minimal and doesn't provide sufficient context to prevent accidental deletions. While there is a basic confirmation dialog, it lacks: 1. **Workflow name display**: Users cannot see which specific workflow they are about to delete 2. **Irreversibility warning**: No clear indication that the deletion is permanent (unless version history exists) 3. **Enhanced confirmation**: The current dialog may not be prominent enough for critical operations This creates a risk of accidental data loss, especially when: - Users are working quickly and may click without reading - Multiple workflows are visible and users might delete the wrong one - UI lag causes unintended double-clicks - Users are managing many workflows and lose track of which one they selected #### Proposed Improvement Enhance the delete confirmation dialog to include: 1. **Workflow identification**: Display the workflow name prominently in the confirmation message (e.g., "Are you sure you want to delete workflow 'My Important Workflow'?") 2. **Clear warning message**: Add a warning about the action being irreversible, with information about recovery options if available (e.g., "This action cannot be undone. The workflow will be permanently deleted.") 3. **Enhanced visual design**: Make the confirmation dialog more prominent with: - Warning icon or color scheme - Clear distinction between "Cancel" and "Delete" buttons - Possibly require typing the workflow name for critical workflows (optional enhancement) 4. **Consistency**: Ensure the same enhanced confirmation pattern is applied to: - Single workflow deletion - Batch workflow deletion (if applicable) - All workflow-related delete operations #### Benefits - **Prevents accidental deletions**: Users will have clear context about what they're deleting - **Improves user confidence**: Users can safely manage workflows without fear of mistakes - **Follows UX best practices**: Aligns with modern web application patterns for destructive actions - **Reduces support burden**: Fewer requests for workflow recovery - **Better enterprise readiness**: Critical for production environments where workflows represent important business processes #### Implementation Approach 1. Enhance the existing `NPopconfirm` component in `table-action.tsx` to include workflow name in the confirmation message 2. Update the confirmation text to include irreversibility warning 3. Consider using a more prominent modal dialog (`n-modal`) for critical deletions 4. Ensure consistent implementation across all delete operations 5. Update i18n translations for the enhanced messages #### Related Code Locations - `dolphinscheduler-ui/src/views/projects/workflow/definition/components/table-action.tsx` (line 276-297) - `dolphinscheduler-ui/src/views/projects/workflow/definition/use-table.ts` (deleteWorkflow function) - `dolphinscheduler-ui/src/components/modal/index.tsx` (if using custom modal) #### Example Implementation The confirmation dialog should display something like: ``` ⚠️ Delete Workflow Are you sure you want to delete the workflow "My Important Workflow"? This action cannot be undone. The workflow and all its associated data will be permanently deleted. [Cancel] [Delete Workflow] ``` **Note**: This improvement follows the same pattern as other confirmation dialogs in the codebase (like the release/offline confirmation) but enhances them with better context and warnings for destructive operations. --- ### Are you willing to submit a PR? - [x] Yes I am willing to submit a PR! ### Code of Conduct - [x] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
