[Improvement][UI] Add confirmation dialog before deleting workflow definitions to prevent accidental deletions
Search before asking
- [x] 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?
- [x] Yes I am willing to submit a PR!
Code of Conduct
- [x] I agree to follow this project's Code of Conduct
I think we don't need this since we've already have a mechanism to delete two confirmations.
I think we don't need this since we've already have a mechanism to delete two confirmations.
But from a user point of view, I was thinking that showing the workflow name in the confirmation dialog could help avoid confusion and prevent accidental deletions, especially when many workflows are listed together.
Please correct me if I’m wrong.
@SbloodyS Thanks for the feedback.
I understand there are already two confirmation steps. My proposal is a small UX improvement on top of that: include the workflow name in the confirm content (e.g., “Delete ‘xxx’?”) so users can verify they picked the right one when many rows are shown.
If you still feel it’s unnecessary, I’m happy to close the issue. Otherwise I can submit a small PR limited to i18n + the confirm text only (no behavior change).
But from a user point of view, I was thinking that showing the workflow name in the confirmation dialog could help avoid confusion and prevent accidental deletions, especially when many workflows are listed together.
Please correct me if I’m wrong.
Yes. Showing workflow name in the confirmation dialog is a better approach.
I’d like to work on this issue if it’s not assigned. Also, tell me if i should provide translations separately in both English and Chinese, or is it acceptable to use the English text in both the locale files?
@SbloodyS okay can you please assign this issue to me? I wanna to work on it.
I’ve actually prepared a PR that adds the workflow name to the confirmation dialog (i18n + UI text only).
If @asadjan4611 would still like to work on this issue, I’m completely fine with that. I can either submit my PR or we can coordinate — whatever the maintainers prefer.
Sorry @iampratap7997-dot, I already created a solution when I first raised this issue. At this point, I only need to update my solution. @SbloodyS, the rest is up to you.
Thanks for clarifying. I’ll leave it to you. If any other changes or help are needed, I’d be happy to help.
okay Thanks @iampratap7997-dot , if any need i'll take help from you
I've assigned to you. @asadjan4611