From 0c9988c809f53ae7f3286041e196c427e35f6061 Mon Sep 17 00:00:00 2001 From: Andrea Del Rio Date: Fri, 16 Dec 2022 14:26:42 -0800 Subject: [PATCH 1/4] updating filters in Discover --- .../components/discover_grid/discover_grid_cell_actions.tsx | 4 ++-- .../doc_table/components/table_row/table_cell_actions.tsx | 4 ++-- .../doc_viewer_table/legacy/table_row_btn_filter_add.tsx | 2 +- .../doc_viewer_table/legacy/table_row_btn_filter_remove.tsx | 2 +- .../components/doc_viewer_table/table_cell_actions.tsx | 4 ++-- .../public/components/field_popover/field_popover_header.tsx | 2 +- .../public/components/field_stats/field_top_values_bucket.tsx | 4 ++-- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/plugins/discover/public/components/discover_grid/discover_grid_cell_actions.tsx b/src/plugins/discover/public/components/discover_grid/discover_grid_cell_actions.tsx index b785615068385..1d19cc77dda7b 100644 --- a/src/plugins/discover/public/components/discover_grid/discover_grid_cell_actions.tsx +++ b/src/plugins/discover/public/components/discover_grid/discover_grid_cell_actions.tsx @@ -46,7 +46,7 @@ export const FilterInBtn = ({ onClick={() => { onFilterCell(context, rowIndex, columnId, '+'); }} - iconType="plusInCircle" + iconType="filterInclude" aria-label={buttonTitle} title={buttonTitle} data-test-subj="filterForButton" @@ -74,7 +74,7 @@ export const FilterOutBtn = ({ onClick={() => { onFilterCell(context, rowIndex, columnId, '-'); }} - iconType="minusInCircle" + iconType="filterExclude" aria-label={buttonTitle} title={buttonTitle} data-test-subj="filterOutButton" diff --git a/src/plugins/discover/public/components/doc_table/components/table_row/table_cell_actions.tsx b/src/plugins/discover/public/components/doc_table/components/table_row/table_cell_actions.tsx index f252c8d801399..ce0f2b14c1cd9 100644 --- a/src/plugins/discover/public/components/doc_table/components/table_row/table_cell_actions.tsx +++ b/src/plugins/discover/public/components/doc_table/components/table_row/table_cell_actions.tsx @@ -33,7 +33,7 @@ export const TableCellActions = ({ handleFilterFor, handleFilterOut }: TableCell })} onClick={handleFilterFor} > - + @@ -52,7 +52,7 @@ export const TableCellActions = ({ handleFilterFor, handleFilterOut }: TableCell })} onClick={handleFilterOut} > - + diff --git a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/legacy/table_row_btn_filter_add.tsx b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/legacy/table_row_btn_filter_add.tsx index ac3768cb96ecd..c7ef8e6278fbc 100644 --- a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/legacy/table_row_btn_filter_add.tsx +++ b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/legacy/table_row_btn_filter_add.tsx @@ -39,7 +39,7 @@ export function DocViewTableRowBtnFilterAdd({ onClick, disabled = false }: Props data-test-subj="addInclusiveFilterButton" disabled={disabled} onClick={onClick} - iconType={'plusInCircle'} + iconType={'filterInclude'} iconSize={'s'} /> diff --git a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/legacy/table_row_btn_filter_remove.tsx b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/legacy/table_row_btn_filter_remove.tsx index bfde1318ce91c..dd40e83d49456 100644 --- a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/legacy/table_row_btn_filter_remove.tsx +++ b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/legacy/table_row_btn_filter_remove.tsx @@ -39,7 +39,7 @@ export function DocViewTableRowBtnFilterRemove({ onClick, disabled = false }: Pr data-test-subj="removeInclusiveFilterButton" disabled={disabled} onClick={onClick} - iconType={'minusInCircle'} + iconType={'filterExclude'} iconSize={'s'} /> diff --git a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table_cell_actions.tsx b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table_cell_actions.tsx index 9f29f3ba7f69f..15fbe0458acc0 100644 --- a/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table_cell_actions.tsx +++ b/src/plugins/discover/public/services/doc_views/components/doc_viewer_table/table_cell_actions.tsx @@ -138,7 +138,7 @@ export const TableActions = ({ name: filterAddLabel, 'aria-label': filterAddAriaLabel, toolTipContent: filtersPairToolTip, - icon: 'plusInCircle', + icon: 'filterInclude', disabled: filtersPairDisabled, 'data-test-subj': `addFilterForValueButton-${field}`, onClick: onClickAction(onFilter.bind({}, fieldMapping, flattenedField, '+')), @@ -147,7 +147,7 @@ export const TableActions = ({ name: filterOutLabel, 'aria-label': filterOutAriaLabel, toolTipContent: filtersPairToolTip, - icon: 'minusInCircle', + icon: 'filterExclude', disabled: filtersPairDisabled, onClick: onClickAction(onFilter.bind({}, fieldMapping, flattenedField, '-')), }, diff --git a/src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx b/src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx index 131273fbb4d42..5dc85300b38fa 100644 --- a/src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx +++ b/src/plugins/unified_field_list/public/components/field_popover/field_popover_header.tsx @@ -90,7 +90,7 @@ export const FieldPopoverHeader: React.FC = ({ data-test-subj={`fieldPopoverHeader_addField-${field.name}`} aria-label={addFieldToWorkspaceTooltip} {...(buttonAddFieldToWorkspaceProps || {})} - iconType="plusInCircle" + iconType="plusInCircleFilled" onClick={() => { closePopover(); onAddFieldToWorkspace(field); diff --git a/src/plugins/unified_field_list/public/components/field_stats/field_top_values_bucket.tsx b/src/plugins/unified_field_list/public/components/field_stats/field_top_values_bucket.tsx index ccae2a3dfffc1..50786423a58e1 100755 --- a/src/plugins/unified_field_list/public/components/field_stats/field_top_values_bucket.tsx +++ b/src/plugins/unified_field_list/public/components/field_stats/field_top_values_bucket.tsx @@ -148,7 +148,7 @@ const FieldTopValuesBucket: React.FC = ({
onAddFilter(field, fieldValue, '+')} aria-label={i18n.translate( 'unifiedFieldList.fieldStats.filterValueButtonAriaLabel', @@ -169,7 +169,7 @@ const FieldTopValuesBucket: React.FC = ({ /> onAddFilter(field, fieldValue, '-')} aria-label={i18n.translate( 'unifiedFieldList.fieldStats.filterOutValueButtonAriaLabel', From 647d36f6090dc964783280542fbd1e1118b50d5e Mon Sep 17 00:00:00 2001 From: Andrea Del Rio Date: Fri, 16 Dec 2022 15:06:44 -0800 Subject: [PATCH 2/4] update dv filter icons --- .../application/common/components/top_values/top_values.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x-pack/plugins/data_visualizer/public/application/common/components/top_values/top_values.tsx b/x-pack/plugins/data_visualizer/public/application/common/components/top_values/top_values.tsx index dec10fb528422..43894be86b475 100644 --- a/x-pack/plugins/data_visualizer/public/application/common/components/top_values/top_values.tsx +++ b/x-pack/plugins/data_visualizer/public/application/common/components/top_values/top_values.tsx @@ -137,7 +137,7 @@ export const TopValues: FC = ({ stats, fieldFormat, barColor, compressed, > onAddFilter( fieldName, @@ -164,7 +164,7 @@ export const TopValues: FC = ({ stats, fieldFormat, barColor, compressed, /> onAddFilter( fieldName, From c6b994572e198407e5b57a03fbe29f864eb3a13e Mon Sep 17 00:00:00 2001 From: Andrea Del Rio Date: Fri, 16 Dec 2022 15:35:04 -0800 Subject: [PATCH 3/4] update tests --- .../table_row/__snapshots__/table_cell.test.tsx.snap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/discover/public/components/doc_table/components/table_row/__snapshots__/table_cell.test.tsx.snap b/src/plugins/discover/public/components/doc_table/components/table_row/__snapshots__/table_cell.test.tsx.snap index 555be566a5082..291ef57a1aa2f 100644 --- a/src/plugins/discover/public/components/doc_table/components/table_row/__snapshots__/table_cell.test.tsx.snap +++ b/src/plugins/discover/public/components/doc_table/components/table_row/__snapshots__/table_cell.test.tsx.snap @@ -138,11 +138,11 @@ exports[`Doc table cell component renders a cell with filter buttons if it is fi @@ -262,11 +262,11 @@ exports[`Doc table cell component renders a cell with filter buttons if it is fi From f94a93cfe5513b518b75f621d354d77121ca80b3 Mon Sep 17 00:00:00 2001 From: Andrea Del Rio Date: Mon, 19 Dec 2022 12:49:59 -0800 Subject: [PATCH 4/4] more ML updates --- .../components/anomalies_table/influencers_cell.js | 4 ++-- .../public/application/components/entity_cell/entity_cell.tsx | 4 ++-- .../explorer_chart_label/entity_filter/entity_filter.tsx | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/x-pack/plugins/ml/public/application/components/anomalies_table/influencers_cell.js b/x-pack/plugins/ml/public/application/components/anomalies_table/influencers_cell.js index b77fa308bdd8f..64a434df8dbd6 100644 --- a/x-pack/plugins/ml/public/application/components/anomalies_table/influencers_cell.js +++ b/x-pack/plugins/ml/public/application/components/anomalies_table/influencers_cell.js @@ -67,7 +67,7 @@ export class InfluencersCell extends Component { '+' ); })} - iconType="plusInCircle" + iconType="filterInclude" aria-label={i18n.translate( 'xpack.ml.anomaliesTable.influencersCell.addFilterAriaLabel', { @@ -94,7 +94,7 @@ export class InfluencersCell extends Component { '-' ); })} - iconType="minusInCircle" + iconType="filterExclude" aria-label={i18n.translate( 'xpack.ml.anomaliesTable.influencersCell.removeFilterAriaLabel', { diff --git a/x-pack/plugins/ml/public/application/components/entity_cell/entity_cell.tsx b/x-pack/plugins/ml/public/application/components/entity_cell/entity_cell.tsx index defe64583e927..c9a601b2188f9 100644 --- a/x-pack/plugins/ml/public/application/components/entity_cell/entity_cell.tsx +++ b/x-pack/plugins/ml/public/application/components/entity_cell/entity_cell.tsx @@ -46,7 +46,7 @@ function getAddFilter({ entityName, entityValue, filter }: EntityCellProps) { onClick={blurButtonOnClick(() => { filter(entityName, entityValue, ENTITY_FIELD_OPERATIONS.ADD); })} - iconType="plusInCircle" + iconType="filterInclude" aria-label={i18n.translate('xpack.ml.anomaliesTable.entityCell.addFilterAriaLabel', { defaultMessage: 'Add filter', })} @@ -74,7 +74,7 @@ function getRemoveFilter({ entityName, entityValue, filter }: EntityCellProps) { onClick={blurButtonOnClick(() => { filter(entityName, entityValue, ENTITY_FIELD_OPERATIONS.REMOVE); })} - iconType="minusInCircle" + iconType="filterExclude" aria-label={i18n.translate('xpack.ml.anomaliesTable.entityCell.removeFilterAriaLabel', { defaultMessage: 'Remove filter', })} diff --git a/x-pack/plugins/ml/public/application/explorer/explorer_charts/components/explorer_chart_label/entity_filter/entity_filter.tsx b/x-pack/plugins/ml/public/application/explorer/explorer_charts/components/explorer_chart_label/entity_filter/entity_filter.tsx index 15822d74d08d5..952100f4db1d1 100644 --- a/x-pack/plugins/ml/public/application/explorer/explorer_charts/components/explorer_chart_label/entity_filter/entity_filter.tsx +++ b/x-pack/plugins/ml/public/application/explorer/explorer_charts/components/explorer_chart_label/entity_filter/entity_filter.tsx @@ -49,7 +49,7 @@ export const EntityFilter: FC = ({ action: ENTITY_FIELD_OPERATIONS.ADD, }); })} - iconType="plusInCircle" + iconType="filterInclude" aria-label={i18n.translate('xpack.ml.entityFilter.addFilterAriaLabel', { defaultMessage: 'Add filter for {influencerFieldName} {influencerFieldValue}', values: { influencerFieldName, influencerFieldValue }, @@ -74,7 +74,7 @@ export const EntityFilter: FC = ({ action: ENTITY_FIELD_OPERATIONS.REMOVE, }); })} - iconType="minusInCircle" + iconType="filterExclude" aria-label={i18n.translate('xpack.ml.entityFilter.removeFilterAriaLabel', { defaultMessage: 'Remove filter for {influencerFieldName} {influencerFieldValue}', values: { influencerFieldName, influencerFieldValue },