You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ISSUE:
I am using the latest version of Gutenberg 2.1.0 and I can not add theme widget with Gutenberg editor, only show default 3 widgets. it's Enhancement or bug in Gutenberg.
This is not supported yet in Gutenberg, You need to write blocks for the widgets you want to add in Gutenberg.
One part of the Gutenberg Customization Focus starting this year is figuring out how to merge the Widgets with the blocks, maybe by adding a wrapper block or something.
I'm closing this issue right now, as this is not actionable at the moment. We may revisit for the customization focus.
The block should probably be similar to the shortcode block. A user could add a legacy widget block and then select the widget type from a dropdown, at which point the widget's form fields are presented. Then a preview can be rendered in the same way as is being done for shortcodes (#4710).
Reacted by Mel Choyce-Dwan, Aaron Jorbin, Mehadi Hasan Juber, Nilambar Sharma, Toan Nguyen and P. E. A. Lutz
@melchoyce for the block properties, I don't think it makes sense to be able to change the selected widget after it has first been selected. that would seem to have the effect of transforming one widget into another widget which is not something we should support since there is no facility in place to figure out how to map instance props between widget types. So once a widget type has been selected first, then it should not be able to be changed later. Either this, or I think each legacy widget should be registered as a separate block.
@youknowriad As I discuss above, we need to migrate the widgets over to posts and terms. This would be that migration is a blocker for making the new widget screens, as you would need the data in the posts table to use the posts rest api endpoint for that screen.
The Gutenberg editor works by feeding it with an array of block objects and returns this same array as output. The remaining part is how to save this array. I personally haven't my mind yet on the best approach.
As discussed privately, the long term vision is to use block templates as an opt-in way for themes to support full-site editing in Gutenberg which makes the widgets screen and the php templates obsolete. This means the widgets screen is considered a transition. I think we shouldn't harm the existing experience but making it worse but this is not the end goal and that said, we shouldn't over-engineer it.
This is the best time to experiment and happy to consider the post table approach if proposed but I'd personally opt of the simplest one with Backward Compatibility in mind.
Reacted by Mark Uraine, Robert Anderson and strarsis
@youknowriad does this issue needs to stay open or is it covered as part of the phase 2 goals? Wondering about it during today's a11y accessibility bug-scrub.
Activity
youknowriad commentedon Jan 31, 2018
This is not supported yet in Gutenberg, You need to write blocks for the widgets you want to add in Gutenberg.
One part of the Gutenberg Customization Focus starting this year is figuring out how to merge the Widgets with the blocks, maybe by adding a wrapper block or something.
I'm closing this issue right now, as this is not actionable at the moment. We may revisit for the customization focus.
[-]I can not add any theme widget with Gutenberg[/-][+]Allow WP Widgets to be added as blocks[/+]westonruter commentedon Feb 22, 2018
The block should probably be similar to the shortcode block. A user could add a legacy widget block and then select the widget type from a dropdown, at which point the widget's form fields are presented. Then a preview can be rendered in the same way as is being done for shortcodes (#4710).
melchoyce commentedon Feb 22, 2018
I'll take a look at designing a legacy widget block.
melchoyce commentedon Mar 17, 2018
Legacy Widget Placeholder
Legacy Widget Placeholder: Open Dropdown
Legacy Widget: Edit Selected Widget
Legacy Widget: Preview Selected Widget
westonruter commentedon Mar 17, 2018
@melchoyce for the block properties, I don't think it makes sense to be able to change the selected widget after it has first been selected. that would seem to have the effect of transforming one widget into another widget which is not something we should support since there is no facility in place to figure out how to map instance props between widget types. So once a widget type has been selected first, then it should not be able to be changed later. Either this, or I think each legacy widget should be registered as a separate block.
37 remaining items
spacedmonkey commentedon Feb 18, 2019
@youknowriad As I discuss above, we need to migrate the widgets over to posts and terms. This would be that migration is a blocker for making the new widget screens, as you would need the data in the posts table to use the posts rest api endpoint for that screen.
youknowriad commentedon Feb 18, 2019
The Gutenberg editor works by feeding it with an array of block objects and returns this same array as output. The remaining part is how to save this array. I personally haven't my mind yet on the best approach.
As discussed privately, the long term vision is to use block templates as an opt-in way for themes to support full-site editing in Gutenberg which makes the widgets screen and the php templates obsolete. This means the widgets screen is considered a transition. I think we shouldn't harm the existing experience but making it worse but this is not the end goal and that said, we shouldn't over-engineer it.
This is the best time to experiment and happy to consider the post table approach if proposed but I'd personally opt of the simplest one with Backward Compatibility in mind.
afercia commentedon Mar 1, 2019
@youknowriad does this issue needs to stay open or is it covered as part of the phase 2 goals? Wondering about it during today's a11y accessibility bug-scrub.
born2webdesign commentedon Mar 2, 2019
Mostly working, from the block editor, inserting from a drop-down, and preview in the editor:
https://wordpress.org/plugins/widget-shortcode/
Small issues:
https://wordpress.org/support/topic/advanced-additional-css-class-broken-wp-5-1-gutenberg/
https://wordpress.org/support/topic/make-link-inside-widget-non-clickable-in-the-preview-in-the-editor/
https://wordpress.org/support/topic/make-additional-attributes-available-in-block-editor-gutenberg/
youknowriad commentedon Mar 4, 2019
@afercia This issue is about the "Classic widget block" being worked on on #13511
We should closed it once merged.
irishetcher commentedon Mar 5, 2019
I'd be careful of those TinyMCE widgets. Look too much like sneaking the classic editor in the back door. ; )
Try Legacy widget block (#13511)
aduth commentedon Mar 12, 2019
Closing per this comment, as #13511 has been merged.
Get the last master changes into the mobile develop branch (#14375)
Try Legacy widget block (#13511)
Try Legacy widget block (#13511)
Merge mobile development branch into master (v2) (#14503)