-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Remove trash button in post/page inspector #61792
Conversation
Should the trash button still have the destructive treatment? |
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. |
@@ -81,8 +81,6 @@ export { default as PostTaxonomiesPanel } from './post-taxonomies/panel'; | |||
export { default as PostTextEditor } from './post-text-editor'; | |||
export { default as PostTitle } from './post-title'; | |||
export { default as PostTitleRaw } from './post-title/post-title-raw'; | |||
export { default as PostTrash } from './post-trash'; | |||
export { default as PostTrashCheck } from './post-trash/check'; |
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.
These components should be kept here as they are public APIs.
This reverts commit c8a2b5a.
Probably not in this case because it isn't truly destructive (the post can be retrieved from trash). Also; no other menu items of this type (deleting template / patterns) are styled as destructive. Edit: I lied, the one in the dark details panel is destructive, but that one's being removed soon 😅 FWIW I've seen @jasmussen advocate not using 'destructive' colorisation because in some cultures red != destructive. It might be interesting to add some smarts so that color is applied to destructive actions based on |
Size Change: -33 B (0%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
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.
LGTM, thanks!
It's unclear if we'll be able to ship "Post Actions" with the next major WP release; the last Gutenberg version RC that goes in the core is scheduled for next week. I just wanted to note that we might have to restore this button. |
I do think we're using the "destructive" treatment without good semantics for when and what. Consider this screenshot showing a published post: Here, "move to trash" is denoted destructive, but "switch to draft" — arguably much more destructive on a production site — is not. Does that mean they should both be red? Or just Switch to draft? The color change is also not useful for people with color blindness, nor is its meaning universally destructive across the world. Perhaps most importantly, the color alone is not going to be the best safeguard against performing truly destructive actions (such as empty trash or, as noted, unpublish post). In those cases, an "are you sure" modal that informs you that this is destructive, would almost certainly be better. All that is to say that at the moment we are applying the color without a great heuristic, it's not clear it's that helpful to those who perceive color and recognize it as destructive, and in some cases the color is likely to simply be confusing: why is it red now? So more than anything, the color feels decorative rather than useful. Not a hill I'll die on, not something I'd want to block. But I think we can do better. In this particular case, simply moving it to the ellipsis menu strikes a good balance between:
|
@Mamaduka why is that? Have I missed some discussion or issue somewhere? |
@ntsekouras, proper permission checks are needed for one. I've already mentioned this a few times and even started exploring a solution, but it's nowhere finished - #61644. |
@Mamaduka There's a simpler solution for now, just add the permissions checks in the |
@youknowriad sounds good. I am happy to help with testing/reviews. |
Co-authored-by: jameskoster <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: ntsekouras <[email protected]> Co-authored-by: richtabor <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: jasmussen <[email protected]>
Co-authored-by: jameskoster <[email protected]> Co-authored-by: youknowriad <[email protected]> Co-authored-by: ntsekouras <[email protected]> Co-authored-by: richtabor <[email protected]> Co-authored-by: Mamaduka <[email protected]> Co-authored-by: jasmussen <[email protected]>
Part of #59689.
What?
Remove the 'Move to trash' button beneath post meta.
Why?
Testing Instructions