-
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
[Snapshot + Restore] Add callout when restoring snapshot #95104
Conversation
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
> | ||
<FormattedMessage | ||
id="xpack.snapshotRestore.restoreForm.stepLogistics.systemIndicesCallOut.description" | ||
defaultMessage="When this snapshot is restored, system indices will be overwritten with data from the snapshot. {learnMoreLink}" |
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.
The original recommended text also included: ... If this is not what you want, set include_global_state to false.
This seems self-explanatory as the message only appears in the UI when global state is enabled, so I did not include it. Adding a comment here though in case anyone thinks it would be helpful to add back.
/cc @gwbrown |
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.
LGTM. Copy seems clear. Thanks for this update @alisonelizabeth.
*/} | ||
{includeGlobalState && semverGt(version, '7.12.0') && ( | ||
<> | ||
<EuiSpacer size="xs" /> |
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.
This spacing looked a little tight to me in the screenshot. Might be worth checking with Michael?
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.
@mdefazio would you mind taking a look? Screenshot in PR description.
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.
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.
I've changed to spacing from xs
--> s
above the callout, and from l
--> xl
between the callout and the button. Let me know what you think. @mdefazio I'm not sure if you made a mistake when you said to "drop" 1-2 sizes in the screenshot, when in the original comment you said there should be more space between the button and callout. It's possible I misunderstood the screenshot though 😅 .
Another idea - we could simplify the callout and only have a title
. Something like this (not committed):
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.
My apologies for the poor direction 🤦 . I was simply trying to say that yes, there should be more space between the text and the callout, and it should be a bit less than the space between the button and the callout. So I didn't mean to say you had to change the space between the button and the callout (but the new screenshots look fine)
I like the callout with only the title. It's a bit less obtrusive and feels more straightforward.
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.
Core CODEOWNER review LGTM
const { docLinks } = useCore(); | ||
|
||
return ( | ||
<EuiCallOut |
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.
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 comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for bringing this up! I've added an aria-live
attribute so that it will be read by the screenreader when it is rendered.
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.
If there is a general concern that the callout is too prominent, I've also included an example of just using the title
in the callout: #95104 (comment). Adding it as a standard description text is a possibility as well.
💚 Build SucceededMetrics [docs]Module Count
Async chunks
Page load bundle
History
To update your PR or re-run it, just comment with: |
* Note: Once we support features states in the UI, we will also need to add a check here for that | ||
* See https://github.com/elastic/kibana/issues/95128 more details | ||
*/} | ||
{includeGlobalState && semverGt(version, '7.12.0') && ( |
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
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.
Hi @alisonelizabeth, code changes LGTM! Tested locally and confirmed the callout is rendered correctly. Thanks a lot for adding tests as well.
This PR adds an info callout when a user enables global state while restoring a snapshot.
Fixes #83014
Fixes #92916
How to test
yarn es snapshot --license trial -E path.repo=/tmp/es_backups
Screenshots
// Text change only