-
Notifications
You must be signed in to change notification settings - Fork 5k
Description
Search before asking
- I had searched in the issues 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:
- Workflow name display: Users cannot see which specific workflow they are about to delete
- Irreversibility warning: No clear indication that the deletion is permanent (unless version history exists)
- 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:
-
Workflow identification: Display the workflow name prominently in the confirmation message (e.g., "Are you sure you want to delete workflow 'My Important Workflow'?")
-
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.")
-
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)
-
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
- Enhance the existing
NPopconfirmcomponent intable-action.tsxto include workflow name in the confirmation message - Update the confirmation text to include irreversibility warning
- Consider using a more prominent modal dialog (
n-modal) for critical deletions - Ensure consistent implementation across all delete operations
- 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?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct