greggailly commented on code in PR #42483:
URL: https://github.com/apache/superset/pull/42483#discussion_r3659375485


##########
superset-frontend/src/explore/components/ExploreContainer/ExploreDndContext.tsx:
##########
@@ -177,6 +203,29 @@ export function resolveDragEnd(
     return;
   }
 
+  // Folder drop: expand the folder into its individual columns/metrics and
+  // hand the accepted subset to the droppable's bulk handler. Only controls
+  // that opt in via `onDropFolder` react (filters, for instance, don't). Each
+  // item is gated by the droppable's own `accept`/`canDrop`, so duplicates and
+  // unsupported types are dropped — satisfying "only add columns not already
+  // present".
+  if (activeData?.type === DndItemType.Folder) {
+    const onDropFolder = overData?.onDropFolder;
+    const items = Array.isArray(activeData.items) ? activeData.items : [];
+    if (!onDropFolder || items.length === 0) {
+      return;

Review Comment:
   True in the abstract, but every control that wires onDropFolder 
(DndColumnSelect, DndColumnMetricSelect, DndMetricSelect) already includes 
DndItemType.Folder in its accept/DND_ACCEPTED_TYPES.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to