Skip to content

Drag and drop: Allow dragging into template parts #56182

@andrewserong

Description

@andrewserong

Part of #33683

The problem

It is currently not possible to drag a block into a template part from within the site editor. From the perspective of dragging, the template part is treated as one big block area, rather than allowing a block to be dragging within the template part.

Idea for a solution

While dragging blocks, is it possible to switch to a mode that allows the blocks within template parts to be treated the same way as blocks that live within the template (or something like that)? If a user drops a block within a template part area, the block should be dropped within that template part. If the block is dropped within the template itself, the block should be dropped within the template.

Screengrab

The following short screengrab shows that the Header area (while dragging) is treated like one big block, rather than allowing the user to drag and drop within that template part:

2023-11-16.11.06.51.mp4

To-do

  • Allow dragging into template parts when dragging existing blocks
  • Allow dragging into template parts when dragging files from the desktop or a block from the inserter
  • Look into why the drop indicator line is offset in Playground

Metadata

Metadata

Assignees

Labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions