-
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
Editor: Use the Editor component in the post editor. #62339
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. |
import { store as coreStore } from '@wordpress/core-data'; | ||
import { store as editorStore } from '@wordpress/editor'; | ||
|
||
export const getEditedPostTemplateId = createRegistrySelector( |
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.
This is the same logic that was in getEditedPostTemplate
but I moved it to this new selector because we don't really need the full object.
Size Change: -90 B (-0.01%) 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.
Here's what I tested:
✅ Post editor loads find with all expected functionality
✅ Displaying/swapping/editing post/page templates works as expected
✅ General editing/adding blocks/styling/saving
Also tested:
✅ All the of the above in a Classic theme
✅ All of the above using a custom post type
✅ All of the above using an Author account
✅ All of the above for pages set as home/posts pages
E2e tests should probably cover everything here but smoke testing editing various entities in the site editor would be helpful.
I assume site editor
should be post-editor
, but I smoke tested site editor and editing pages as well. 👍🏻
5707016
to
a069531
Compare
Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Co-authored-by: youknowriad <youknowriad@git.wordpress.org> Co-authored-by: ramonjd <ramonopoly@git.wordpress.org>
Related #52632
Similar to #62274 but for the post editor.
What?
This PR updates the post editor to use the
Editor
component to render a full editor with UI and context, similar to how we do it in the site editor.Note that there are still some extra props that we should ideally try to mitigate/remove over time. But for now these are necessary to account for the differences and history of post/site editor packages.
Testing Instructions
E2e tests should probably cover everything here but smoke testing editing various entities in the site editor would be helpful.