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

[7.x] [Logs / Metrics UI] Handle index.scss (#58219) #58484

Merged
merged 2 commits into from
Feb 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions x-pack/plugins/infra/public/apps/start_app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
KibanaContextProvider,
} from '../../../../../src/plugins/kibana_react/public';
import { AppRouter } from '../routers';
import '../index.scss';

export const CONTAINER_CLASSNAME = 'infra-container-element';

Expand Down Expand Up @@ -74,12 +75,8 @@ export async function startApp(
</KibanaContextProvider>
);

// Ensure the element we're handed from application mounting takes up
// the full size it can, so that our inner application styles work as
// expected.
element.style.height = '100%';
element.style.display = 'flex';
element.style.overflowY = 'hidden'; // Prevent having scroll within a container having scroll. It messes up with drag-n-drop elements
// Ensure the element we're handed from application mounting is assigned a class
// for our index.scss styles to apply to.
element.className += ` ${CONTAINER_CLASSNAME}`;

ReactDOM.render(<App />, element);
Expand Down
29 changes: 1 addition & 28 deletions x-pack/plugins/infra/public/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,13 @@

/* Infra plugin styles */

// Prefix all styles with "inf" to avoid conflicts.
// Examples
// infChart
// infChart__legend
// infChart__legend--small
// infChart__legend-isLoading

.infReactRoot {
.infra-container-element {
background-color: $euiColorEmptyShade;
position: absolute;
top: 0;
left: 0;
bottom: 0;
right: 0;
// display: flex;
// flex-direction: column;
align-items: flex-start;
flex: 1 0 auto;
overflow-x: hidden;
Expand All @@ -27,21 +18,3 @@
flex-direction: column;
}

// This is a temporary workaround for https://github.com/elastic/kibana/issues/39808
// A real fix will most likely depend on changes in elastic-charts.

.infrastructureChart .echTooltip {
max-width: 90vw;
}

.infrastructureChart .echTooltip__label {
overflow-x: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}

.metricsExplorerTitleAnchor {
white-space: nowrap;
text-overflow: ellipsis;
display: inline;
}