jenwitteng commented on issue #29719: URL: https://github.com/apache/superset/issues/29719#issuecomment-5116385623
@rusackas your diagnosis matches exactly what I hit. `Download as Image`/`Download as PDF` capture the live DOM client-side, so the `isCurrentUserBot()` bypass that covers scheduled reports and thumbnails never applies, and any row unmounted by `DASHBOARD_VIRTUALIZATION` is captured as a `<Loading>` spinner. Disabling the flag "fixes" it only because every chart then stays mounted. I built a fix for this on our fork a while back and it's held up in production. The approach is the "force a full render before capturing" one you suggested: 1. A pair of window events — `superset-force-all-in-view` / `superset-restore-virtualization`. `Row` listens: on force it disconnects its IntersectionObservers and renders; on restore it re-observes. 2. `downloadAsImage`/`downloadAsPdf` dispatch the force event, poll until the `.loading` spinners inside the capture container clear (timeout + "export may be incomplete" toast), capture, then restore on every exit path (including error/early-return, so a failed export never leaves virtualization disabled for the session). All gated on `DASHBOARD_VIRTUALIZATION`. Are you still working on a fix? If not, I'm happy to open a PR with this — I have it ready to go. Didn't want to duplicate anything you have in flight. -- 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]
