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

[Lens] Fix overlowing content on a chart for charts and table #92006

Merged
merged 2 commits into from
Feb 22, 2021
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
2 changes: 2 additions & 0 deletions x-pack/plugins/lens/public/drag_drop/drag_drop.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@
.lnsDragDrop__container {
position: relative;
overflow: visible !important; // sass-lint:disable-line no-important
width: 100%;
height: 100%;
}

.lnsDragDrop__reorderableDrop {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@ import classNames from 'classnames';
import { FormattedMessage } from '@kbn/i18n/react';
import { Ast } from '@kbn/interpreter/common';
import { i18n } from '@kbn/i18n';
import { EuiFlexGroup, EuiFlexItem, EuiIcon, EuiText, EuiButtonEmpty, EuiLink } from '@elastic/eui';
import {
EuiFlexGroup,
EuiFlexItem,
EuiIcon,
EuiText,
EuiButtonEmpty,
EuiLink,
EuiPageContentBody,
} from '@elastic/eui';
import { CoreStart, CoreSetup } from 'kibana/public';
import {
DataPublicPluginStart,
Expand Down Expand Up @@ -320,10 +328,10 @@ export const InnerWorkspacePanel = React.memo(function InnerWorkspacePanel({
value={dropProps.value}
order={dropProps.order}
>
<div>
<EuiPageContentBody className="lnsWorkspacePanelWrapper__pageContentBody">
{renderVisualization()}
{Boolean(suggestionForDraggedField) && expression !== null && renderEmptyWorkspace()}
</div>
</EuiPageContentBody>
</DragDrop>
</WorkspacePanelWrapper>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
position: relative; // For positioning the dnd overlay
min-height: $euiSizeXXL * 10;
overflow: visible;
border: none;

.lnsWorkspacePanelWrapper__pageContentBody {
@include euiScrollBar;
Expand All @@ -29,44 +30,28 @@
}

.lnsWorkspacePanel__dragDrop {
// Disable the coloring of the DnD for this element as we'll
// Color the whole panel instead
background-color: transparent !important; // sass-lint:disable-line no-important
border: none !important; // sass-lint:disable-line no-important
width: 100%;
height: 100%;
}

.lnsExpressionRenderer {
.lnsDragDrop-isDropTarget & {
transition: filter $euiAnimSpeedNormal ease-in-out, opacity $euiAnimSpeedNormal ease-in-out;
filter: blur($euiSizeXS);
opacity: .25;
}
}

.lnsWorkspacePanel__emptyContent {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
display: flex;
justify-content: center;
align-items: center;
transition: background-color $euiAnimSpeedFast ease-in-out;
border: $euiBorderThin;
border-radius: $euiBorderRadius;

.lnsDragDrop-isDropTarget & {
&.lnsDragDrop-isDropTarget {
@include lnsDroppable;
@include lnsDroppableActive;

p {
transition: filter $euiAnimSpeedFast ease-in-out;
filter: blur(5px);
}

.lnsExpressionRenderer {
transition: filter $euiAnimSpeedNormal ease-in-out, opacity $euiAnimSpeedNormal ease-in-out;
filter: blur($euiSizeXS);
opacity: .25;
}
}

.lnsDragDrop-isActiveDropTarget & {
&.lnsDragDrop-isActiveDropTarget {
@include lnsDroppableActiveHover;

.lnsDropIllustration__hand {
Expand All @@ -75,6 +60,18 @@
}
}

.lnsWorkspacePanel__emptyContent {
position: absolute;
left: 0;
right: 0;
bottom: 0;
top: 0;
display: flex;
justify-content: center;
align-items: center;
transition: background-color $euiAnimSpeedFast ease-in-out;
}

.lnsWorkspacePanelWrapper__toolbar {
margin-bottom: 0;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@ import './workspace_panel_wrapper.scss';

import React, { useCallback } from 'react';
import { i18n } from '@kbn/i18n';
import {
EuiPageContent,
EuiPageContentBody,
EuiFlexGroup,
EuiFlexItem,
EuiScreenReaderOnly,
} from '@elastic/eui';
import { EuiPageContent, EuiFlexGroup, EuiFlexItem, EuiScreenReaderOnly } from '@elastic/eui';
import { Datasource, FramePublicAPI, Visualization } from '../../../types';
import { NativeRenderer } from '../../../native_renderer';
import { Action } from '../state_management';
Expand Down Expand Up @@ -130,9 +124,7 @@ export function WorkspacePanelWrapper({
})}
</h1>
</EuiScreenReaderOnly>
<EuiPageContentBody className="lnsWorkspacePanelWrapper__pageContentBody">
{children}
</EuiPageContentBody>
{children}
</EuiPageContent>
</>
);
Expand Down