Skip to content

Commit

Permalink
[Lens] Remove default title, tweak text for consistency (#49394)
Browse files Browse the repository at this point in the history
* [Lens] Remove default title, tweak text for consistency

* Remove unused

* Text update
  • Loading branch information
Wylie Conlon authored Oct 29, 2019
1 parent 77792af commit e3ec773
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down Expand Up @@ -97,7 +97,7 @@ export function DiscoverFieldSearch({
>
<FormattedMessage
id="kbn.discover.fieldChooser.fieldFilterFacetButtonLabel"
defaultMessage="Fields filtered"
defaultMessage="Filter by type"
/>
</EuiFacetButton>
</React.Fragment>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1520,7 +1520,7 @@ describe('editor_frame', () => {
query: { query: '', language: 'lucene' },
filters: [],
},
title: 'New visualization',
title: '',
type: 'lens',
visualizationType: 'testVis',
},
Expand All @@ -1539,7 +1539,7 @@ describe('editor_frame', () => {
query: { query: '', language: 'lucene' },
filters: [],
},
title: 'New visualization',
title: '',
type: 'lens',
visualizationType: 'testVis',
},
Expand Down Expand Up @@ -1596,7 +1596,7 @@ describe('editor_frame', () => {
query: { query: 'new query', language: 'lucene' },
filters: [],
},
title: 'New visualization',
title: '',
type: 'lens',
visualizationType: 'testVis',
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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';

Expand Down Expand Up @@ -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: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ interface Props {
export function WorkspacePanelWrapper({ children, title }: Props) {
return (
<EuiPageContent className="lnsWorkspacePanelWrapper">
<EuiPageContentHeader className="lnsWorkspacePanelWrapper__pageContentHeader">
<span data-test-subj="lns_ChartTitle">{title}</span>
</EuiPageContentHeader>
{title && (
<EuiPageContentHeader className="lnsWorkspacePanelWrapper__pageContentHeader">
<span data-test-subj="lns_ChartTitle">{title}</span>
</EuiPageContentHeader>
)}
<EuiPageContentBody className="lnsWorkspacePanelWrapper__pageContentBody">
{children}
</EuiPageContentBody>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
})}
Expand All @@ -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 }))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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`,
Expand Down

0 comments on commit e3ec773

Please sign in to comment.