tahvane1 opened a new pull request, #35484:
URL: https://github.com/apache/superset/pull/35484

   
   ### SUMMARY
   Screenshots via Celery and Playwright were cut to visible area.
   
   I used a lot of time trying to figure out what broke dashboard screenshots 
as this really was showstopper for us... But I guess it was accidental that it 
worked in the beginning.
   
   This is documentation from locator.screenshot that was used before for both 
dashboards and charts.
   
   > This method captures a screenshot of the page, clipped to the size and 
position of a particular element matching the locator. If the element is 
covered by other elements, it will not be actually visible on the screenshot. 
If the element is a scrollable container, only the currently scrolled content 
will be visible on the screenshot.
   
   So it seems that it works now exactly as documented by Playwright. I changed 
dashboard export to use page.screenshot instead with full_page param set and 
now it works without issues.
   
   I'm assuming this also renders SCREENSHOT_TILED_ENABLED obsolete as to me it 
seems to do roughly the same thing but without user set limits (and it also 
works if dashboard is smaller than set limits).
   
   Issue exist with master and 6.0 branches.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   Before
   <img width="3200" height="2400" alt="before" 
src="https://github.com/user-attachments/assets/aee58e1e-e0e5-4bc2-aa4d-d3735fcac333";
 />
   
   
   After
   <img width="3200" height="3264" alt="after" 
src="https://github.com/user-attachments/assets/a832863d-b1bc-4d00-bf51-1061a088d4bd";
 />
   
   ### TESTING INSTRUCTIONS
   <!--- Required! What steps can be taken to manually verify the changes? -->
   
   Tested with Chromium and Following flags enabled
   ALERT_REPORTS
   ENABLE_DASHBOARD_SCREENSHOT_ENDPOINTS
   ENABLE_DASHBOARD_DOWNLOAD_WEBDRIVER_SCREENSHOT
   PLAYWRIGHT_REPORTS_AND_THUMBNAILS
   
   Download dashboard...
   
   ### ADDITIONAL INFORMATION
   Fixes #31158 
   
   - [X] Has associated issue: 31158
   - [ ] Required feature flags:
   - [ ] 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
   - [ ] Removes existing feature or API
   


-- 
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]

Reply via email to