Overview

Although this landed:

#3469442: Impossible to drop a component into an empty column of the two

Using slots with latest code is still very buggy.

For example:

  • Install per instructions
  • Drag Two Column into the main area from components list
  • Drag a hero from above into the left side of that => works but it still says "This is column 1 content"
  • Try dragging the same hero from left to right side => doesn't work
  • Try dragging another hero from above into the right side => doesn't work and now the left side hero moves to original spot
  • Click Add section button (doesn't always show up... separate bug :)
  • Click Two Column
  • Try steps above again => still doesn't work

Proposed resolution

TBD

User interface changes

Dragging into and out of slots will work as expected.

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

kristen pol created an issue. See original summary.

kristen pol’s picture

Title: Dragging into slots doesn't working well » Dragging into slots doesn't work well

grammar is hard when you are tired :D

balintbrews’s picture

I'm excited about #3470973: Retain the placement of components within the preview when inserting a component, which I think introduces a major improvement on the drag & drop experience. There is still work to do, but I'm curious what you think!

kristen pol’s picture

Thanks 🙏 I found that issue earlier today and am following but didn’t try anything. Should I test?

lauriii’s picture

I wonder if we should try to increase the size of the dropzone for empty slots with something like width: 100%; height: 100%.

lauriii’s picture

wim leers’s picture

Title: Dragging into slots doesn't work well » [PP-1] Dragging into slots doesn't work well
Status: Active » Postponed
balintbrews’s picture

#3469822: Highlight slot with a border where component/section is about to be placed displays a border around slots, which is nice, but it doesn't actually impact the dragging behavior.

#3470973: Retain the placement of components within the preview when inserting a component tweaks the drag & drop thresholds, so I would like that to land first.

wim leers’s picture

Title: [PP-1] Dragging into slots doesn't work well » Dragging into slots doesn't work well
Assigned: Unassigned » balintbrews
Status: Postponed » Active
Related issues: +#3470973: Retain the placement of components within the preview when inserting a component
jessebaker’s picture

Assigned: balintbrews » jessebaker

boulaffasae’s picture

Hi everyone,

I might be wrong :) but I suppose One column / Two column don't work for now.

Only "Fake Section 2" works, you can drag & drop inside of it but you can't do the same inside a new One/Two column.

Record: https://www.loom.com/share/d567c2e86af54edea1e6c51b5e307476?sid=5ad28362...

** when I drag a component the left/right side of the new Two column, the sidebar on the left doesn't get updated. Which mean after the next change, everything will go back to normal.

balintbrews’s picture

Title: Dragging into slots doesn't work well » Adding a component with slots does not register the slots as children

Updating the title for better clarity. @jessebaker already tracked down the problem and created #3472029: Adding a component with slots does not show the slots in the layers view which was closed as duplicate. Quoting a relevant piece from that issue's description:

I believe that when adding a new component to the layout the layoutModel data for the new component does not have the slots added as children.

jessebaker’s picture

Assigned: jessebaker » balintbrews
Status: Active » Needs review

  • jessebaker committed b309f07a on 0.x
    Issue #3471085 by jessebaker: Adding a component with slots does not...
jessebaker’s picture

Assigned: balintbrews » Unassigned
Status: Needs review » Fixed

@boulaffasae Your description is accurate of the issue I've been addressing here and I believe that this is now fixed if you would like to try and re-test!

boulaffasae’s picture

Hello, Thank you everyone for the fixe.

Yes, Drag & Drop work very good, I can put elements in One/Two columns with no issue.

kristen pol’s picture

Tested this and there are still some quirks but some may be with the components themselves.

https://www.youtube.com/watch?v=esII_juFxcE

This is a HUGE improvement :) Thanks!!!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.