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]: use outer layout dimension if exist when export to pdf #194360

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

linghaoSu
Copy link
Contributor

@linghaoSu linghaoSu commented Sep 29, 2024

Summary

Fixes #193748

When exporting to PDF, use the outer dimesion if it exists to avoid PDF stretching

20240929211620_rec_.mp4

@linghaoSu linghaoSu requested a review from a team as a code owner September 29, 2024 13:13
@linghaoSu
Copy link
Contributor Author

@elasticmachine merge upstream

3 similar comments
@linghaoSu
Copy link
Contributor Author

@elasticmachine merge upstream

@linghaoSu
Copy link
Contributor Author

@elasticmachine merge upstream

@linghaoSu
Copy link
Contributor Author

@elasticmachine merge upstream

@linghaoSu linghaoSu force-pushed the fix/lens-pdf-export-strecth branch from 2468553 to 180c0f1 Compare October 10, 2024 15:16
@linghaoSu
Copy link
Contributor Author

Hi @tsullivan,

I'm working on fixing the PDF export issue where it's not using the appropriate container width and height. I need the dimensions of the outerLayout, but I noticed in this commit you removed the layout definition:

https://github.com/elastic/kibana/pull/192530/files#diff-73b930fe3e0489c235ee39548ffb365bd9b32ee8e17d021bc702bc5d219ee5c3L50

However, I can still find it when running, and I need it to get the correct dimensions. I'd like to re-add it, but I'm not sure if this is the best approach to fix the issue.

Could you please provide some guidance?

@linghaoSu
Copy link
Contributor Author

@elasticmachine merge upstream

@linghaoSu
Copy link
Contributor Author

@elasticmachine merge upstream

@eokoneyo eokoneyo added backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development release_note:skip Skip the PR/issue when compiling release notes labels Oct 15, 2024
@tsullivan
Copy link
Member

Hi @tsullivan,

I'm working on fixing the PDF export issue where it's not using the appropriate container width and height. I need the dimensions of the outerLayout, but I noticed in this commit you removed the layout definition:

https://github.com/elastic/kibana/pull/192530/files#diff-73b930fe3e0489c235ee39548ffb365bd9b32ee8e17d021bc702bc5d219ee5c3L50

However, I can still find it when running, and I need it to get the correct dimensions. I'd like to re-add it, but I'm not sure if this is the best approach to fix the issue.

Could you please provide some guidance?

Hi @linghaoSu, sorry for my delay - I was on vacation.

The piece of code you link to is removing a layout field from the ReportingSharingData interface. That interface includes the information that is provided to the sharing modal from the app, and these things are known when the user first clicks the button to open the sharing modal. The layout information doesn't belong in that interface because it depends on the options that the user selects within the sharing modal.

The layout information belongs in the job parameters for reports that are requested. That is the BaseParams interface.

Regarding the issue you are working on, it looks like a duplicate of #183550. @markov00 has done a really good investigation of the problem here: #183550 (comment)

@tsullivan
Copy link
Member

Hi @linghaoSu, are there plans to keep working on this?

@linghaoSu
Copy link
Contributor Author

Hi @linghaoSu, are there plans to keep working on this?

Sorry for the delay, I still have plans to solve this issue this week later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:prev-major Backport to (8.x, 8.17, 8.16) the previous major branch and other branches in development 💝community release_note:skip Skip the PR/issue when compiling release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Table export to pdf results in stretched output
5 participants