Overview

Currently, if you drag an element which has children, it is possible to drag the parent element as a child of itself.

Proposed resolution

It should not be possible to drag an element into itself. The UX should highlight that the whole tree is being moved, and should prevent the parent from being moved inside itself.

User interface changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

lauriii created an issue. See original summary.

fazilitehreem’s picture

Assigned: Unassigned » fazilitehreem
fazilitehreem’s picture

Assigned: fazilitehreem » Unassigned
gauravvvv’s picture

Assigned: Unassigned » gauravvvv
gauravvvv’s picture

Assigned: gauravvvv » Unassigned
StatusFileSize
new336.49 KB

The issue is no longer reproducible.

bhuvaneshwar made their first commit to this issue’s fork.

bhuvaneshwar’s picture

Assigned: Unassigned » bhuvaneshwar
StatusFileSize
new154.88 KB
new406.87 KB

I was able to reproduce the issue and have started making progress on it.

getting an error when dragging component into itself

Console error

BE Error

bhuvaneshwar’s picture

Hi @lauriii, just to confirm, we cannot drag the column_one component into its child components like images or text. However, we are able to drag the main two-column parent component under column_one. Can the same structure be applied to the main parent component?

lauriii’s picture

The column_one is a slot which means it should never be possible to drag that anywhere. The main component "Two column" should be draggable but it should act like a tree so that everything inside gets dragged with it, and you should not be able to drag the main component inside its own slots. It should be possible to drag components into slots like the column_one.

bhuvaneshwar’s picture

Assigned: bhuvaneshwar » Unassigned
wim leers’s picture

wim leers’s picture

Issue tags: +DrupalCon Barcelona 2024
hooroomoo’s picture

#3470594: Refine dragging behavior and design in Layers menu addresses this. There are several bugs with the current layers menu that #3470594: Refine dragging behavior and design in Layers menu fixes.

wim leers’s picture

Assigned: Unassigned » hooroomoo
Status: Active » Postponed (maintainer needs more info)
Issue tags: -DrupalCon Barcelona 2024

@hooroomoo Oh! So is this … a duplicate/obsolete?

hooroomoo’s picture

Assigned: hooroomoo » Unassigned

Yeah I'd say duplicate.

wim leers’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)
Parent issue: #3450592: [META] Front-end Kanban issue tracker »
Related issues: +#3470594: Refine dragging behavior and design in Layers menu

🥳