Skip to content

Provide a pathway to migrate widgets to block themes #39270

@annezazu

Description

@annezazu

What problem does this address?

Currently, when switching from a classic theme to a block theme, widgets created in the classic theme aren't migrated over.

What is your proposed solution?

I could have sworn this was previously discussed, whether on a hallway hangout or in a core editor meeting, but I can't find any related issues so I decided to open this one up since this recently came up as a point of feedback. Since widgets "live" in the spaces that template parts fill, it makes the most sense for migration to happen in the form of generating template parts during migration:

  • User has widgets in a classic theme.
  • User switches to a block theme.
  • Widget areas are converted to an equivalent template part with blocks (header, sidebar, etc). Anything already a block can remain as such and anything else could be converted to a legacy widget block thanks to the work done with the block widget editor.

If the user didn't want to use this, they could just ignore or delete the template part. If they switched back to a classic theme, it should preserve backwards compatibility. I don't know enough about the technical underpinnings here either way but wanted to get this documented regardless as it feels like a key area of refinement ahead of more folks adopting block themes in due time.

Metadata

Metadata

Assignees

Labels

[Block] Legacy WidgetAffects the Legacy Widget Block - used for displaying Classic Widgets[Block] Template PartAffects the Template Parts Block[Feature] ThemesQuestions or issues with incorporating or styling blocks in a theme.[Focus] Blocks AdoptionFor issues that directly impact the ability to adopt features of Gutenberg.[Priority] HighUsed to indicate top priority items that need quick attention[Type] EnhancementA suggestion for improvement.

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions