-
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: Support PluginPostStatusInfo Slot in the site editor #60814
Conversation
Size Change: +15 B (0%) Total Size: 1.75 MB
ℹ️ View Unchanged
|
The description is wrong 😄 - PluginMoreMenuItem -> PluginPostStatusInfo. Do you think we rename the slot to something more close to |
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. |
I think it could make sense but If I remember properly we used to consider the whole "summary" as "post status", not the post status property but the status of the post :P My gut feeling say it's not worth it, folks are already using that name and the change is seemless if it's just the package but I also don't feel that strongly. |
<PostTemplatePanel /> | ||
<PostURLPanel /> | ||
<PostAuthorPanel /> | ||
<PluginPostStatusInfo.Slot> |
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.
Is there a specific reason for wrapping these components with the slot? Is it about matching post editor and the concept of grouping this post information together or something else?
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.
Good question, I did it to match the post editor. I'm guessing there's a small impact on the markup if I don't do it but I'm not sure if it's important.
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, thanks!
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.
@@ -93,7 +93,7 @@ const PostStatus = ( { isOpened, onTogglePanel } ) => ( | |||
|
|||
## Currently available SlotFills and examples | |||
|
|||
The following SlotFills are available in the `edit-post` package. Please refer to the individual items below for usage and example details: | |||
The following SlotFills are available in the `edit-post` or `editor` packages. Please refer to the individual items below for usage and example details: |
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.
Is there any value in splitting the list below based on package?
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.
I think not, since they will ultimately be on the same package.
Related #52632
Similar to #59985
What?
This PR adds support for the
PluginPostStatusInfo
to the site editors allowing plugin authors to use the same code to load their plugins regardless of the context of the editor.How?
@wordpress/edit-post
to.@wordpress/editor
Testing Instructions
You should be able to paste something like the following in both post and site editors (for pages) and have the button show up in the more menu.