Skip to content

Conversation

@alex-poor
Copy link

  • Add download button with CSV/XLS options to drill detail modal
  • Reuse existing chart export infrastructure
  • Maintain query context and filters in downloads
  • Support both CSV and XLSX formats

Closes #27607

SUMMARY

Adds CSV and XLSX download functionality to the "Drill to Detail" modal, addressing feature request #27607.

Users can now export drill-down data directly from the detail modal, matching the download capability already available at the chart level. This enhancement uses the existing export infrastructure, maintaining consistency with current download patterns.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
No download option in drill detail modal

After:
Added download button with CSV and XLSX export options:
swappy-20260114-103419

Download menu with format options:
swappy-20260114-103459

Successfully exported data:
swappy-20260114-103709

TEST PLAN

Manual Testing Completed:

  • Created multiple chart types (bar, line, table) with drill-to-detail capability
  • Verified download button appears in drill detail modal header
  • Tested CSV export - data matches modal display
  • Tested XLSX export - data matches modal display
  • Verified downloads maintain all drill-down filters
  • Tested with large datasets (500+ rows) - download completes successfully
  • Verified special characters (UTF-8) export correctly
  • Tested with various data types (text, numbers, dates, nulls)
  • Confirmed no console errors during operation
  • Verified UI follows existing Superset design patterns
  • Download button placement matches chart-level download UX

Automated Testing:

  • Frontend production build completes successfully (npm run build)
  • ESLint passes with no errors
  • All existing tests pass (CI will verify)

Browser Testing:

  • Tested on: Chromium (primary development browser)/Firefox
  • Expected to work on: Chrome, Safari, Edge (standard download API)

Edge Cases Verified:

  • Empty drill results: Download creates file with headers only
  • Null values: Exported as empty cells
  • Long text fields: Properly escaped in CSV
  • Date/datetime fields: Formatted consistently

ADDITIONAL INFORMATION

Implementation Details:

  • Leverages existing download infrastructure from chart-level exports
  • Uses standard browser download API (no new dependencies)
  • Download button integrated into drill detail modal header/footer
  • Supports both CSV and XLSX formats via existing export endpoints
  • Query context (filters, groupings, drill-down parameters) preserved in exports
  • File naming follows pattern: [timestamp].[csv|xlsx]

Code Changes:

  • Modified: superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.tsx
  • Added download button component with dropdown menu
  • Wired click handlers to existing export functions
  • No backend changes required - uses existing API endpoints

Design Decisions:

  • Placed download button in modal footer alongside "Edit Chart" button for consistency
  • Reused Icons.DownOutlined and Ant Design Dropdown for familiar UX
  • Matched styling/behavior of chart-level download for consistency
  • Used existing translation keys where possible

Technical Notes:

  • No database migrations required
  • No new API endpoints needed
  • Backward compatible - works with existing Superset installations
  • No performance impact on modal rendering
  • File generation handled by existing backend CSV/XLS writers

Future Enhancements (Out of Scope):

  • Additional export formats (JSON, Parquet)
  • Download progress indicator for very large datasets
  • Custom file naming options

Related Issues:
Closes #27607

CONTRIBUTING.md Checklist:

Attribution: claude-code utilised to draft this code and PR.

- Add download button with CSV/XLS options to drill detail modal
- Reuse existing chart export infrastructure
- Maintain query context and filters in downloads
- Support both CSV and XLSX formats

Closes apache#27607
@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI is reviewing your PR.


Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 13, 2026

Code Review Agent Run #4e45c3

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 987047c..987047c
    • superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ 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 evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

@codeant-ai-for-open-source
Copy link
Contributor

CodeAnt AI finished reviewing your PR.

@netlify
Copy link

netlify bot commented Jan 13, 2026

Deploy Preview for superset-docs-preview ready!

Name Link
🔨 Latest commit 987047c
🔍 Latest deploy log https://app.netlify.com/projects/superset-docs-preview/deploys/6966be4501ab4200085954ca
😎 Deploy Preview https://deploy-preview-37109--superset-docs-preview.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

- Updated DrillDetailModal.tsx:83-89 to use single menu.onClick handler that dispatches based on the item's key
- Added closeModal={onHideModal} to the ModalFooter component at line 239.
@bito-code-review
Copy link
Contributor

bito-code-review bot commented Jan 13, 2026

Code Review Agent Run #90b8b6

Actionable Suggestions - 0
Review Details
  • Files reviewed - 1 · Commit Range: 987047c..e99354f
    • superset-frontend/src/components/Chart/DrillDetail/DrillDetailModal.tsx
  • Files skipped - 0
  • Tools
    • Whispers (Secret Scanner) - ✔︎ Successful
    • Detect-secrets (Secret Scanner) - ✔︎ 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 evan@preset.io.

Documentation & Help

AI Code Review powered by Bito Logo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant