-
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
Use createBlock helper in place of manual block creation #690
Conversation
This means all the blocks returned already have |
Isn't that what's already happening here? https://github.com/WordPress/gutenberg/blob/90cc25b/blocks/api/factory.js#L88-L90 |
@aduth no I'd update this to :
|
8e5c6d5
to
baa6737
Compare
Thanks for the pointer @youknowriad . I've updated the factory method and updated the tests to assume blocks to be returned via |
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.
LGTM 👍
Closes #688
This pull request seeks to use the
wp.blocks.createBlock
helper consistently for creating blocks, particularly in block transforms.Testing instructions:
Verify that there are no regressions in changing between heading, text, and quote block types.