-
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
Widgets Customizer: Add Legacy Widget block #30321
Conversation
Wires up the Legacy Widget block to the Widgets Customizer.
Removes __unstable_instance from the instance object returned by the Customizer and instead add raw_instance. This property is only added if the widget has declared that it supports raw instances via the show_instance_in_rest flag.
Hm, adding a new Legacy Widget block should work now that #30221 is merged but doesn't. Investigating. |
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.
It works great!
When I'm trying to preview the legacy widgets, they throw this error in the iframe though.
Notice: Constant IFRAME_REQUEST already defined in /var/www/html/wp-content/plugins/gutenberg/build/block-library/blocks/legacy-widget.php on line 74
Not sure if it's related to this PR.
I think it's the final missing piece of #29284? |
packages/customize-widgets/src/components/sidebar-block-editor/use-sidebar-block-editor.js
Show resolved
Hide resolved
Size Change: +456 B (0%) Total Size: 1.42 MB
ℹ️ View Unchanged
|
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.
LGTM 👍
Description
Closes #30265.
Closes #30266.
Wires up the Legacy Widget block — which was rewritten in #29960 — to the Widgets Customizer and removes the
__unstable_instance
hack added in #29365 in favour of a correct and more permanent solution.How has this been tested?
Screenshots
Kapture.2021-03-29.at.16.04.41.mp4
Types of changes
New feature.
Checklist:
*.native.js
files for terms that need renaming or removal).