Repository navigation
feat(folders): drag and drop visible elements (columns/metrics) of folders in explore view - #42483
Conversation
Code Review Agent Run #20b69eActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The flagged issue is correct. The current implementation of To resolve this, the logic should be updated to evaluate the folder's child items when the active item type is superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx |
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## master #42483 +/- ##
==========================================
+ Coverage 79.42% 79.45% +0.02%
==========================================
Files 2895 2897 +2
Lines 167997 168123 +126
Branches 38903 38952 +49
==========================================
+ Hits 133437 133587 +150
+ Misses 32061 32037 -24
Partials 2499 2499
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Code Review Agent Run #c563d8Actionable Suggestions - 0Filtered by Review RulesBito filtered these suggestions based on rules created automatically for your feedback. Manage rules.
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
@greggailly nice feature, and the regression tests for the single-value folder-drop bug are a good touch. Codeant's thread on |
65d7635 to
9dd953d
Compare
There was a problem hiding this comment.
Code Review Agent Run #e7ae6f
Actionable Suggestions - 1
-
superset-frontend/src/explore/components/DatasourcePanel/types.ts - 1
- Dead code: unused exported interface · Line 36-40
Additional Suggestions - 4
-
superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx - 1
-
Missing component integration test · Line 129-136While resolveCanDrop has unit tests for the pure logic (lines 106-216 of test file), the component-level integration that connects canDrop state to UI feedback is not covered. Tests should verify the ghost button state during folder drags.
-
-
superset-frontend/src/explore/components/DndItemType.ts - 1
-
Missing unit test for new enum · Line 41-42Per adaptive rule [11730], new enum values introduced to support feature functionality should have explicit unit test coverage. While `DndItemType.Folder` is referenced in 19+ locations and tested indirectly via `DndSelectLabel.test.tsx`, there is no dedicated test verifying the `Folder` enum member itself.
-
-
superset-frontend/src/explore/components/DatasourcePanel/types.ts - 1
-
Misleading JSDoc on unused interface · Line 30-35The JSDoc comment on `FolderDndItem` is misleading. It claims drop targets can "reuse their per-item `canDrop`/`onDrop` logic" via the `items` array, but `DndSelectLabel.tsx:81` shows the actual API is `onDropFolder?: (items: DatasourcePanelDndItem[]) => void` — items are passed directly, not wrapped in a `FolderDndItem`. The comment describes functionality that does not exist in the codebase.
-
-
superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx - 1
-
Missing folder drop tests · Line 100-121The `onDropFolder` handler (lines 100-121) is consistent with the `resolveDragEnd` pattern in ExploreDndContext (lines 207-228) and mirrors `DndMetricSelect.tsx` (line 421). No bugs found. However, `DndColumnSelect.test.tsx` lacks coverage for folder drops — add tests similar to the existing `ExploreDndContext.test.tsx` folder-drop cases to verify: (1) folder drop adds accepted columns to multi-select, (2) single-select replaces existing value, (3) empty columnNames is a no-op.
-
Filtered by Review Rules
Bito filtered these suggestions based on rules created automatically for your feedback. Manage rules.
-
superset-frontend/src/explore/components/DatasourcePanel/folderDrag.test.ts - 1
- TypeScript: remove any casts · Line 70-73
Review Details
-
Files reviewed - 17 · Commit Range:
5b39872..96054b6- superset-frontend/src/explore/components/DatasourcePanel/DatasourcePanelItem.tsx
- superset-frontend/src/explore/components/DatasourcePanel/folderDrag.test.ts
- superset-frontend/src/explore/components/DatasourcePanel/folderDrag.ts
- superset-frontend/src/explore/components/DatasourcePanel/types.ts
- superset-frontend/src/explore/components/DndItemType.ts
- superset-frontend/src/explore/components/ExploreContainer/ExploreDndContext.test.tsx
- superset-frontend/src/explore/components/ExploreContainer/ExploreDndContext.tsx
- superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.test.tsx
- superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnMetricSelect.tsx
- superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.test.tsx
- superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndColumnSelect.tsx
- superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.test.tsx
- superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndMetricSelect.tsx
- superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.test.tsx
- superset-frontend/src/explore/components/controls/DndColumnSelectControl/DndSelectLabel.tsx
- superset-frontend/src/explore/components/controls/DndColumnSelectControl/createAdhocMetricFromColumn.test.ts
- superset-frontend/src/explore/components/controls/DndColumnSelectControl/dndTestUtils.ts
-
Files skipped - 0
-
Tools
- Whispers (Secret Scanner) - ✔︎ Successful
- Detect-secrets (Secret Scanner) - ✔︎ Successful
- Eslint (Linter) - ✔︎ Successful
Bito Usage Guide
Commands
Type the following command in the pull request comment and save the comment.
-
/review- Manually triggers a full AI review. -
/pause- Pauses automatic reviews on this pull request. -
/resume- Resumes automatic reviews. -
/resolve- Marks all Bito-posted review comments as resolved. -
/abort- Cancels all in-progress reviews.
Refer to the documentation for additional commands.
Configuration
This repository uses Superset You can customize the agent settings here or contact your Bito workspace admin at [email protected].
Documentation & Help
Code Review Agent Run #e802eeActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
|
@greggailly this is showing conflicts with master now, needs a rebase. Also, @sadpandajoe's comments above (the folder-drag accessibility gap and the semantic-layer/search-filter gating questions) are still open, worth a look before this is ready to merge. Holler if you ant a hand with any of it. |
3d50ec7 to
0b0b44e
Compare
@rusackas something seems off with master (might be on my side but can't see dataset columns anymore in the explore view) so hard to rebase for the moment. I will try to nuke my setup when possible just in case.
|
Code Review Agent Run #b51e8dActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
fc333ef to
3a79d1f
Compare
Code Review Agent Run #4ec878Actionable Suggestions - 0Additional Suggestions - 2
Filtered by Review RulesBito filtered these suggestions based on rules created automatically for your feedback. Manage rules.
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
EnxDev's Review Agent — #42483 · HEAD 3a79d1fcomment — solid feature, well tested; two reviewer threads are still genuinely open and worth a decision before merge ContextAdds folder-level drag-and-drop in Explore (drag a whole folder's columns/metrics onto a dnd field). Classified as feature work (correctness first). CI is green, patch coverage 96%. Several bot reviewers (CodeAnt, Bito) raised issues earlier — I re-verified each against the current diff:
🟡 Should-fix
🙌 Praise
|
|
Thanks @EnxDev ! |
Code Review Agent Run #a1da95Actionable Suggestions - 0Additional Suggestions - 1
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
…flict with expand/collapse keyboard behaviour
…tomatically to COUNT_DISTINCT on folder drop
2932904 to
213e416
Compare
Code Review Agent Run #6dcb20Actionable Suggestions - 0Additional Suggestions - 5
Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
rusackas
left a comment
There was a problem hiding this comment.
Heya @greggailly, this has been through a lot of review rounds now - threads are all resolved and CI's green. Code LGTM, approving!
Three independent collisions, resolved as follows. 1. Compatibility state. Master carries two designs for the same feature: the flat explore.compatibleMetrics/compatibleDimensions fields (apache#37815) and useDatasourceCompatibility, extracted from them in apache#42483 for folder drag sources. This branch replaces the flat fields with a discriminated CompatibilityResult, so after the merge nothing writes them and the hook would read undefined forever -- silently disabling folder-level filtering in DatasourcePanelItem, which this branch never touches. The hook is therefore re-sourced from this branch's selectors with its signature unchanged, so its callers need no edit, and the two DatasourcePanelItem tests that seeded the flat shape are migrated to the new one. 2. Portal timing. Master's antd renders the Select option list into a portal on a later tick, so this branch's synchronous document.querySelector('.ant-select-dropdown-list') reads race it and find null. Reads now go through an awaited getDropdown() accessor, and the post-save onChange assertions are wrapped in waitFor for the same reason. 3. Test files. DndColumnSelect, DndColumnMetricSelect and AdhocFilterEditPopoverSimpleTabContent are both-sides-append conflicts, resolved as the union of both sets. DatasourcePanelDragOption keeps this branch's two tests: master's single test asserts against the flat field that no longer exists. AdhocFilterEditPopoverSimpleTabContent still has 12 failures, but the same 12 fail on untouched master; the merge adds none. Co-Authored-By: Claude Opus 5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01EA4MGEkUcDpyLReqjQBhPy

feat(folders): drag and drop visible elements (columns/metrics) of folders in explore view
SUMMARY
Allow to drag and drop all visible columns of a single folder (including subfolders) onto dnd fields (group by, metrics etc...) in explore view. If columns are currently filtered only filtered columns are added.
Folder can be grabbed by the header.
A small overlay showing the number of columns dragged shows up when dragging.
Already added columns are not added.
If dropped on metrics the "SUM" aggregation is applied by default for numeric values and count distinct for other values .
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Columns with a subfolder:

Metrics just a single subfolder:

TESTING INSTRUCTIONS
ADDITIONAL INFORMATION