-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[Upgrade Assistant] Improve loading/error states for deprecation toggle #97294
[Upgrade Assistant] Improve loading/error states for deprecation toggle #97294
Conversation
@elasticmachine merge upstream |
Pinging @elastic/es-ui (Team:Elasticsearch UI) |
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.
Nice UX enhancement! Took a quick look at the screenshots and had a couple thoughts on ways to provide the user with a bit more info.
<EuiCallOut | ||
data-test-subj="updateLoggingError" | ||
size="s" | ||
title={i18nTexts.updateErrorMessage} |
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.
How about adding a description with some error details, like status code and message?
reloadButtonLabel: i18n.translate( | ||
'xpack.upgradeAssistant.overviewTab.steps.deprecationLogsStep.enableDeprecationLoggingToggleSwitch.reloadButtonLabel', | ||
{ | ||
defaultMessage: 'Reload', |
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.
Can we add some more information so the user understands why they'd want to bother reloading? For example, we could change the button text to "Reload to configure deprecation logging".
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.
Great improvements to the UI, @alisonelizabeth!
I think loading state and loading error both look good, but I'm curious if there is a pattern for updating state of a switch. I was trying to find anything similar in Kibana or EUI but saw nothing. I'm mostly concerned about the content jump in both updating and updating error states. I'm thinking if moving updating error below the input would work? And for the updating state: not replacing the switch but rather disabling it and adding the loading indicator with 'Updating logging state...' below the input. WDYT?
Thanks for the feedback @cjcenizal and @yuliacech! I will follow up with design and report back. I'm also going to move this from |
…precation_toggle
@mdefazio / @dborodyansky do you have thoughts on this? For loading and error states, should the toggle remain visible but disabled? The one problem I foresee is it might be confusing since there would also be a value associated with it (on/off) even though it is disabled. |
Circling back from offline conversation with @mdefazio and @alisonelizabeth. Disabling a switch due to error does seem problematic since selection (on/off) remains visible. Replacing an entire switch with a loading indicator is also uncommon. Propose using a toggle-button instead of a switch as it affords an expected loading state. A button can also display a disabled (unavailable) label state to better support errors. Also suggesting we consider reintroducing some informational cues to help users gain more context around deprecation logging. Framing the control with a title, explanation, and a status badge could reinforce context and comprehension. UI flow: Display states: Loading button label would ideally be conditional, depending on trigger (retrieve state, enable, disable). Alternate consideration: If callout feels too heavy for this case, could error-text provide more subtle display? High fidelity mockups and alternate iteration deferring to use of switch in this Figma file. Thoughts, corrections, and feedback very welcome. |
Great work @dborodyansky! I really like the idea of using the toggle button here. I had a couple other questions come to mind after looking these over again with CJ.
|
Thank you for bearing with me as I get up to speed on EUI and Kibana patterns. I checked in with design group and indeed the Callout is expected to be full width, which I think may be excessive in this case. Error text seems would be more appropriate inline. A badge to show unavailability may also be unnecessary since we label the button and provide error information. Separation of the state indicator from the control is great feedback, and a tension I fell as well. An alternative CJ brought up is displaying the state in the button label and icon. However what seems to get lost is an explicit call-to-action affordance, outside of a changing the label in a hover state. Feels like there is a thread here to keep pulling though, and would be interested if it spurs additional feedback. I am updating the Figma file to keep track of alternate explorations and trade offs as we iterate. I'd love to zoom out a bit to consider the overall (Upgrade Assistant / Deprecation) UX comprehensively in order to iterate further as we progress the project. Would that be ok? |
Thanks for the update, @dborodyansky!
I agree. How important do you feel it is to explicitly call out the state? I'm wondering if it's sufficient for now to not use a badge, and also keep the button text to Enable/Disable.
I agree there's probably more here we can continue to discuss. However, I think overall your changes provide an improved experience than what we had previously and is enough to move forward. The way deprecation logging is presented in UA will likely become more sophisticated as we continue iterating on this project, so I don't think it's worth spending too much more time on the toggle button specifically until we flesh out more details around the overall vision. I'd like to spend some time thinking through this myself and collecting more information from a technical standpoint. I'll plan to schedule a meeting with you after this - probably not for another week or so until I'll be ready. |
I agree. Sufficient for this PR, and plan to work on enhancing design comprehensively as we gather more information around deprecation logging and the overall vision. |
Thanks again @dborodyansky for the help on this! I've implemented your suggestions. One thing I still have a question on is the inline error message. I did not yet add specifics from the error message itself, as I worry we don't have control over this content and it could become more than one line. A couple thoughts I had: (1) remove the static copy and only show the error message received from the response, (2) show the static copy with the error status code, or (3) make the error message full width either above or below the button. Let me know what you think! /cc @debadair if you have any thoughts here too. Updated screenshots: // Error fetching logging information // Error updating logging: Button stays enabled with the state unchanged. A user can "try again" by clicking the button, no need for a "try again" link. @yuliacech Would you mind taking another look when you get a chance? |
@alisonelizabeth, Option 3 does not compromise providing useful information, so I believe that would be preferred. |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
The new button looks great, @alisonelizabeth and @dborodyansky! As soon as the logging information is loaded, would it be useful to add the state to the text? For example, 'Deprecation logging is enabled, disable to not log ...' and the button will have 'disable' label. The reverse for the 'disabled' state. WDYT? |
Thanks for the feedback @yuliacech!
We've had some back-and-forth around this. The original design was to also have a badge in the title to indicate the status. CJ also suggested having an indicator in the button label itself along with updating the button label text. Both of these have tradeoffs - adding the badge means a user has to potentially look at 2 different places for state (the badge in the title, and the button label); and changing the button label copy makes it less clear the button is actionable. We concluded to leave as-is, since we plan to iterate on how deprecation logging is presented in UA.
Can you clarify what you mean by "...would it be useful to add the state to the text?" Are you suggesting this be next to the button, or as part of the description under the section title (or something else)? |
I see @alisonelizabeth, that's a tricky one ;) So what I meant is the text under the title, could we consider it for an explicit state description? |
@yuliacech Does this represent what you are describing? I think it does help add useful context, though would require a bit more conditional copy to handle the "unknown/unavailable" state as well. |
I almost think if we were to add dynamic text, I'd prefer to go back to the badge option. As @dborodyansky pointed out, it would require more complexity to handle the unavailable/loading states. I'd also like to iterate that the UX around deprecation logging in Upgrade Assistant is going to change. In retrospect, I probably should have held off on opening this PR. To move forward, I'd like to propose one of the following:
I tend to lean toward 2, but open to either. @yuliacech let me know what you think! |
…precation_toggle
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.
@dborodyansky Yes, those look great, Dmitry! I agree that it's not straightforward how to handle the loading/error state though.
@alisonelizabeth Thanks a lot for considering my comments! I'm good with merging this PR and leaving the copy/text work for a future PR 👍
💚 Build SucceededMetrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
This PR improves the loading and error states for the deprecation toggle on the Overview page in Upgrade Assistant.
Fixes #73211
Skipping release note since UA will be disabled in
7.13
.To test, you will need to enable UA by setting
UA_READONLY_MODE
incommon/constants.ts
tofalse
. You can more easily view the spinner by enabling network throttling in your browser's dev tools.Expected behavior: