Skip to content

Template part transforms #29249

@jameskoster

Description

@jameskoster

I think it may be worth discussing and exploring the transform options for template parts. Currently the transform menu includes options to transform template parts in to Columns or Group blocks:

Screenshot 2021-02-23 at 10 14 43

However, neither of this options work. Selecting one just kicks you back to the wp-admin Dashboard 🐛

Should it be possible to transform template parts into other, non-template-part blocks at all? This seems like a potentially dangerous operation that might be better left to the "Detach blocks from template part" option in the ellipsis menu:

Screenshot 2021-02-23 at 10 20 46


One transformation that should be possible in one way or another is switching template part variations. In previous issues the following design has been posited as an option to do this:


Closely related – in #28737 we are exploring how patterns that are contextually relevant to the selected template might be exposed via the transform menu.


Finally, in #27397 (comment) @mtias questioned whether it should be possible to quickly/easily wrap a template part inside another block. As @jasmussen mentioned, this could be useful for things like Sidebar template parts. My personal feeling is that this could possibly be better handled by the aforementioned patterns flow, as it is not a transform in the traditional sense, but it is worth discussing.

Tentative action plan

Metadata

Metadata

Assignees

No one assigned

    Labels

    Needs Design FeedbackNeeds general design feedback.[Block] Template PartAffects the Template Parts Block[Type] DiscussionFor issues that are high-level and not yet ready to implement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions