-
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
Bundle the block copy handler within the BlockCanvas component #54207
Conversation
Size Change: +40 B (0%) Total Size: 1.52 MB
ℹ️ View Unchanged
|
Flaky tests detected in f819deb. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6094495329
|
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.
When testing this branch I noticed the "Type / to choose a block" message was not appearing. I switched to the trunk and it appeared and then switched again to this branch and it kept appearing so probably it was something on my setup 🤷♂️
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 change seemed good and in my tests copy and paste still worked.
Maybe this should move to writing flow. |
@ellatrix either way, it works for me as both of these (writing flow and copy handler) are now internal hooks. |
Related #53874
What and why?
Gutenberg can be used as a platform/framework to build block editors. Mainly thanks to the @wordpress/block-editor package. That said, the experience today is not as straightforward as it can be. There can be a lot of small gotchas and hacks you need to do in order to achieve the desired result. One of these small things is that copy/pasting blocks doesn't work unless you use the copy handler hook or component.
This PR updates the BlockCanvas component to enable this behavior by default.
Testing Instructions
1- Check tha copy/pasting blocks still works as intended.