asadjan4611 opened a new pull request, #18027:
URL: https://github.com/apache/dolphinscheduler/pull/18027

   ## Description
   
   This PR resolves issue #17947 by enhancing the workflow deletion 
confirmation dialog to display the workflow name and an irreversibility 
warning, preventing accidental deletions.
   
   ### Changes Made
   
   **Files Modified:**
   - 
`dolphinscheduler-ui/src/views/projects/workflow/definition/components/table-action.tsx`
   - `dolphinscheduler-ui/src/locales/en_US/project.ts`
   - `dolphinscheduler-ui/src/locales/zh_CN/project.ts`
   
   ### What's Changed
   
   1. **Enhanced Delete Confirmation Dialog:**
      - Modified the `NPopconfirm` content in `table-action.tsx` to display the 
workflow name dynamically
      - Added a red warning message: "This action cannot be undone. The 
workflow and its associated data will be permanently deleted."
      - Maintained existing confirmation behavior and APIs
   
   2. **Internationalization (i18n):**
      - Added new translation key `delete_irreversible` in English locale
      - Added corresponding Chinese translation in `zh_CN/project.ts`
      - Ensures consistency across all languages
   
   ### Why This Change?
   
   **Problem Addressed:**
   - Users could accidentally delete workflows without clear context
   - The confirmation dialog lacked the workflow name, creating confusion when 
multiple workflows were visible
   - No clear indication of action irreversibility
   
   **Solution:**
   - Displays the workflow name prominently in the confirmation message
   - Shows an irreversible-action warning to increase user awareness
   - Follows UX best practices for destructive operations
   - Minimal code changes, reuses existing UI components and patterns
   
   ### Testing
   
   **Manual Testing Steps:**
   1. Navigate to **Project → Workflows → Definitions**
   2. Click the delete (trash) icon for any workflow
   3. Verify the confirmation dialog displays:
      - The workflow name
      - The irreversibility warning message
   4. Test both `Cancel` and `Confirm` actions work correctly
   5. Verify deletion executes successfully on confirmation
   


-- 
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]

Reply via email to