Skip to content

Fix drag and drop in codeplug layout creation - #143

Merged
livitup merged 3 commits into
mainfrom
feature/142-fix-codeplug-layout-drag-drop
Dec 18, 2025
Merged

Fix drag and drop in codeplug layout creation#143
livitup merged 3 commits into
mainfrom
feature/142-fix-codeplug-layout-drag-drop

Conversation

@livitup

@livitup livitup commented Dec 18, 2025

Copy link
Copy Markdown
Owner

Summary

Fix the broken drag and drop functionality when creating a new codeplug layout. Users could drag fields from "Available Fields" but dropping them on the "CSV Columns" pane had no effect.

Root Cause

When the CSV Columns list-group was empty, it had zero height, leaving no visible drop zone for users to drop fields onto. The min-height: 200px was on the parent container, but the actual drop target (the inner list-group) had no height.

Changes

  • Added min-height: 150px to the list-group to ensure a visible drop zone even when empty
  • Added dashed border to visually indicate the drop area
  • Added visual feedback (blue border, light blue background) when dragging over the drop zone
  • Border becomes solid when items are present

Test plan

  • All unit tests pass (666 runs, 0 failures)
  • Rubocop passes with no offenses
  • Brakeman security scan passes with no warnings
  • Manually test: Navigate to new codeplug layout
  • Manually test: Drag a field from Available Fields
  • Manually test: Drop on CSV Columns pane - field should be added
  • Manually test: Reorder fields within CSV Columns
  • Manually test: Remove a field from CSV Columns

Fixes #142

🤖 Generated with Claude Code

cmi-andrewo and others added 3 commits December 18, 2025 00:30
The issue was that when the CSV Columns list-group was empty, it had
zero height, leaving no visible drop zone for users to drop fields onto.

Changes:
- Added min-height: 150px to the list-group to ensure a visible drop zone
- Added dashed border to visually indicate the drop area
- Added visual feedback (blue border, light blue background) when dragging
- Border becomes solid when items are present

Fixes #142

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Added me-2 (margin-right) to the duplicate warning badge so there's
visual separation between the badge and the field path text.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Uses flexbox to make the drop zone expand to fill all available space
in the card, so users can drop fields anywhere in the card body area
rather than targeting a small inner box.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@livitup
livitup merged commit a880f34 into main Dec 18, 2025
3 checks passed
@livitup
livitup deleted the feature/142-fix-codeplug-layout-drag-drop branch December 18, 2025 06:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug: Drag and drop not working when creating codeplug layout

2 participants