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

Reusable blocks: Mark API as experimental #11230

Merged
merged 2 commits into from
Oct 30, 2018

Conversation

noisysocks
Copy link
Member

The reusable block selectors and actions will need to change in the future when we finish the work in #7453.

This PR gives us some breathing room to make these changes after the API lockdown in 4.2 by marking all reusable block selectors and actions as __experimental.

Deprecated selectors:

  • getReusableBlock, getReusableBlocks – Best to use getEntityRecord instead
  • isFetchingReusableBlock – Best to use isResolving instead
  • isSavingReusableBlock – We'll likely add an equivalent core data selector for this

Deprecated actions:

  • fetchReusableBlocks, receiveReusableBlocks – Best to use getEntityRecords instead
  • saveReusableBlock, updateReusableBlockTitle – Best to use saveEntityRecord instead
  • convertBlockToStatic, convertBlockToRegular – Not likely to go away, but better safe than sorry

Untouched:

  • wp.blocks.isReusableBlock – This helper won't need to change.
  • getInserterItems – In the future we'll have to have this selector select from getEntityRecords(). Not sure if we should deprecate it to be safe...

To test:

npm run test-e2e reusable-blocks

@noisysocks noisysocks added the [Feature] Synced Patterns Related to synced patterns (formerly reusable blocks) label Oct 30, 2018
@noisysocks noisysocks added this to the 4.2 milestone Oct 30, 2018
@noisysocks noisysocks force-pushed the update/mark-reusable-block-api-as-experimental branch from c9ac799 to 9b8ccac Compare October 30, 2018 05:58
Copy link
Contributor

@youknowriad youknowriad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work as intended for me 👍

Maybe just a generic message in the deprecated and changelogs:

The Reusable Blocks Data API is marked as experimental as it's subject to change in the future.

@gziolo
Copy link
Member

gziolo commented Oct 30, 2018

I will add it.

The reusable block selectors and actions will need to change in the
future. Give ourselves some breathing room to make these changes after
Gutenberg 4.2 by marking them as experimental.
@gziolo gziolo force-pushed the update/mark-reusable-block-api-as-experimental branch from 9b8ccac to 175d3cc Compare October 30, 2018 14:51
@gziolo gziolo force-pushed the update/mark-reusable-block-api-as-experimental branch from 175d3cc to 7975381 Compare October 30, 2018 14:53
@gziolo
Copy link
Member

gziolo commented Oct 30, 2018

Addressed with 7975381.

@gziolo gziolo merged commit 70eea01 into master Oct 30, 2018
@gziolo gziolo deleted the update/mark-reusable-block-api-as-experimental branch October 30, 2018 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Synced Patterns Related to synced patterns (formerly reusable blocks)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants