Skip to content

Conversation

@ersin-erdal
Copy link
Contributor

Backport

This will backport the following commits from main to 8.19:

Questions ?

Please refer to the Backport tool documentation

Fixes: elastic#227187

When we request a report we send the target element's width and use it
to create a browser window.
Therefore the element's width becomes the window width. When the
side-nav is visible on the page, it pushes the dashboard to the right
and makes it smaller. As we take only the target element's screenshot
and use the width we passed as param as image width in the pdf, it
becomes skewed.

This PR removes the side-nav from the page during the report generation.
So the dashboard uses the full window width which is the original number
we passed initially.

## To verify:

Add `Sample web logs` data.
Change the solution view in the Space to something other than Classic.
Go to `Dashboards > Sample Logs Data` and generate a PDF report.
The screenshot should not be skewed.

Add the below config to your kibana.yml
```
feature_flags.overrides:
  core.chrome.projectSideNav: 'v2'
```
Go to `Dashboards > Sample Logs Data` and generate a PDF report.
The fix should be working with the new side-nav as well.

(cherry picked from commit fa3bcdf)

# Conflicts:
#	src/core/packages/chrome/browser-internal/src/ui/project/navigation.tsx
#	src/core/packages/chrome/browser-internal/src/ui/project/sidenav_v2/fixed_layout_sidenav.tsx
@ersin-erdal ersin-erdal added the backport This PR is a backport of another PR label Sep 12, 2025
@ersin-erdal ersin-erdal enabled auto-merge (squash) September 12, 2025 13:30
@elasticmachine
Copy link
Contributor

@ersin-erdal ersin-erdal enabled auto-merge (squash) September 12, 2025 13:57
@ersin-erdal ersin-erdal merged commit 2cc9641 into elastic:8.19 Sep 12, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a backport of another PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants