Skip to content
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

Block Editor: Enable entity-synced inner blocks. #18739

wants to merge 3 commits into from


Copy link

epiqueras commented Nov 26, 2019


This PR has changes that will be required by any block that needs to sync its serialized inner blocks to one of its entity properties.

E.g. Post Content.

The changes are as follows:

  • Add a controlled props (value/change handlers) mode to InnerBlocks so that we can sync other variables with it.
  • Make the entity save hook save freshly selected values to avoid race conditions when making "function edits". I.e. when we set a property to a function that serializes blocks to avoid serializing on every change. This change will also just make the hook more resilient under any conditions.
  • Export the serialization utility from the editor package so that blocks can use it.

How has this been tested?

These changes were extracted from #17263, where they were verified to work. They also should not break any existing functionality and will facilitate the parallel development of most full site editing blocks like Post Content and Template Part.


  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR. .
@epiqueras epiqueras force-pushed the add/entity-synced-inner-blocks-apis branch from f723607 to 4644703 Dec 4, 2019
@epiqueras epiqueras mentioned this pull request Dec 5, 2019
5 of 6 tasks complete
@MichaelArestad MichaelArestad removed this from Inbox in Full site editing Dec 17, 2019
@karmatosed karmatosed added this to Inbox in Full site editing Dec 19, 2019

This comment has been minimized.

Copy link
Contributor Author

epiqueras commented Jan 20, 2020

This was merged as part of #19203.

@epiqueras epiqueras closed this Jan 20, 2020
@youknowriad youknowriad deleted the add/entity-synced-inner-blocks-apis branch Jan 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.