[Reporting] When capturing screenshots only set viewport size for print-layout reports #125056
Labels
(Deprecated) Feature:Reporting
Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead
enhancement
New value added to drive a business result
impact:low
Addressing this issue will have a low level of impact on the quality/strength of our product.
loe:small
Small Level of Effort
When taking a screenshot in Chromium we
setViewport
just before we get to the step of taking the screenshots. This can lead to a race condition with browser reflows (mitigated in this PR #123820).We can mitigate this further by only calling for viewport resizing when it is actually necessary: PDF print-optimised reports. In this type of report we need to set the height based on the number visualisations which is only known once the browser is open and we have had a chance to count the visualisations. One alternative could be that we send a count of the visualisations on the client request but this could create a race-condition between generating a report and updates a user may make (e.g., removing a vis) in that time.
Full context of behind this reasoning: #123820 (comment)
The text was updated successfully, but these errors were encountered: