Skip to content

[9.1] [Fix] Hide chrome when printing (#227095)#227387

Merged
kibanamachine merged 1 commit intoelastic:9.1from
kibanamachine:backport/9.1/pr-227095
Jul 10, 2025
Merged

[9.1] [Fix] Hide chrome when printing (#227095)#227387
kibanamachine merged 1 commit intoelastic:9.1from
kibanamachine:backport/9.1/pr-227095

Conversation

@kibanamachine
Copy link
Contributor

Backport

This will backport the following commits from main to 9.1:

Questions ?

Please refer to the Backport tool documentation

## Summary

fix elastic#226865

Proposed quick fix for elastic#226865.
The main reason the dashboard print looks broken is that the new
navigation is expanded by default, pushing the content to the side. In
this PR, we use existing, well-tested functionality—chrome visibility—to
hide the chrome along with the navigation and allow printing to focus on
the main content: the dashboard.

The printing is still not ideal, but at least usable

[example good
export.pdf](https://github.com/user-attachments/files/21125283/example.good.export.pdf)

## Release Notes

Hide Kibana's header and side navigation when trying to print or use the
dashboard export with print mode.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
(cherry picked from commit 6130f2b)
@kibanamachine kibanamachine added the backport This PR is a backport of another PR label Jul 10, 2025
@kibanamachine kibanamachine enabled auto-merge (squash) July 10, 2025 09:12
@kibanamachine kibanamachine merged commit 15c4508 into elastic:9.1 Jul 10, 2025
16 checks passed
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Module Count

Fewer modules leads to a faster build time

id before after diff
core 404 405 +1

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
core 457.1KB 457.4KB +228.0B
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

3 participants