From dd35d9b22a6ea0f5033c677275b1b37c1b5a43c3 Mon Sep 17 00:00:00 2001 From: Wylie Conlon Date: Tue, 29 Oct 2019 15:39:51 -0400 Subject: [PATCH] [Lens] Remove default title, tweak text for consistency (#49394) (#49666) * [Lens] Remove default title, tweak text for consistency * Remove unused * Text update --- .../components/field_chooser/discover_field_search.tsx | 4 ++-- .../editor_frame/editor_frame.test.tsx | 6 +++--- .../editor_frame_plugin/editor_frame/state_management.ts | 3 +-- .../editor_frame/workspace_panel_wrapper.tsx | 8 +++++--- .../plugins/lens/public/indexpattern_plugin/datapanel.tsx | 4 ++-- .../legacy/plugins/lens/public/register_vis_type_alias.ts | 2 +- 6 files changed, 14 insertions(+), 13 deletions(-) diff --git a/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_field_search.tsx b/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_field_search.tsx index f748cdae1b4f..1577b4deece5 100644 --- a/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_field_search.tsx +++ b/src/legacy/core_plugins/kibana/public/discover/components/field_chooser/discover_field_search.tsx @@ -68,7 +68,7 @@ export function DiscoverFieldSearch({ defaultMessage: 'Show field filter settings', }); const searchPlaceholder = i18n.translate('kbn.discover.fieldChooser.searchPlaceHolder', { - defaultMessage: 'Search fields', + defaultMessage: 'Search field names', }); return ( @@ -97,7 +97,7 @@ export function DiscoverFieldSearch({ > diff --git a/x-pack/legacy/plugins/lens/public/editor_frame_plugin/editor_frame/editor_frame.test.tsx b/x-pack/legacy/plugins/lens/public/editor_frame_plugin/editor_frame/editor_frame.test.tsx index fb3f8774be92..d21e7d4601ba 100644 --- a/x-pack/legacy/plugins/lens/public/editor_frame_plugin/editor_frame/editor_frame.test.tsx +++ b/x-pack/legacy/plugins/lens/public/editor_frame_plugin/editor_frame/editor_frame.test.tsx @@ -1509,7 +1509,7 @@ describe('editor_frame', () => { query: { query: '', language: 'lucene' }, filters: [], }, - title: 'New visualization', + title: '', type: 'lens', visualizationType: 'testVis', }, @@ -1528,7 +1528,7 @@ describe('editor_frame', () => { query: { query: '', language: 'lucene' }, filters: [], }, - title: 'New visualization', + title: '', type: 'lens', visualizationType: 'testVis', }, @@ -1585,7 +1585,7 @@ describe('editor_frame', () => { query: { query: 'new query', language: 'lucene' }, filters: [], }, - title: 'New visualization', + title: '', type: 'lens', visualizationType: 'testVis', }, diff --git a/x-pack/legacy/plugins/lens/public/editor_frame_plugin/editor_frame/state_management.ts b/x-pack/legacy/plugins/lens/public/editor_frame_plugin/editor_frame/state_management.ts index 5104ace7c79a..78a9a13f48d6 100644 --- a/x-pack/legacy/plugins/lens/public/editor_frame_plugin/editor_frame/state_management.ts +++ b/x-pack/legacy/plugins/lens/public/editor_frame_plugin/editor_frame/state_management.ts @@ -4,7 +4,6 @@ * you may not use this file except in compliance with the Elastic License. */ -import { i18n } from '@kbn/i18n'; import { EditorFrameProps } from '../editor_frame'; import { Document } from '../../persistence/saved_object_store'; @@ -113,7 +112,7 @@ export const getInitialState = (props: EditorFrameProps): EditorFrameState => { } return { - title: i18n.translate('xpack.lens.chartTitle', { defaultMessage: 'New visualization' }), + title: '', datasourceStates, activeDatasourceId: getInitialDatasourceId(props), visualization: { diff --git a/x-pack/legacy/plugins/lens/public/editor_frame_plugin/editor_frame/workspace_panel_wrapper.tsx b/x-pack/legacy/plugins/lens/public/editor_frame_plugin/editor_frame/workspace_panel_wrapper.tsx index 18d5feac4edb..cc91510146f3 100644 --- a/x-pack/legacy/plugins/lens/public/editor_frame_plugin/editor_frame/workspace_panel_wrapper.tsx +++ b/x-pack/legacy/plugins/lens/public/editor_frame_plugin/editor_frame/workspace_panel_wrapper.tsx @@ -15,9 +15,11 @@ interface Props { export function WorkspacePanelWrapper({ children, title }: Props) { return ( - - {title} - + {title && ( + + {title} + + )} {children} diff --git a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.tsx b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.tsx index 35bb3d2de019..bd6dd6dca0c5 100644 --- a/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.tsx +++ b/x-pack/legacy/plugins/lens/public/indexpattern_plugin/datapanel.tsx @@ -320,7 +320,7 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({ className="euiFieldText euiFieldText--fullWidth lnsInnerIndexPatternDataPanel__textField" data-test-subj="lnsIndexPatternFieldSearch" placeholder={i18n.translate('xpack.lens.indexPatterns.filterByNameLabel', { - defaultMessage: 'Search for fields', + defaultMessage: 'Search field names', description: 'Search the list of fields in the index pattern for the provided text', })} @@ -339,7 +339,7 @@ export const InnerIndexPatternDataPanel = function InnerIndexPatternDataPanel({ id="dataPanelTypeFilter" panelClassName="euiFilterGroup__popoverPanel" panelPaddingSize="none" - anchorPosition="downLeft" + anchorPosition="rightDown" display="block" isOpen={localState.isTypeFilterOpen} closePopover={() => setLocalState(() => ({ ...localState, isTypeFilterOpen: false }))} diff --git a/x-pack/legacy/plugins/lens/public/register_vis_type_alias.ts b/x-pack/legacy/plugins/lens/public/register_vis_type_alias.ts index 8c0b9cb25300..562d0f0ef613 100644 --- a/x-pack/legacy/plugins/lens/public/register_vis_type_alias.ts +++ b/x-pack/legacy/plugins/lens/public/register_vis_type_alias.ts @@ -20,7 +20,7 @@ visualizations.types.registerAlias({ }), }, title: i18n.translate('xpack.lens.visTypeAlias.title', { - defaultMessage: 'Lens Visualizations', + defaultMessage: 'Lens', }), description: i18n.translate('xpack.lens.visTypeAlias.description', { defaultMessage: `Lens is a simpler way to create basic visualizations`,