From 52e8d1459cebd75b0caddfbff1700efcb21d102c Mon Sep 17 00:00:00 2001
From: "Kim S. Ly" <1557482+lykims@users.noreply.github.com>
Date: Thu, 5 Nov 2020 08:33:56 -0500
Subject: [PATCH] [Lens] Remove visible title in workspace panel (#82234)
---
.../workspace_panel/workspace_panel.tsx | 1 -
.../workspace_panel_wrapper.scss | 11 -------
.../workspace_panel_wrapper.test.tsx | 2 --
.../workspace_panel_wrapper.tsx | 30 ++++---------------
.../test/functional/page_objects/lens_page.ts | 2 +-
5 files changed, 7 insertions(+), 39 deletions(-)
diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx
index e79060fb77329..5a6e9af5d6ff2 100644
--- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx
+++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel.tsx
@@ -309,7 +309,6 @@ export function WorkspacePanel({
title={title}
framePublicAPI={framePublicAPI}
dispatch={dispatch}
- emptyExpression={expression === null}
visualizationState={visualizationState}
visualizationId={activeVisualizationId}
datasourceStates={datasourceStates}
diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.scss b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.scss
index 33b9b2fe1dbf0..ae9294c474b42 100644
--- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.scss
+++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.scss
@@ -11,17 +11,6 @@
position: relative; // For positioning the dnd overlay
min-height: $euiSizeXXL * 10;
- .lnsWorkspacePanelWrapper__pageContentHeader {
- @include euiTitle('xs');
- padding: $euiSizeM;
- // override EuiPage
- margin-bottom: 0 !important; // sass-lint:disable-line no-important
- }
-
- .lnsWorkspacePanelWrapper__pageContentHeader--unsaved {
- color: $euiTextSubduedColor;
- }
-
.lnsWorkspacePanelWrapper__pageContentBody {
@include euiScrollBar;
flex-grow: 1;
diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.test.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.test.tsx
index f7ae7753698bb..6cca42dc1cb93 100644
--- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.test.tsx
+++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.test.tsx
@@ -36,7 +36,6 @@ describe('workspace_panel_wrapper', () => {
visualizationMap={{ myVis: mockVisualization }}
datasourceMap={{}}
datasourceStates={{}}
- emptyExpression={false}
>
@@ -58,7 +57,6 @@ describe('workspace_panel_wrapper', () => {
visualizationMap={{ myVis: { ...mockVisualization, renderToolbar: renderToolbarMock } }}
datasourceMap={{}}
datasourceStates={{}}
- emptyExpression={false}
/>
);
diff --git a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.tsx b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.tsx
index 5cfc269dbb97b..33ddc23312a96 100644
--- a/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.tsx
+++ b/x-pack/plugins/lens/public/editor_frame_service/editor_frame/workspace_panel/workspace_panel_wrapper.tsx
@@ -8,11 +8,9 @@ import './workspace_panel_wrapper.scss';
import React, { useCallback } from 'react';
import { i18n } from '@kbn/i18n';
-import classNames from 'classnames';
import {
EuiPageContent,
EuiPageContentBody,
- EuiPageContentHeader,
EuiFlexGroup,
EuiFlexItem,
EuiScreenReaderOnly,
@@ -27,7 +25,6 @@ export interface WorkspacePanelWrapperProps {
framePublicAPI: FramePublicAPI;
visualizationState: unknown;
dispatch: (action: Action) => void;
- emptyExpression: boolean;
title?: string;
visualizationMap: Record;
visualizationId: string | null;
@@ -47,7 +44,6 @@ export function WorkspacePanelWrapper({
visualizationState,
dispatch,
title,
- emptyExpression,
visualizationId,
visualizationMap,
datasourceMap,
@@ -105,26 +101,12 @@ export function WorkspacePanelWrapper({
- {!emptyExpression || title ? (
-
-
- {title ||
- i18n.translate('xpack.lens.chartTitle.unsaved', { defaultMessage: 'Unsaved' })}
-
-
- ) : (
-
-
- {title ||
- i18n.translate('xpack.lens.chartTitle.unsaved', { defaultMessage: 'Unsaved' })}
-
-
- )}
+
+
+ {title ||
+ i18n.translate('xpack.lens.chartTitle.unsaved', { defaultMessage: 'Unsaved' })}
+
+
{children}
diff --git a/x-pack/test/functional/page_objects/lens_page.ts b/x-pack/test/functional/page_objects/lens_page.ts
index f33fbcf296786..ffb74837e9fdd 100644
--- a/x-pack/test/functional/page_objects/lens_page.ts
+++ b/x-pack/test/functional/page_objects/lens_page.ts
@@ -231,7 +231,7 @@ export function LensPageProvider({ getService, getPageObjects }: FtrProviderCont
},
getTitle() {
- return testSubjects.getVisibleText('lns_ChartTitle');
+ return testSubjects.getAttribute('lns_ChartTitle', 'innerText');
},
async getFiltersAggLabels() {