Editor: Shim meta attributes for early block registrations#20544
Merged
Conversation
|
Size Change: +34 B (0%) Total Size: 866 kB
ℹ️ View Unchanged
|
epiqueras
approved these changes
Feb 28, 2020
This was referenced Feb 28, 2020
0ee9496 to
6ca77f4
Compare
Contributor
|
So, is |
Contributor
|
@mrleemon: There is a dev note in the works (edit: published here) which will be published in the next days (see their drafting). The quick answer is that you can now use: const [ meta, setMeta ] = useEntityProp( 'postType', 'post', 'meta' );Although, to be clear, the shim in question in this PR is there so that nothing breaks overnight. It just means that |
jorgefilipecosta
pushed a commit
that referenced
this pull request
Mar 2, 2020
* Editor: Shim meta attributes for early block registrations * E2E Tests: Add meta block early registration test * Editor: Clarify comment regarding meta attribute shim
jorgefilipecosta
pushed a commit
that referenced
this pull request
Mar 2, 2020
* Editor: Shim meta attributes for early block registrations * E2E Tests: Add meta block early registration test * Editor: Clarify comment regarding meta attribute shim
12 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20494
This pull request seeks to resolve an issue where blocks which are registered early and use the (now-deprecated) meta attribute source would fail to apply the compatibility shims introduced between #17153 and #20494.
Testing Instructions:
There are two ways to test:
Per #20494, following the meta block tutorial should yield a plugin with code such as in the following gist:
https://gist.github.com/aduth/9953fdd7676ce080ab24c2c8a85ae783
From the page, you may be able to
to download a ZIP to use as plugin.
Otherwise, you can use the now-updated "Meta Attribute Block" Gutenberg test plugin to verify the behavior. You can do this as a user if you are using the default development environment by activating the plugin from the Plugins screen.
You can ensure the end-to-end tests pass: