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

adjust waterfall chart sidebar CSS to appropriately display border #92191

Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { FunctionComponent } from 'react';
import { StyledComponent } from 'styled-components';
import { EuiPanel, EuiFlexGroup, EuiFlexItem, EuiText, EuiPanelProps } from '@elastic/eui';
import { rgba } from 'polished';
import { FIXED_AXIS_HEIGHT, SIDEBAR_GROW_SIZE } from './constants';
import { FIXED_AXIS_HEIGHT } from './constants';
import { euiStyled, EuiTheme } from '../../../../../../../../../src/plugins/kibana_react/common';

interface WaterfallChartOuterContainerProps {
Expand Down Expand Up @@ -49,7 +49,7 @@ export const WaterfallChartFixedTopContainer = euiStyled(StyledScrollDiv)`
`;

export const WaterfallChartAxisOnlyContainer = euiStyled(EuiFlexItem)`
margin-left: -22px;
margin-left: -16px;
`;

export const WaterfallChartTopContainer = euiStyled(EuiFlexGroup)`
Expand Down Expand Up @@ -83,9 +83,9 @@ interface WaterfallChartSidebarContainer {
}

export const WaterfallChartSidebarWrapper = euiStyled(EuiFlexItem)`
max-width: ${SIDEBAR_GROW_SIZE * 10}%;
z-index: ${(props) => props.theme.eui.euiZLevel5};
`;
min-width: 0;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My original max-width solution was kinda an antipattern. This is the appropriate way to handle flexbox and no-wrap children.

`; // NOTE: min-width: 0 ensures flexbox and no-wrap children can co-exist

export const WaterfallChartSidebarContainer = euiStyled.div<WaterfallChartSidebarContainer>`
height: ${(props) => `${props.height}px`};
Expand Down