[PP-1] on #3512455: Implement new drag-and-drop solution that removes the need to drop items into the preview iFrame

Overview

You can currently drag components from the Desktop view into the mobile view. As far as I understand these should just be mirrors of each other at different screensizes, not seperate displays. We should stop this from being possible.

Proposed resolution

Not yet tested, but I believe if we give the desktop & mobile views seperate Sortable groups, we should be able to limit them so components can only be dragged from the Sidebar.

User interface changes

It will no longer be possible to drag components between mobile and desktop

CommentFileSizeAuthor
#6 Untitled.gif558.82 KBgauravvvv
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

DanielVeza created an issue. See original summary.

danielveza’s picture

Title: Block dragging componentsfrom the desktop view to the mobile view » Block dragging components from the desktop view to the mobile view
gauravvvv’s picture

Assigned: Unassigned » gauravvvv

gauravvvv’s picture

Status: Active » Needs review
gauravvvv’s picture

Issue summary: View changes
StatusFileSize
new558.82 KB

Here is after MR gif

gauravvvv’s picture

Assigned: gauravvvv » Unassigned
lauriii’s picture

Thank you @gauravvvv! I'm wondering if this is something you could write a test for?

wim leers’s picture

HAH! 😅

danielveza’s picture

Nice! I'm glad my suggested approach was correct

wim leers’s picture

wim leers’s picture

Status: Needs review » Needs work
Issue tags: +Needs reroll

omkar-pd made their first commit to this issue’s fork.

omkar-pd’s picture

Status: Needs work » Needs review
Issue tags: -Needs reroll

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

utkarsh_33’s picture

Status: Needs review » Needs work
Issue tags: +Needs tests

This still requires tests as mentioned in #8. Marking it needs work.

jessebaker’s picture

Version: » 0.x-dev
Priority: Normal » Major
Issue tags: +stable blocker
jessebaker’s picture

Title: Block dragging components from the desktop view to the mobile view » [PP-1] Block dragging components from the desktop view to the mobile view
Issue summary: View changes
Status: Needs work » Postponed
Issue tags: -Needs tests
Parent issue: » #3512455: Implement new drag-and-drop solution that removes the need to drop items into the preview iFrame

Removing the need for tests - it's not, at this point, feasible to add reliable drag and drop tests. Especially a test that ensures you can't drag and drop! That just seems to be asking for a false positive!

That said, the codebase has changed significantly since this MR. I think it must have been made before the overlay solution even.

lauriii’s picture

Title: [PP-1] Block dragging components from the desktop view to the mobile view » Block dragging components from the desktop view to the mobile view
Status: Postponed » Active
jessebaker’s picture

Title: Block dragging components from the desktop view to the mobile view » [PP][Design needed] Block dragging components from the desktop view to the mobile view
Assigned: Unassigned » callumharrod
Status: Active » Postponed (maintainer needs more info)
Issue tags: +Needs design

Postponing based on product/design clarification: We might not need to do this work as I have seen plans that remove the multiple simultaneous breakpoint previews (which would immediately mean this bug isn't possible).

wim leers’s picture

Assigned: callumharrod » lauriii
Status: Postponed (maintainer needs more info) » Postponed
Issue tags: +Needs product manager review

@lauriii: has this been decided by now? 🤞

lauriii’s picture

Title: [PP][Design needed] Block dragging components from the desktop view to the mobile view » Block dragging components from the desktop view to the mobile view
Assigned: lauriii » Unassigned
Status: Postponed » Closed (outdated)
Issue tags: -Needs design, -Needs product manager review

This won't be needed anymore after: #3522209: Move zoom controls, show only one viewport.