Skip to content

Commit a41739e

Browse files
authored
[7.x] [Lens] Histogram/range operation new copy (#78328) (#79118)
* 💬 New copy revision for histogram/range operation in lens * 👌 Updated panel copy * 👌 Change copy based on feedback
1 parent ad40cf2 commit a41739e

File tree

4 files changed

+31
-14
lines changed

4 files changed

+31
-14
lines changed

x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,7 @@ export function DimensionEditor(props: DimensionEditorProps) {
257257
<div className="lnsIndexPatternDimensionEditor__section lnsIndexPatternDimensionEditor__section--shaded">
258258
<EuiFormLabel>
259259
{i18n.translate('xpack.lens.indexPattern.functionsLabel', {
260-
defaultMessage: 'Choose a function',
260+
defaultMessage: 'Select a function',
261261
})}
262262
</EuiFormLabel>
263263
<EuiSpacer size="s" />
@@ -277,7 +277,7 @@ export function DimensionEditor(props: DimensionEditorProps) {
277277
<EuiFormRow
278278
data-test-subj="indexPattern-field-selection-row"
279279
label={i18n.translate('xpack.lens.indexPattern.chooseField', {
280-
defaultMessage: 'Choose a field',
280+
defaultMessage: 'Select a field',
281281
})}
282282
fullWidth
283283
isInvalid={Boolean(incompatibleSelectedOperationType || currentFieldIsInvalid)}

x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/advanced_editor.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,15 +208,15 @@ export const AdvancedRangeEditor = ({
208208

209209
return (
210210
<EuiFormRow
211-
label={i18n.translate('xpack.lens.indexPattern.ranges.intervals', {
212-
defaultMessage: 'Intervals',
211+
label={i18n.translate('xpack.lens.indexPattern.ranges.customRanges', {
212+
defaultMessage: 'Ranges',
213213
})}
214214
labelAppend={
215215
<EuiText size="xs">
216216
<EuiLink color="danger" onClick={onToggleEditor}>
217217
<EuiIcon size="s" type="cross" color="danger" />{' '}
218-
{i18n.translate('xpack.lens.indexPattern.ranges.customIntervalsRemoval', {
219-
defaultMessage: 'Remove custom intervals',
218+
{i18n.translate('xpack.lens.indexPattern.ranges.customRangesRemoval', {
219+
defaultMessage: 'Remove custom ranges',
220220
})}
221221
</EuiLink>
222222
</EuiText>
@@ -286,8 +286,8 @@ export const AdvancedRangeEditor = ({
286286
addNewRange();
287287
setIsOpenByCreation(true);
288288
}}
289-
label={i18n.translate('xpack.lens.indexPattern.ranges.addInterval', {
290-
defaultMessage: 'Add interval',
289+
label={i18n.translate('xpack.lens.indexPattern.ranges.addRange', {
290+
defaultMessage: 'Add range',
291291
})}
292292
/>
293293
</>

x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/range_editor.tsx

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import {
1515
EuiFlexGroup,
1616
EuiButtonIcon,
1717
EuiToolTip,
18+
EuiIconTip,
1819
} from '@elastic/eui';
1920
import { IFieldFormat } from 'src/plugins/data/public';
2021
import { RangeColumnParams, UpdateParamsFnType, MODES_TYPES } from './ranges';
@@ -45,8 +46,14 @@ const BaseRangeEditor = ({
4546
);
4647

4748
const granularityLabel = i18n.translate('xpack.lens.indexPattern.ranges.granularity', {
48-
defaultMessage: 'Granularity',
49+
defaultMessage: 'Intervals granularity',
4950
});
51+
const granularityLabelDescription = i18n.translate(
52+
'xpack.lens.indexPattern.ranges.granularityDescription',
53+
{
54+
defaultMessage: 'Divides the field into evenly spaced intervals.',
55+
}
56+
);
5057
const decreaseButtonLabel = i18n.translate('xpack.lens.indexPattern.ranges.decreaseButtonLabel', {
5158
defaultMessage: 'Decrease granularity',
5259
});
@@ -57,7 +64,17 @@ const BaseRangeEditor = ({
5764
return (
5865
<>
5966
<EuiFormRow
60-
label={granularityLabel}
67+
label={
68+
<>
69+
{granularityLabel}{' '}
70+
<EuiIconTip
71+
position="right"
72+
content={granularityLabelDescription}
73+
type="questionInCircle"
74+
color="subdued"
75+
/>
76+
</>
77+
}
6178
data-test-subj="indexPattern-ranges-section-label"
6279
labelType="legend"
6380
fullWidth
@@ -91,7 +108,7 @@ const BaseRangeEditor = ({
91108
/>
92109
</EuiFlexItem>
93110
<EuiFlexItem grow={false}>
94-
<EuiToolTip content={decreaseButtonLabel} delay="long">
111+
<EuiToolTip content={increaseButtonLabel} delay="long">
95112
<EuiButtonIcon
96113
iconType="plusInCircle"
97114
color="text"
@@ -108,7 +125,7 @@ const BaseRangeEditor = ({
108125

109126
<EuiButtonEmpty size="xs" iconType="controlsHorizontal" onClick={() => onToggleEditor()}>
110127
{i18n.translate('xpack.lens.indexPattern.ranges.customIntervalsToggle', {
111-
defaultMessage: 'Create custom intervals',
128+
defaultMessage: 'Create custom ranges',
112129
})}
113130
</EuiButtonEmpty>
114131
</>

x-pack/plugins/lens/public/indexpattern_datasource/operations/definitions/ranges/ranges.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,8 @@ function getEsAggsParams({ sourceField, params }: RangeIndexPatternColumn) {
7878

7979
export const rangeOperation: OperationDefinition<RangeIndexPatternColumn, 'field'> = {
8080
type: 'range',
81-
displayName: i18n.translate('xpack.lens.indexPattern.ranges', {
82-
defaultMessage: 'Ranges',
81+
displayName: i18n.translate('xpack.lens.indexPattern.intervals', {
82+
defaultMessage: 'Intervals',
8383
}),
8484
priority: 4, // Higher than terms, so numbers get histogram
8585
input: 'field',

0 commit comments

Comments
 (0)