-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add confirm dialog before Permanently delete #67824
Add confirm dialog before Permanently delete #67824
Conversation
This reverts commit 63f81c1.
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
@karthick-murugan, entity actions already have built-in support for confirmation modals. See |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! This looks good code wise. I've left a comment regarding the copy. Also it would be good to rebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thank you!
What?
Fixes #60383, where the "Permanently Delete" action for trashed posts in the WordPress editor was not functioning as expected. This PR improves the logic and introduces a confirmation modal to ensure users can confirm their actions before permanently deleting posts.
Why?
The current implementation of the "Permanently Delete" action did not provide a clear user experience and lacked safeguards like a confirmation modal. This could lead to unintentional deletions. By addressing this issue, the PR ensures a better and more accessible user experience while reducing the likelihood of errors.
How?
Added a modal confirmation step to confirm the deletion of selected posts.
Testing Instructions
Screenshots or screencast
REC-20241211165122.mp4