-
Notifications
You must be signed in to change notification settings - Fork 8.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preparation for High Contrast Mode, ResponseOps domains #202610
Changes from 2 commits
0c7a693
4adfed1
da52b0b
cae5f34
8642917
d3b2b94
ee81d77
bbbd1f1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ export function useBulkEditResponse(props: UseBulkEditResponseProps) { | |
const { | ||
i18n: i18nStart, | ||
theme, | ||
userProfile, | ||
notifications: { toasts }, | ||
} = useKibana().services; | ||
|
||
|
@@ -124,18 +125,22 @@ export function useBulkEditResponse(props: UseBulkEditResponseProps) { | |
if (numberOfErrors === total) { | ||
toasts.addDanger({ | ||
title: failureMessage(numberOfErrors, translationMap[property]), | ||
text: toMountPoint(renderToastErrorBody(response), { i18n: i18nStart, theme }), | ||
text: toMountPoint(renderToastErrorBody(response), { | ||
i18n: i18nStart, | ||
theme, | ||
userProfile, | ||
}), | ||
}); | ||
return; | ||
} | ||
|
||
// Some failure | ||
toasts.addWarning({ | ||
title: someSuccessMessage(numberOfSuccess, numberOfErrors, translationMap[property]), | ||
text: toMountPoint(renderToastErrorBody(response), { i18n: i18nStart, theme }), | ||
text: toMountPoint(renderToastErrorBody(response), { i18n: i18nStart, theme, userProfile }), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not passing a large object here for the services, because this is within a |
||
}); | ||
}, | ||
[i18nStart, theme, toasts, renderToastErrorBody] | ||
[i18nStart, theme, userProfile, toasts, renderToastErrorBody] | ||
); | ||
|
||
return useMemo(() => { | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,6 +50,7 @@ export const useBulkOperationToast = ({ | |
const { | ||
i18n, | ||
theme, | ||
userProfile, | ||
notifications: { toasts }, | ||
} = useKibana().services; | ||
|
||
|
@@ -122,7 +123,7 @@ export const useBulkOperationToast = ({ | |
SINGLE_RULE_TITLE, | ||
MULTIPLE_RULE_TITLE | ||
), | ||
text: toMountPoint(renderToastErrorBody(errors, 'danger'), { i18n, theme }), | ||
text: toMountPoint(renderToastErrorBody(errors, 'danger'), { i18n, theme, userProfile }), | ||
}); | ||
return; | ||
} | ||
|
@@ -135,10 +136,10 @@ export const useBulkOperationToast = ({ | |
SINGLE_RULE_TITLE, | ||
MULTIPLE_RULE_TITLE | ||
), | ||
text: toMountPoint(renderToastErrorBody(errors, 'warning'), { i18n, theme }), | ||
text: toMountPoint(renderToastErrorBody(errors, 'warning'), { i18n, theme, userProfile }), | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not passing a large object here for the services, because this is within a |
||
}); | ||
}, | ||
[i18n, theme, toasts, renderToastErrorBody] | ||
[i18n, theme, userProfile, toasts, renderToastErrorBody] | ||
); | ||
|
||
return useMemo(() => { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not passing a large object here for the services, because this is within a
useMemo
. See #202606 (comment)