diff --git a/src/core_plugins/kibana/public/dashboard/dashboard_app.js b/src/core_plugins/kibana/public/dashboard/dashboard_app.js index fd5fc8b77dd392..b4f3e2f69ab43b 100644 --- a/src/core_plugins/kibana/public/dashboard/dashboard_app.js +++ b/src/core_plugins/kibana/public/dashboard/dashboard_app.js @@ -184,14 +184,14 @@ app.directive('dashboardApp', function ($injector) { $scope.addVis = function (hit, showToast = true) { dashboardStateManager.addNewPanel(hit.id, 'visualization'); if (showToast) { - toastNotifications.addSuccess('Added visualization to your dashboard'); + toastNotifications.addSuccess('Visualization was added to your dashboard'); } }; $scope.addSearch = function (hit) { dashboardStateManager.addNewPanel(hit.id, 'search'); toastNotifications.addSuccess({ - title: 'Added saved search to your dashboard', + title: 'Saved search was added to your dashboard', 'data-test-subj': 'addSavedSearchToDashboardSuccess', }); }; @@ -274,7 +274,7 @@ app.directive('dashboardApp', function ($injector) { $scope.kbnTopNav.close('save'); if (id) { toastNotifications.addSuccess({ - title: `Saved '${dash.title}'`, + title: `Dashboard '${dash.title}' was saved`, 'data-test-subj': 'saveDashboardSuccess', }); diff --git a/src/core_plugins/kibana/public/discover/controllers/discover.js b/src/core_plugins/kibana/public/discover/controllers/discover.js index 5e8d5c00149a64..0565b0db4f4a90 100644 --- a/src/core_plugins/kibana/public/discover/controllers/discover.js +++ b/src/core_plugins/kibana/public/discover/controllers/discover.js @@ -417,7 +417,7 @@ function discoverController( if (id) { toastNotifications.addSuccess({ - title: `Saved '${savedSearch.title}'`, + title: `Search '${savedSearch.title}' was saved`, 'data-test-subj': 'saveSearchSuccess', }); diff --git a/src/ui/public/notify/toasts/TOAST_NOTIFICATIONS.md b/src/ui/public/notify/toasts/TOAST_NOTIFICATIONS.md index 714950a82913e0..2610a2ae240fd2 100644 --- a/src/ui/public/notify/toasts/TOAST_NOTIFICATIONS.md +++ b/src/ui/public/notify/toasts/TOAST_NOTIFICATIONS.md @@ -27,7 +27,7 @@ toastNotifications.add('Copied to clipboard'); Let the user know that an action was successful, such as saving or deleting an object. ```js -toastNotifications.addSuccess('Saved document'); +toastNotifications.addSuccess('Your document was saved'); ``` #### Warning @@ -35,7 +35,7 @@ toastNotifications.addSuccess('Saved document'); If something OK or good happened, but perhaps wasn't perfect, show a warning toast. ```js -toastNotifications.addWarning('Saved document, but not edit history'); +toastNotifications.addWarning('Your document was saved, but not its edit history'); ``` #### Danger @@ -51,7 +51,7 @@ toastNotifications.addDanger('An error caused your document to be lost'); Toasts will automatically be dismissed after a brief delay, but if for some reason you want to dismiss a toast, you can use the returned toast from one of the `add` methods and then pass it to `remove`. ```js -const toast = toastNotifications.add('Saved document'); +const toast = toastNotifications.add('Your document was saved'); toastNotifications.remove(toast); ``` @@ -61,7 +61,7 @@ If you want to configure the toast further you can provide an object instead of ```js toastNotifications.add({ - title: 'Saved document', + title: 'Your document was saved', text: 'Only you have access to this document', color: 'success', iconType: 'check', @@ -73,7 +73,7 @@ Because the underlying components are React, you can use JSX to pass in React el ```js toastNotifications.add({ - title: 'Saved document', + title: 'Your document was saved', text: (

@@ -94,7 +94,7 @@ Functional tests are commonly used to verify that a user action yielded a sucess ```js toastNotifications.addSuccess({ - title: 'Saved document', + title: 'Your document was saved', 'data-test-subj': 'saveDocumentSuccess', }); ``` diff --git a/src/ui/public/share/directives/share.js b/src/ui/public/share/directives/share.js index dcce99e548b4e5..1d1416315fa4d6 100644 --- a/src/ui/public/share/directives/share.js +++ b/src/ui/public/share/directives/share.js @@ -153,7 +153,7 @@ app.directive('share', function (Private) { const isCopied = document.execCommand('copy'); if (isCopied) { toastNotifications.add({ - title: 'URL copied to clipboard', + title: 'URL was copied to the clipboard', 'data-test-subj': 'shareCopyToClipboardSuccess', }); } else {