Skip to content

Conversation

@dsmmcken
Copy link
Contributor

@dsmmcken dsmmcken commented Nov 11, 2025

Previous behaviour would grow the drop-zone when an item is picked up, but that expanded area would not actually be droppable. Leading to frustrating ux where it seemed like you dropped an item in the droppable area, but it would revert. The list needs to grow, so that you can place the item above or below any existing items.
drag_before

Root cause is DnD doesn't treat that area as droppable unless it is overlapping the list. This change enables the DnD placeholder item, to fill out the expanded area. The list now grows after initial contact rather than before, as that's when the placeholder gets added by DnD.

drag_after

Additionally, added a hover styling to positively show your drop is going to be successful. Ultimately though, this goes away entirely with pivot builder.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR fixes the dropzone area behavior in the rollup rows table sidebar by improving how the drop target height is calculated and displayed during drag-and-drop operations.

Key Changes:

  • Replaced dynamic JavaScript-based height calculation with CSS custom properties for more reliable dropzone sizing
  • Added hasPlaceholder prop to DraggableItemList to conditionally render drag-and-drop placeholders
  • Enhanced visual feedback with background color changes when dragging over drop zones

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
packages/iris-grid/src/sidebar/RollupRows.tsx Removed conditional height calculation logic and passes CSS custom properties for height management; added hasPlaceholder prop to enable placeholder rendering
packages/iris-grid/src/sidebar/RollupRows.scss Implemented CSS custom property-based height calculation with min-height, added visual feedback for drag-over states, and improved text wrapping
packages/components/src/DraggableItemList.tsx Added optional hasPlaceholder prop with default value false to conditionally render the droppable placeholder element

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@codecov
Copy link

codecov bot commented Nov 11, 2025

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 45.17%. Comparing base (e1c2dc4) to head (1c4da62).
⚠️ Report is 6 commits behind head on main.

Files with missing lines Patch % Lines
packages/components/src/DraggableItemList.tsx 0.00% 1 Missing ⚠️
packages/iris-grid/src/sidebar/RollupRows.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2572      +/-   ##
==========================================
+ Coverage   44.54%   45.17%   +0.62%     
==========================================
  Files         768      769       +1     
  Lines       43367    43462      +95     
  Branches    10973    11170     +197     
==========================================
+ Hits        19317    19632     +315     
+ Misses      24034    23784     -250     
- Partials       16       46      +30     
Flag Coverage Δ
unit 45.17% <0.00%> (+0.62%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dsmmcken dsmmcken requested a review from mattrunyon November 11, 2025 19:24
@dsmmcken dsmmcken changed the title feat: fix rollup rows dropzone area in table sidebar fix: rollup rows dropzone area in table sidebar Nov 11, 2025
@dsmmcken dsmmcken marked this pull request as ready for review November 11, 2025 19:25
@dsmmcken dsmmcken requested a review from mattrunyon November 12, 2025 21:10
@dsmmcken dsmmcken merged commit 2d5f930 into main Nov 13, 2025
11 checks passed
@dsmmcken dsmmcken deleted the dmckenzie_rollup_drag_fix branch November 13, 2025 18:45
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants