Retain the space consumed by a component when it's being dragged

Created on 23 August 2024, 4 months ago
Updated 11 September 2024, 3 months ago

Overview

One of the reasons the drag and drop is a bit fiddly is because elements are moving around the page as components are being dragged. We should avoid this type of shifts until the actual drop has happened to make the whole experience a bit less chaotic.

Proposed resolution

Retain space components take when drag on a component starts. Effects used to show where component gets placed should also not take space from the page.

User interface changes

🐛 Bug report
Status

Fixed

Component

Page builder

Created by

🇫🇮Finland lauriii Finland

Live updates comments and jobs are added and updated live.
  • CSS

    It involves the content or handling of Cascading Style Sheets.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @lauriii
  • Assigned to gauravvvv
  • 🇮🇳India gauravvvv Delhi, India
  • Pipeline finished with Success
    4 months ago
    Total: 307s
    #265618
  • Issue was unassigned.
  • Status changed to Needs review 4 months ago
  • 🇮🇳India gauravvvv Delhi, India
  • 🇫🇮Finland lauriii Finland

    This is a really nice improvement! Thank you @gauravvvv!

  • Assigned to balintbrews
  • Status changed to RTBC 4 months ago
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺

    I think this is indeed a clear improvement:

    Assigning to @balintbrews for final review 😄

  • First commit to issue fork.
  • 🇳🇱Netherlands balintbrews Amsterdam, NL

    This looks amazing! 🤩

    I added a small commit to address two minor things:

    1. Increase contrast between ghost element and already placed elements by slightly decreasing opacity;
    2. Set a minimum height for the ghost element to account for newly added components where we won't have any markup rendered yet and all we have is a placeholder.

    What would be nice, and I couldn't quickly find the selector for it, is to hide the name of a newly added component inside the ghost element. See on my screen capture. @gauravvvv, would you be up for taking a stab at that? If we can't easily make it happen, let's center that element inside the ghost wrapper for now, so it looks like it's intentionally there. You can do that by adding:

    .sortable-ghost {
      /* ... */
      display: flex;
      justify-content: center;
      align-items: center;
    }
    
  • Status changed to Needs work 4 months ago
  • 🇳🇱Netherlands balintbrews Amsterdam, NL
  • Issue was unassigned.
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
  • 🇫🇮Finland lauriii Finland

    I'm wondering if we should just land this regardless of #8? I think we need a follow-up to improve the design for the scenario where a new component is being added anyway because I think we can improve it further than what's proposed in #8.

  • 🇳🇱Netherlands balintbrews Amsterdam, NL

    @lauriii, sure, that's why I proposed the fallback solution that makes things better immediately. 🙂 Let me push that commit quickly, then we can wrap this up.

  • Status changed to Needs review 4 months ago
  • 🇳🇱Netherlands balintbrews Amsterdam, NL
  • Status changed to RTBC 4 months ago
  • 🇫🇮Finland lauriii Finland

    This looks good! We probably need couple more issues to further refine this but this is a big step forward 👍

  • Pipeline finished with Skipped
    4 months ago
    #267053
  • Pipeline finished with Skipped
    4 months ago
    #267158
  • Pipeline finished with Skipped
    4 months ago
    #267159
  • Pipeline finished with Skipped
    4 months ago
    #267210
  • Status changed to Fixed 4 months ago
  • 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024