Repository navigation
Trash: Show progress while posts move to the trash - #1023
Merged
Merged
Conversation
In a classic list window, Trash, Restore and Delete Permanently only update the list once the server is done, which can take a few seconds with nothing on screen. The rows they act on now dim, the list ignores clicks until the next page arrives, and row actions light the window's activity indicator like bulk actions already did. A second click no longer sends the action again, which could end on an error page. In the native Posts and Pages windows, the bulk action button shows as busy, the selected stories dim, and a second click does nothing while the action runs. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
Moving a post to the trash now shows that it's in progress until the list updates:
A second click during the wait no longer sends the action again. In the classic list, clicking Apply twice on a bulk trash could end on WordPress's "Error in moving the item to Trash." page. In the native window, a second click asked to confirm again.
The recordings below add a 3 second delay per trashed post on a local site, to stand in for a slow host. Each one shows trunk first, then this branch.
Classic Posts list
trash-progress-classic.webm
Native Posts window (Beta)
trash-progress-native.webm
Not included: right after a trash, the list refreshes itself again and drops the "moved to the Trash. Undo" notice. That happens on trunk too and is left for a separate PR.
Why are these changes being made?
Users told us that moving something to the trash takes a few seconds and at first looks like nothing is happening.
Testing Instructions
Trashing is fast on a local site, so slow it down first. Add
wp-content/mu-plugins/slow-trash.php:Classic list (the default):
Native window (Beta):
🤖 Generated with Claude Code