Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1143,7 +1143,7 @@ describe('editor_frame', () => {
.find(EuiPanel)
.map((el) => el.parents(EuiToolTip).prop('content'))
).toEqual([
'Current',
'Current visualization',
'Suggestion1',
'Suggestion2',
'Suggestion3',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
// Padding / negative margins to make room for overflow shadow
padding-left: $euiSizeXS;
margin-left: -$euiSizeXS;
padding-bottom: $euiSizeXS;
}

.lnsSuggestionPanel__button {
Expand All @@ -27,13 +28,31 @@
margin-left: $euiSizeXS / 2;
margin-bottom: $euiSizeXS / 2;

&:focus {
@include euiFocusRing;
transform: none !important; // sass-lint:disable-line no-important
}

.lnsSuggestionPanel__expressionRenderer {
position: static; // Let the progress indicator position itself against the button
}
}

.lnsSuggestionPanel__button-isSelected {
Copy link
Contributor

@MichaelMarcialis MichaelMarcialis Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a border-color: $euiColorMediumShade; within this selector's (.lnsSuggestionPanel__button-isSelected) styles. I think this added contrast will help the selected button stand out just a bit more.

Copy link
Contributor

@MichaelMarcialis MichaelMarcialis Dec 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also add the following nested styles within this selector's (.lnsSuggestionPanel__button-isSelected) styles. Doing so will prevent the selected button from transitioning up 2px on hover (which feels odd on the selected button).

&:hover {
  transform: none !important; // sass-lint:disable-line no-important
}

@include euiFocusRing;
background-color: $euiColorLightestShade !important; // sass-lint:disable-line no-important
border-color: $euiColorMediumShade;

&:not(:focus) {
box-shadow: none !important; // sass-lint:disable-line no-important
}

&:focus {
@include euiFocusRing;
}

&:hover {
transform: none !important; // sass-lint:disable-line no-important
}
}

.lnsSuggestionPanel__suggestionIcon {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ describe('suggestion_panel', () => {
.find('[data-test-subj="lnsSuggestion"]')
.find(EuiPanel)
.map((el) => el.parents(EuiToolTip).prop('content'))
).toEqual(['Current', 'Suggestion1', 'Suggestion2']);
).toEqual(['Current visualization', 'Suggestion1', 'Suggestion2']);
});

describe('uncommitted suggestions', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,8 @@ const SuggestionPreview = ({
paddingSize="none"
data-test-subj="lnsSuggestion"
onClick={onSelect}
aria-current={!!selected}
aria-label={preview.title}
>
{preview.expression || preview.error ? (
<PreviewRenderer
Expand Down Expand Up @@ -356,7 +358,7 @@ export function SuggestionPanel({
visualizationMap[currentVisualizationId].getDescription(currentVisualizationState)
.icon || 'empty',
title: i18n.translate('xpack.lens.suggestions.currentVisLabel', {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: Please remove the translations for this phrase

defaultMessage: 'Current',
defaultMessage: 'Current visualization',
}),
}}
ExpressionRenderer={AutoRefreshExpressionRenderer}
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 @@ -10797,7 +10797,6 @@
"xpack.lens.shared.nestedLegendLabel": "ネスト済み",
"xpack.lens.sugegstion.refreshSuggestionLabel": "更新",
"xpack.lens.suggestion.refreshSuggestionTooltip": "選択したビジュアライゼーションに基づいて、候補を更新します。",
"xpack.lens.suggestions.currentVisLabel": "現在",
"xpack.lens.visTypeAlias.title": "レンズビジュアライゼーション",
"xpack.lens.visTypeAlias.type": "レンズ",
"xpack.lens.xyChart.addLayer": "レイヤーを追加",
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 @@ -10810,7 +10810,6 @@
"xpack.lens.shared.nestedLegendLabel": "嵌套",
"xpack.lens.sugegstion.refreshSuggestionLabel": "刷新",
"xpack.lens.suggestion.refreshSuggestionTooltip": "基于选定可视化刷新建议。",
"xpack.lens.suggestions.currentVisLabel": "当前",
"xpack.lens.visTypeAlias.title": "Lens 可视化",
"xpack.lens.visTypeAlias.type": "Lens",
"xpack.lens.xyChart.addLayer": "添加图层",
Expand Down