Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Reporting] When capturing screenshots only set viewport size for print-layout reports #125056

Closed
jloleysens opened this issue Feb 9, 2022 · 6 comments
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

Comments

@jloleysens
Copy link
Contributor

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)

@jloleysens jloleysens added enhancement New value added to drive a business result (Deprecated) Feature:Reporting Use Reporting:Screenshot, Reporting:CSV, or Reporting:Framework instead loe:small Small Level of Effort impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. Team:Reporting Services labels Feb 9, 2022
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-reporting-services (Team:Reporting Services)

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-services (Team:AppServicesUx)

@jloleysens
Copy link
Contributor Author

CC @tsullivan

@exalate-issue-sync exalate-issue-sync bot added impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. and removed impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. labels Feb 10, 2022
@tsullivan
Copy link
Member

We need to aggressively avoid resize events before capturing a screenshot. The app can not uphold its contract with reporting that all panels will be visible, if there were instances of resizing. #131605 (comment)

@tsullivan
Copy link
Member

We need to aggressively avoid resize events before capturing a screenshot. The app can not uphold its contract with reporting that all panels will be visible, if there were instances of resizing. #131605 (comment)

In #131877, I am adding debug logging to track when resizing happens. Based on a little bit of testing, resizing is actually just happening for print layout PDF reports.

So, I think this issue is actually not urgent, since we're actively working on re-implementing print layout PDF reports.

@tsullivan tsullivan added impact:low Addressing this issue will have a low level of impact on the quality/strength of our product. and removed impact:high Addressing this issue will have a high level of impact on the quality/strength of our product. labels May 10, 2022
@tsullivan
Copy link
Member

Duplicate of #131111 and fixed in that issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

3 participants