-
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
Editor: Unify the names of the sidebars between edit post and edit site. #60856
Conversation
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. |
There's a potential for a small breaking change here and it seems there's no way to avoid it entirely. |
@youknowriad I think for this one we will have to worry about backward compatibility shimms sadly... I'm aware of a few instances just myself where I've used these names to add buttons in blocks to open the sidebar panel.... |
I see 119 usages in the plugin directory: https://wpdirectory.net/search/01HVRHSSHKGCZE0JXV2RPJXCQC |
Size Change: +106 B (0%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
So what do you suggest @fabiankaegy use the names from the post editor? |
@youknowriad what if we use the approach you outlined but add remapping for the old name? At least for a little while. The main issue here is that plugins need to support multiple WP versions at the same time. So we can only adopt the new name if using it on old instances doesn't break functionality If using the old name here gets remapped to the new name with a deprecated warning I think that would be the safer route |
I thought about remapping but it doesn't work, because we can remap "actions" but we can't remap the return value of the selectors. I think the least disruptive approach is to use the edit post names and a dev note for folks using the edit-site names. |
Any thoughts on the latest approach? |
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.
Hmmm yeah that is too bad.
Besides that I sadly don't have any other ideas how this could be solved.
I don't really like having to still use the edit-post
namespace because we want to reinforce for new things that the shared editor
namespace is the correct approach.
But I don't see how we can make that change without some kind of backwards compatibility handling. So this approach seems less disruptive 👍
Actually, to make this even more breakage free, I added mapping for actions and some selectors (the ones that can be remapped) I looked at all the usage of edit-site/template and edit-site/block-inspector in wpdirectory and the changes here should cover all of them. (Only three plugins are using these: woo, jetpack and woo blocks). The remaining one is bundling Gutenberg code. |
Related #52632
What?
This PR unifies the name of the sidebars between the post and site editors. This allows us to share the same keyboard shortcut and will allow us to merge the components entirely lateR.
Testing Instructions
1- You can test the keyboard shortcut to open/close the sidebar:
cmd + shift + ,