CodeWithPravinMaske opened a new pull request, #45619: URL: https://github.com/apache/superset/pull/45619
### SUMMARY Big Number (KPI) charts show a single final number. Their Download menu still offered "Export to .CSV", "Export to Excel" and "Export as PDF", although there is no table of data worth exporting, and a PDF of the card is the same picture as the PNG (the PDF/PNG chart exports came with #38535). This keeps the image exports (JPEG, PNG) and hides the data and PDF exports for `big_number`, `big_number_total` and `pop_kpi`: - dashboard chart menu (`SliceHeaderControls`): CSV, Excel and PDF are hidden for these chart types - Explore "Data Export Options" (`useExploreAdditionalActionsMenu`): CSV, JSON, Excel and PDF are hidden under both "Export All Data" and "Export Current View" The rule lives in one helper, `isImageOnlyExportViz`, so other single-value chart types can be added later. All other chart types are unchanged. I did not find an earlier discussion about whether these chart types should get the data and PDF exports (the review of #38535 was about code structure and tests), so I am happy to adjust which chart types are included, or to turn this into a per-viz setting if maintainers prefer. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Before: Download menu of a Big Number chart lists .CSV, Excel, screenshot (jpeg), screenshot (png), PDF. After: only screenshot (jpeg) and screenshot (png). (screenshots attached below) ### TESTING INSTRUCTIONS 1. Open a dashboard with a Big Number chart > chart three-dot menu > Download: only the image exports are listed. 2. Same on a table chart: CSV, Excel, JPEG, PNG and PDF are still listed. 3. In Explore with a Big Number chart > Data Export Options: only the image exports are listed. A table chart still shows all. Unit tests: `SliceHeaderControls.test.tsx`, `useExploreAdditionalActionsMenu.test.tsx`, `isImageOnlyExportViz.test.ts`. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [ ] Required feature flags: - [x] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [x] Removes existing feature or API (CSV/Excel/PDF menu items for Big Number charts only) -- 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]
