-
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
[Snapshot + Restore] Add callout when restoring snapshot #95104
Changes from all commits
c616133
2e7e930
cfe342c
d733718
01aff28
a409aeb
990c414
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License | ||
* 2.0; you may not use this file except in compliance with the Elastic License | ||
* 2.0. | ||
*/ | ||
|
||
import { i18n } from '@kbn/i18n'; | ||
import React, { FunctionComponent } from 'react'; | ||
import { EuiCallOut } from '@elastic/eui'; | ||
|
||
export const SystemIndicesOverwrittenCallOut: FunctionComponent = () => { | ||
return ( | ||
<EuiCallOut | ||
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. Thinking about accessibility, I wonder if screen-readers announce the content of this callout when the user enables the global state toggle? If not then I think we should consider rendering the callout even when the toggle is disabled. If the callout is too prominent to show at all times, maybe we could just present it as standard description text. 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. Thanks for bringing this up! I've added an
If there is a general concern that the callout is too prominent, I've also included an example of just using the |
||
data-test-subj="systemIndicesInfoCallOut" | ||
title={i18n.translate( | ||
'xpack.snapshotRestore.restoreForm.stepLogistics.systemIndicesCallOut.title', | ||
{ | ||
defaultMessage: | ||
'When this snapshot is restored, system indices will be overwritten with data from the snapshot.', | ||
} | ||
)} | ||
iconType="pin" | ||
size="s" | ||
aria-live="polite" | ||
aria-atomic="true" | ||
/> | ||
); | ||
}; |
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.
Thanks for adding the explanation about features states, it's very helpful to understand the code