-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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] Remove preserve_layout
injected css
#126475
[Reporting] Remove preserve_layout
injected css
#126475
Conversation
Pinging @elastic/kibana-reporting-services (Team:Reporting Services) |
Pinging @elastic/kibana-app-services (Team:AppServicesSv) |
/** | ||
* global | ||
* Global utilities | ||
*/ | ||
|
||
/* elements can hide themselves when shared */ | ||
.hide-for-sharing { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can open up a follow-up issue to address this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think what you wrote about just doing this in JS within the screenshotting plugin is a good idea
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested and everything still seems to work fine
There are a few automated tests that ensure that the latest PNG reports visually match a baseline image, which should give a lot of confidence here :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Summary
Closes #120348
This PR removes the global injection of app-specific styles in Screenshotting in
preserve_layout
except for two rules:Both of which may introduce changes that are beyond the scope of this PR:
.hide-for-sharing
is used in a number of places, but can easily be removed and driven by JS (screenshotMode)#globalBannerList
is perhaps slightly trickier since that code does not live inside of plugins (lives in core). We may have to leave this for now, although it is only present inpreserve_layout
screenshots. Perhaps it could safely be removed?The primary motivation behind this is to move related code closer together, and out of Reporting which should not know anything about these apps. Functionally, this PR should not change anything. We should still have the same styles as before when taking screenshots (please test!). Per @tsullivan - we do have functional tests that should give more peace-of-mind for this refactor.
Additional notes