Skip to content

Commit

Permalink
[Discover] Remove redundant "Filter was added" toast (#155645)
Browse files Browse the repository at this point in the history
Closes #154993

## Summary

This PR removes "Filter was added" toast (it was visible after adding
filters from the Doc Viewer flyout) which was not very useful. It's also
not shown when user adds filters from the grid or sidebar.
  • Loading branch information
jughosta authored Apr 26, 2023
1 parent bd443ea commit 7534cc7
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,18 +217,7 @@ export function DiscoverGridFlyout({
hit={actualHit}
columns={columns}
dataView={dataView}
filter={
onFilter
? (mapping, value, mode) => {
onFilter(mapping, value, mode);
services.toastNotifications.addSuccess(
i18n.translate('discover.grid.flyout.toastFilterAdded', {
defaultMessage: `Filter was added`,
})
);
}
: undefined
}
filter={onFilter}
onRemoveColumn={(columnName: string) => {
onRemoveColumn(columnName);
services.toastNotifications.addSuccess(
Expand Down
1 change: 0 additions & 1 deletion x-pack/plugins/translations/translations/fr-FR.json
Original file line number Diff line number Diff line change
Expand Up @@ -2362,7 +2362,6 @@
"discover.grid.flyout.documentNavigation": "Navigation dans le document",
"discover.grid.flyout.toastColumnAdded": "La colonne \"{columnName}\" a été ajoutée.",
"discover.grid.flyout.toastColumnRemoved": "La colonne \"{columnName}\" a été supprimée.",
"discover.grid.flyout.toastFilterAdded": "Le filtre a été ajouté.",
"discover.grid.selectDoc": "Sélectionner le document \"{rowNumber}\"",
"discover.grid.tableRow.detailHeading": "Document développé",
"discover.grid.tableRow.viewSingleDocumentLinkTextSimple": "Document unique",
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 @@ -2362,7 +2362,6 @@
"discover.grid.flyout.documentNavigation": "ドキュメントナビゲーション",
"discover.grid.flyout.toastColumnAdded": "列'{columnName}'が追加されました",
"discover.grid.flyout.toastColumnRemoved": "列'{columnName}'が削除されました",
"discover.grid.flyout.toastFilterAdded": "フィルターが追加されました",
"discover.grid.selectDoc": "ドキュメント'{rowNumber}'を選択",
"discover.grid.tableRow.detailHeading": "拡張ドキュメント",
"discover.grid.tableRow.viewSingleDocumentLinkTextSimple": "1つのドキュメント",
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 @@ -2362,7 +2362,6 @@
"discover.grid.flyout.documentNavigation": "文档导航",
"discover.grid.flyout.toastColumnAdded": "已添加列“{columnName}”",
"discover.grid.flyout.toastColumnRemoved": "已移除列“{columnName}”",
"discover.grid.flyout.toastFilterAdded": "已添加筛选",
"discover.grid.selectDoc": "选择文档“{rowNumber}”",
"discover.grid.tableRow.detailHeading": "已展开文档",
"discover.grid.tableRow.viewSingleDocumentLinkTextSimple": "单个文档",
Expand Down

0 comments on commit 7534cc7

Please sign in to comment.