[Dashboard] Prevent overflowing dashboard title on save toast (#172620)

Fixes #153552 

## Summary

Prevent long dashboard name from overflowing toast notification on save.

<img width="450" alt="Screenshot 2023-12-05 at 2 06 49 PM"
src="6e39ddab-9949-4e8e-aaca-04e71db919f7">
This commit is contained in:
Nick Peihl 2023-12-05 17:31:55 -05:00 committed by GitHub
parent 9b39d81c83
commit b0ee6f4a9c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 0 deletions

View file

@ -68,6 +68,7 @@ describe('Save dashboard state', () => {
);
expect(allServices.notifications.toasts.addSuccess).toHaveBeenCalledWith({
title: `Dashboard 'BOO' was saved`,
className: 'eui-textBreakWord',
'data-test-subj': 'saveDashboardSuccess',
});
});
@ -92,6 +93,7 @@ describe('Save dashboard state', () => {
);
expect(allServices.notifications.toasts.addSuccess).toHaveBeenCalledWith({
title: `Dashboard 'BooToo' was saved`,
className: 'eui-textBreakWord',
'data-test-subj': 'saveDashboardSuccess',
});
});

View file

@ -201,6 +201,7 @@ export const saveDashboardState = async ({
if (newId) {
toasts.addSuccess({
title: dashboardSaveToastStrings.getSuccessString(currentState.title),
className: 'eui-textBreakWord',
'data-test-subj': 'saveDashboardSuccess',
});