-
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
Update PublishPanel docs and internal usage to editor package #60628
base: trunk
Are you sure you want to change the base?
Conversation
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
@ntsekouras do you mind taking a look at this, since the original changes were coming from you. |
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 handling this! Everything looks good besides my small comment.
const { PluginPrePublishPanel } = window?.wp?.editPost ?? {}; | ||
// We shouldn't import the editor package directly | ||
// because it would include the wp-editor in all pages loading the block-directory script. | ||
const { PluginPrePublishPanel } = window?.wp?.editor ?? {}; |
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.
Hm.. It seems I missed that in my PR.
I guess it's fine to just import from @wordpress/editor and remove this line and comments.
--cc @youknowriad if I missing something from #45895
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.
yes, that comment is a bit unclear to me.
@@ -99,8 +99,11 @@ The following SlotFills are available in the `edit-post` package. Please refer t | |||
- [PluginBlockSettingsMenuItem](/docs/reference-guides/slotfills/plugin-block-settings-menu-item.md) | |||
- [PluginDocumentSettingPanel](/docs/reference-guides/slotfills/plugin-document-setting-panel.md) |
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.
The two above are also in the editor package.
@@ -2,11 +2,15 @@ | |||
|
|||
This slot allows for injecting items into the bottom of the pre-publish panel that appears to confirm publishing after the user clicks "Publish". | |||
|
|||
<div class="callout callout-info"> | |||
`PluginPrePublishPanel` was moved from the `@wordpress/edit-post` package to `@wordpress/editor` in Gutenberg 18.1 (to be included in WordPress 6.6). The deprecated export will be removed with WordPress 6.8. | |||
</div> |
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.
Not sure if we should keep these callouts. We shouldn't remember to remove them later.
If we keep them, we should be doing the same for the other slots that moved.
What?
This updates documentation to reflecht the changes form #60344
Why?
PluginPostPublishPanel and PluginPrePublishPanel where moved to
@wordpress/editor
(from@wordpress/edit-post
). They are still available in the old package, but being deprecated there.How?
Testing Instructions
Docs:
nothing
Internal usage
The panel was used internally in the editor when installing a block directly in the editor and then publishing a post.
Installed 1 Block
Testing Instructions for Keyboard
Screenshots or screencast