-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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: Migrate lightBlockWrapper
support to apiVersion
for blocks
#34459
Conversation
Size Change: +49 B (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
f1e0864
to
8f277aa
Compare
8f277aa
to
4783187
Compare
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.
So reading #27189 it sounds we gate functionality via the API version 2 check or supports: { lightBlockWrapper: true }
On this branch, and I'm seeing the following error. Trunk works as expected to register the block type. Let me know if y'all see this too.
@gwwar, I can reproduce the issue now. I will investigate 👍🏻 I applied some code changes after I made screenshots so I'm curious what could possibly go wrong 😄 |
4783187
to
9bcde92
Compare
I hope I fixed all my mistakes in 9bcde92 😅 |
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.
Pretty sure that did the trick 👍 Here's what I see
Description
Follow-up for https://github.com/WordPress/gutenberg/pull/34346/files#r697287973:
The change refactors code to no longer use
lightBlockWrapper
check for block types and instead migrates this removedsupports
field toapiVersion
2 if the version is lower than 2.The rationale behind the proposed change is to simplify checks in the codebase.
How has this been tested?
The most popular use case can be tested in the Browser Console:
Types of changes
Code quality change.
Checklist:
*.native.js
files for terms that need renaming or removal).