Skip to content

Allow WP Widgets to be added as blocks #4770

Closed

Description

@Imranaliweb

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.

refer following screenshot link
http://prntscr.com/i807kj

Activity

  1. youknowriad commented on Jan 31, 2018

    @youknowriad
    Contributor

    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.

  2. changed the title [-]I can not add any theme widget with Gutenberg[/-] [+]Allow WP Widgets to be added as blocks[/+] on Feb 22, 2018
  3. westonruter commented on Feb 22, 2018

    @westonruter
    Member

    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).

  4. self-assigned this
    on Feb 22, 2018
  5. melchoyce commented on Feb 22, 2018

    @melchoyce
    Contributor

    I'll take a look at designing a legacy widget block.

  6. added
    CustomizationIssues related to Phase 2: Customization efforts
    New BlockSuggestion for a new block
    on Mar 8, 2018
  7. melchoyce commented on Mar 17, 2018

    @melchoyce
    Contributor

    Legacy Widget Placeholder

    legacy widget placeholder

    Legacy Widget Placeholder: Open Dropdown

    legacy widget dropdown

    Legacy Widget: Edit Selected Widget

    legacy widget edit

    Legacy Widget: Preview Selected Widget

    legacy widget preview

  8. added
    Needs DevReady for, and needs developer efforts
    and removed on Mar 17, 2018
  9. westonruter commented on Mar 17, 2018

    @westonruter
    Member

    @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.

  10. 37 remaining items

  11. spacedmonkey commented on Feb 18, 2019

    @spacedmonkey
    Member

    @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.

  12. youknowriad commented on Feb 18, 2019

    @youknowriad
    Contributor

    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.

  13. afercia commented on Mar 1, 2019

    @afercia
    Contributor

    @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.

  14. youknowriad commented on Mar 4, 2019

    @youknowriad
    Contributor

    @afercia This issue is about the "Classic widget block" being worked on on #13511
    We should closed it once merged.

  15. irishetcher commented on Mar 5, 2019

    @irishetcher

    I'd be careful of those TinyMCE widgets. Look too much like sneaking the classic editor in the back door. ; )

  16. added a commit that references this issue on Mar 8, 2019
  17. aduth commented on Mar 12, 2019

    @aduth
    Member

    @afercia This issue is about the "Classic widget block" being worked on on #13511
    We should closed it once merged.

    Closing per this comment, as #13511 has been merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Needs Design FeedbackNeeds general design feedback.New BlockSuggestion for a new block[Feature] BlocksOverall functionality of blocks[Feature] Widgets ScreenThe block-based screen that replaced widgets.php.[Focus] Accessibility (a11y)Changes that impact accessibility and need corresponding review (e.g. markup changes).[Status] In ProgressTracking issues with work in progress

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions