Repository navigation
Conversation
Dashboard form data has no slice_name, so contributed download items received "Untitled chart". Use the dashboard layout's name (override first), as the modal title does.
orion222
requested review from
geido,
michael-s-molina,
msyavuz,
rusackas,
sadpandajoe and
villebro
as code owners
November 4, 2026 16:58
orion222
marked this pull request as draft
November 4, 2026 16:58
2 of 9 tasks
✅ Deploy Preview for superset-docs-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Contributor
orion222
marked this pull request as ready for review
November 4, 2026 17:27
Author
|
I only added the new string to |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #46014 +/- ##
==========================================
+ Coverage 84.93% 84.99% +0.06%
==========================================
Files 3077 3081 +4
Lines 208205 209154 +949
Branches 49105 49228 +123
==========================================
+ Hits 176834 177778 +944
+ Misses 28002 27995 -7
- Partials 3369 3381 +12
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:
|
- Add a public ChartDataRequest type and return it from getPayload, so surfaces no longer cast or spread the payload. - ChartDownloadProvider resolves the menu items itself; consumers only read them, so dropdowns outside a provider no longer subscribe to an unrelated location with a dummy context. - The dashboard chart menu and Drill to Detail use the title shown on the dashboard, including a dashboard-level rename.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
SUMMARY
Lets extensions add their own entries to the chart and dashboard Download menus, and show Superset toasts. This is the frontend half of the work the Google Sheets export extension needs. Superset itself gains no Google-specific code: it never learns what a contributed item does.
Download menu locations. Eight new menu locations, one per download menu that offers "Export to Excel":
explore.chart.download,explore.chart.download.pivotedexplore.standalone.downloaddashboard.chart.download,dashboard.chart.download.pivotedchart.drillDetail.downloadchart.drillBy.downloaddashboard.download{ getPayload, chartName, canDownload }.getPayload()builds, at click time, the same query context the CSV export would post, withresult_format: 'json'.{ dashboardId, dashboardTitle, activeDataMask, canDownload }. The mask holds the applied native filters, each withextraFormDataplusfilterState.All of this goes through one shared hook,
useExtensionMenuItems. The drill modals receive their context from a React provider, so props aren't threaded through the four components that sit between the modal and its download menu.Toasts API.
@apache-superset/coregains atoastsnamespace that mirrors Superset's own action-creator names:addInfoToast,addSuccessToast,addWarningToast,addDangerToast(text, { link?, duration? })andremoveToast(id).linkrenders as a button that opens the URL in a new tab throughopenInNewTab, so it goes through the navigation safety guard. Toasts with a link stay open until closed.Docs. New
extension-points/download-menus.mdandextensions/toasts.mdpages, linked fromcontribution-types.mdandsidebars.js.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
gsheet-integration-test.mp4
TESTING INSTRUCTIONS
Automated:
JEST_MAX_WORKERS=2 npm run test(full frontend suite): 1455 suites passed. Six suites failed only because their Jest workers ran out of memory or segfaulted on a shared machine, and all six passed when re-run on their own (196/196 tests).pre-commit run --from-ref 891d780223 --to-ref HEAD: oxfmt, oxlint, custom rules and stylelint passed. Two hooks couldn't run cleanly locally:oxlint (docs)needsyarn, which isn't installed here.Type-Checking (Frontend)failed only on errors from unbuilt plugin libraries (TS6305), which are already onmaster. None are in files this PR changes.Manual:
getPayload()resolves to the chart's query context.window.superset.toasts.addSuccessToast('Done', { link: { href: 'https://example.com', label: 'Open' } }). The toast stays open, and its button opens the link in a new tab.ADDITIONAL INFORMATION
Sibling PR: #45991