mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
Bring toast copy in line with writing style. (#16752)
This commit is contained in:
parent
5c180d0c93
commit
6c57778245
4 changed files with 11 additions and 11 deletions
|
@ -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',
|
||||
});
|
||||
|
||||
|
|
|
@ -417,7 +417,7 @@ function discoverController(
|
|||
|
||||
if (id) {
|
||||
toastNotifications.addSuccess({
|
||||
title: `Saved '${savedSearch.title}'`,
|
||||
title: `Search '${savedSearch.title}' was saved`,
|
||||
'data-test-subj': 'saveSearchSuccess',
|
||||
});
|
||||
|
||||
|
|
|
@ -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: (
|
||||
<div>
|
||||
<p>
|
||||
|
@ -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',
|
||||
});
|
||||
```
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue