-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Reporting] Remove
preserve_layout
injected css (#126475)
* remove unnecessary CSS * removed unused discover injected CSS * move visualize-specific css to visualize * added some comments * added missing mock Co-authored-by: Kibana Machine <[email protected]>
- Loading branch information
1 parent
12f42e0
commit d53154e
Showing
5 changed files
with
74 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
src/plugins/visualizations/public/visualize_screenshot_mode.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* hide unusable controls */ | ||
/* TODO: This is the legacy way of hiding chrome elements. Rather use chrome.setIsVisible */ | ||
kbn-top-nav, | ||
filter-bar, | ||
.kbnTopNavMenu__wrapper, | ||
::-webkit-scrollbar, | ||
.euiNavDrawer { | ||
display: none !important; | ||
} | ||
|
||
/* hide unusable controls | ||
* !important is required to override resizable panel inline display */ | ||
.visEditorScreenshotModeActive .visEditor__content .visEditor--default > :not(.visEditor__visualization__wrapper) { | ||
display: none !important; | ||
} | ||
|
||
/** THIS IS FOR TSVB UNTIL REFACTOR **/ | ||
.visEditorScreenshotModeActive .tvbEditorVisualization { | ||
position: static !important; | ||
} | ||
.visEditorScreenshotModeActive .visualize .tvbVisTimeSeries__legendToggle { | ||
/* all non-content rows in interface */ | ||
display: none; | ||
} | ||
|
||
.visEditorScreenshotModeActive .tvbEditor--hideForReporting { | ||
/* all non-content rows in interface */ | ||
display: none; | ||
} | ||
/** END TSVB BAD BAD HACKS **/ | ||
|
||
/* remove left padding from visualizations so that map lines up with .leaflet-container and | ||
* setting the position to be fixed and to take up the entire screen, because some zoom levels/viewports | ||
* are triggering the media breakpoints that cause the .visEditor__canvas to take up more room than the viewport */ | ||
|
||
.visEditorScreenshotModeActive .visEditor .visEditor__canvas { | ||
padding-left: 0; | ||
position: fixed; | ||
width: 100%; | ||
height: 100%; | ||
top: 0; | ||
left: 0; | ||
} | ||
|
||
/** | ||
* Visualization tweaks | ||
*/ | ||
|
||
/* hide unusable controls */ | ||
.visEditorScreenshotModeActive .visualize .visLegend__toggle, | ||
.visEditorScreenshotModeActive .visualize .kbnAggTable__controls, | ||
.visEditorScreenshotModeActive .visualize .leaflet-container .leaflet-top.leaflet-left, | ||
.visEditorScreenshotModeActive .visualize paginate-controls /* page numbers */ { | ||
display: none; | ||
} | ||
|
||
/* Ensure the min-height of the small breakpoint isn't used */ | ||
.visEditorScreenshotModeActive .vis-editor visualization { | ||
min-height: 0 !important; | ||
} |
80 changes: 3 additions & 77 deletions
80
x-pack/plugins/screenshotting/server/layouts/preserve_layout.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,93 +1,19 @@ | ||
/* | ||
****** | ||
****** This is a collection of CSS overrides that make Kibana look better for | ||
****** generating PDF reports with headless browser | ||
****** | ||
*/ | ||
|
||
/** | ||
* global | ||
* Global utilities | ||
*/ | ||
|
||
/* elements can hide themselves when shared */ | ||
.hide-for-sharing { | ||
display: none !important; | ||
} | ||
|
||
/* hide unusable controls */ | ||
kbn-top-nav, | ||
filter-bar, | ||
.kbnTopNavMenu__wrapper, | ||
::-webkit-scrollbar, | ||
.euiNavDrawer { | ||
display: none !important; | ||
} | ||
|
||
/** | ||
* Discover Tweaks | ||
*/ | ||
|
||
/* hide unusable controls */ | ||
discover-app .dscTimechart, | ||
discover-app .dscSidebar__container, | ||
discover-app .dscCollapsibleSidebar__collapseButton, | ||
discover-app .discover-table-footer { | ||
display: none; | ||
} | ||
* Global overrides | ||
*/ | ||
|
||
/** | ||
* The global banner (e.g. "Help us improve Elastic...") should not print. | ||
*/ | ||
#globalBannerList { | ||
display: none; | ||
} | ||
|
||
/** | ||
* Visualize Editor Tweaks | ||
*/ | ||
|
||
/* hide unusable controls | ||
* !important is required to override resizable panel inline display */ | ||
.visEditor__content .visEditor--default > :not(.visEditor__visualization__wrapper) { | ||
display: none !important; | ||
} | ||
|
||
/** THIS IS FOR TSVB UNTIL REFACTOR **/ | ||
.tvbEditorVisualization { | ||
position: static !important; | ||
} | ||
.visualize .tvbVisTimeSeries__legendToggle, | ||
.tvbEditor--hideForReporting { | ||
/* all non-content rows in interface */ | ||
display: none; | ||
} | ||
/** END TSVB BAD BAD HACKS **/ | ||
|
||
/* remove left padding from visualizations so that map lines up with .leaflet-container and | ||
* setting the position to be fixed and to take up the entire screen, because some zoom levels/viewports | ||
* are triggering the media breakpoints that cause the .visEditor__canvas to take up more room than the viewport */ | ||
.visEditor .visEditor__canvas { | ||
padding-left: 0px; | ||
position: fixed; | ||
width: 100%; | ||
height: 100%; | ||
top: 0; | ||
left: 0; | ||
} | ||
|
||
/** | ||
* Visualization tweaks | ||
*/ | ||
|
||
/* hide unusable controls */ | ||
.visualize .visLegend__toggle, | ||
.visualize .kbnAggTable__controls/* export raw, export formatted, etc. */ , | ||
.visualize .leaflet-container .leaflet-top.leaflet-left/* tilemap controls */ , | ||
.visualize paginate-controls /* page numbers */ { | ||
display: none; | ||
} | ||
|
||
/* Ensure the min-height of the small breakpoint isn't used */ | ||
.vis-editor visualization { | ||
min-height: 0 !important; | ||
} |