mirror of
https://github.com/apache/superset.git
synced 2026-07-16 03:35:45 +00:00
Add PER_CHART_DASHBOARD_REPORTS feature flag (default off). When enabled,
dashboard reports capture each chart individually and stack the images in
a single column, instead of one monolithic full-dashboard screenshot.
The report scheduler navigates to the dashboard permalink once — so tab
state and dashboard filters apply to every chart — then iterates over each
chart holder, waiting only for that chart's own loading spinner before
capturing it. One slow chart can no longer block or blank the entire
report; charts that never finish loading are skipped with a warning while
the rest are still delivered.
This mirrors the per-component delivery model used by Metabase (per-card
subscriptions) and Looker ("arrange dashboard tiles in a single column").
- take_per_chart_screenshots() in screenshot_utils.py: per-chart iteration,
scroll-into-view for lazy loading, per-chart spinner wait, skip-on-timeout
- WebDriverPlaywright.get_per_chart_screenshots(): single navigation with
auth and permalink context, Playwright-only
- DashboardScreenshot.get_per_chart_screenshots(): returns None on Selenium
so callers fall back to the full-dashboard screenshot
- _get_screenshots() in execute.py: uses per-chart capture for dashboard
reports when the flag is on; falls back to the full screenshot if no
charts were captured
- Existing build_pdf_from_screenshots() stacks the per-chart images as PDF
pages; PNG/Slack formats already accept image lists
POC for sc-113551. Not yet included: per-report-schedule toggle in the UI,
chart title/header treatment, placeholder for skipped charts.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>