Widget Area Block: apply API version 3#71110
Conversation
|
Size Change: +19 B (0%) Total Size: 1.91 MB
ℹ️ View Unchanged
|
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Did you try the widgets screen in classic themes? This is an interesting one because this block is Las mean to support "legacy widgets" and if I'm not wrong a lot of these might not work properly in iframe. |
|
Maybe I don't understand what you mean, but the Widget Editor always works as a non-iframe, and widget area blocks are never placed inside an iframe, right? As a side note, this PR is necessary to make the See the failing unit test: https://github.com/WordPress/gutenberg/actions/runs/16804905273/job/47594760798?pr=71107 |
|
The widgets screen is only available for classic themes, and IIRC it's not iframed. I think this is just a code quality improvement. |
This is what I was missing. I thought editor would "adapt" when there are only v3 blocks. In that case I think we're good. |
|
If we were to consider moving to iframes, including the Widget Editor, it might be a major undertaking. One idea would be to be able to edit widget areas individually in the site editor, like a navigation menu, i.e., to deprecate the Widget Area block, but I'm not sure if it's worth our effort right now.
Related issue: #33254 |
|
Not sure if it's worth the effort. Site Editor has different paradigms that work better than widgets. |
Mamaduka
left a comment
There was a problem hiding this comment.
Smoke tested the widget editor and everything seems to be in order.

Follow-up #70783
What?
Make the Widget Area block work with the
apiVersion: 3to avoid the browser console warning.Why?
To encourage block developers to use Block API Version 3 and test in the iframe editor, we added a browser console warning. However, I noticed that the Widget Area block was running with an undefined API version (version 1).
How?
Adds
apiVersion: 3to the block.json and uses theuseBlockPropshook. There should be no visual changes or functionality issues.Testing Instructions