Skip to content

Commit

Permalink
new design
Browse files Browse the repository at this point in the history
  • Loading branch information
mbondyra committed Aug 19, 2020
1 parent c3d130d commit ea914d7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,9 +186,13 @@ export const InnerFieldItem = function InnerFieldItem(props: FieldItemProps) {
? i18n.translate('xpack.lens.indexPattern.fieldItemTooltip', {
defaultMessage: 'Drag and drop to visualize.',
})
: i18n.translate('xpack.lens.indexPattern.fieldStatsButtonLabel', {
: exists
? i18n.translate('xpack.lens.indexPattern.fieldStatsButtonLabel', {
defaultMessage: 'Click for a field preview, or drag and drop to visualize.',
})
: i18n.translate('xpack.lens.indexPattern.fieldStatsButtonLabel', {
defaultMessage: 'No data for this field. Drag and drop to visualize.',
})
}
type="iInCircle"
color="subdued"
Expand Down Expand Up @@ -217,11 +221,7 @@ export const InnerFieldItem = function InnerFieldItem(props: FieldItemProps) {
isDraggable
isActive={infoIsOpen}
data-test-subj={`lnsFieldListPanelField-${field.name}`}
onClick={() => {
if (exists) {
togglePopover();
}
}}
onClick={togglePopover}
aria-label={i18n.translate('xpack.lens.indexPattern.fieldStatsButtonAriaLabel', {
defaultMessage: '{fieldName}: {fieldType}. Hit enter for a field preview.',
values: {
Expand Down Expand Up @@ -313,7 +313,8 @@ function FieldItemPopoverContents(props: State & FieldItemProps) {
return (
<EuiText size="s">
{i18n.translate('xpack.lens.indexPattern.fieldStatsNoData', {
defaultMessage: 'No data to display.',
defaultMessage:
'This field is empty because it doesn’t exist in the 500 sampled documents.',
})}
</EuiText>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,13 +65,7 @@ export const InnerFieldsAccordion = function InnerFieldsAccordion({
}: FieldsAccordionProps) {
const renderField = useCallback(
(field: IndexPatternField) => (
<FieldItem
{...fieldProps}
key={field.name}
field={field}
exists={!!exists}
hideDetails={!exists}
/>
<FieldItem {...fieldProps} key={field.name} field={field} exists={!!exists} />
),
[fieldProps, exists]
);
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/ja-JP.json
Original file line number Diff line number Diff line change
Expand Up @@ -9941,7 +9941,6 @@
"xpack.lens.indexPattern.fieldStatsButtonLabel": "フィールドプレビューを表示するには、クリックします。可視化するには、ドラッグアンドドロップします。",
"xpack.lens.indexPattern.fieldStatsCountLabel": "カウント",
"xpack.lens.indexPattern.fieldStatsDisplayToggle": "次のどちらかを切り替えます:",
"xpack.lens.indexPattern.fieldStatsNoData": "表示するデータがありません",
"xpack.lens.indexPattern.fieldTimeDistributionLabel": "時間分布",
"xpack.lens.indexPattern.fieldTopValuesLabel": "トップの値",
"xpack.lens.indexPattern.groupByDropdown": "グループ分けの条件",
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -9944,7 +9944,6 @@
"xpack.lens.indexPattern.fieldStatsButtonLabel": "单击以进行字段预览,或拖放以进行可视化。",
"xpack.lens.indexPattern.fieldStatsCountLabel": "计数",
"xpack.lens.indexPattern.fieldStatsDisplayToggle": "切换",
"xpack.lens.indexPattern.fieldStatsNoData": "没有可显示的数据",
"xpack.lens.indexPattern.fieldTimeDistributionLabel": "时间分布",
"xpack.lens.indexPattern.fieldTopValuesLabel": "排名最前值",
"xpack.lens.indexPattern.groupByDropdown": "分组依据",
Expand Down

0 comments on commit ea914d7

Please sign in to comment.