-
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
Advanced settings UI change to centralize save state #53693
Advanced settings UI change to centralize save state #53693
Conversation
0c993ee
to
122b838
Compare
fe38fee
to
87a563f
Compare
14379ea
to
3d96af4
Compare
@gchaps We'd love to get your help with some copy changes we're making to the Advanced Settings UI. The gist is that instead of having Save/Cancel buttons per setting, there will be a "dirty" state that will popup a single bottom bar with "Save all"/"Cancel all" buttons. There will also be indicators showing which settings have been changed but not saved. Copy1. Unsaved indicator (bottom left of bottom bar). 2. Save/Cancel buttons since clicking will save/cancel ALL unsaved settings 3. Disabled Save button tooltip 4. The very last setting (Telemetry) callout 5. Reload notification toast But, since there could be more than one setting that requires a reload, we're thinking about making this message more generic like: |
1. Unsaved indicator 1 unsaved setting 2. Save/Cancel buttons Save changes 3. Disabled Save button tooltip 4. Telemetry 5. Reload notification toast |
Thanks @gchaps ! My only comment is that |
How about: 2 unsaved settings, 1 hidden |
9a79d9f
to
0eb9b9e
Compare
Pinging @elastic/kibana-app (Team:KibanaApp) |
In short, because it can be so difficult to navigate this page. (In detail: the page is long, has many tab stops, has many form elements, has many headings, isn't wrapped by an actual
The bar and the contrast do show that something is different but what I'd also like to be able to solve is having to know which contrast means what. UI friendly to cognitive load (which might be compromised from permanent, temporary, or situational variables) will let you glean all the info you need just by looking at it without prior knowledge. So, especially when you combine this and the next point, looking at just a setting - I don't know if the green bar means this setting is "all good, don't worry about it" or, as it means in this case "you've changed something here".
It doesn't scroll away and is visible on the page, but the two controls (the setting and the save) are now very far apart from each other. Screen zoom, which is different than your browser's page zoom, will usually clip off parts (often, most) of the page and only show you a small portion. Pinch-to-zoom on touch devices is an example of this (though, Writing all of this up has lead me to an important question: What about auto-save? Some of the settings I know require a page refresh so many we can't do it with all but could most of them be saved immediately when changed? |
I'm going to restate @myasonik's question since it might have gotten lost in the rest of his comment:
|
We discussed the auto-save idea with @timroes and decided that it would cause more problems and requires additional design.
To improve accessibility on this page in the current state we want to:
Let me know your thoughts. |
* master: (136 commits) [Visualize] Remove legacy appState in visualize (elastic#57330) Use static time for tsvb rollup test (elastic#57701) [SIEM] Fix ResizeObserver polyfill (elastic#58046) [SIEM][Detection Engine] Fixes return codes where some were rule_id instead of id skip flaky suite (elastic#56816) skip flaky suite (elastic#58059) skip flaky suite (elastic#45348) migrates notification server routes to NP (elastic#57906) Moved all of the show/hide toggles outside of ordered lists. (elastic#57163) [APM] NP Migration - Moves plugin server files out of legacy (elastic#57532) [Maps][Telemetry] Migrate Maps telemetry to NP (elastic#55055) Embeddable add panel examples (elastic#57319) Fix useRequest to support query change (elastic#57723) Allow custom paths in plugin generator (elastic#57766) [SIEM][Case] Merge header components (elastic#57816) [ML] New Platform server shim: update job audit messages routes (elastic#57925) [kbn/optimizer] emit success event from reducer when all bundles cached (elastic#57945) [APM] Don’t include UI filters when fetching a specific transaction (elastic#57934) Upgrade yargs (elastic#57720) skip flaky suite (elastic#57762) (elastic#57997) (elastic#57998) ... # Conflicts: # src/plugins/advanced_settings/public/management_app/components/field/__snapshots__/field.test.tsx.snap # src/plugins/advanced_settings/public/management_app/components/field/field.tsx # x-pack/plugins/translations/translations/ja-JP.json # x-pack/plugins/translations/translations/zh-CN.json
{unsavedChanges && ( | ||
<EuiScreenReaderOnly> | ||
<p> | ||
{unsavedChanges.error | ||
? unsavedChanges.error | ||
: i18n.translate('advancedSettings.field.settingIsUnsaved', { | ||
defaultMessage: 'Setting is currently not saved.', | ||
})} | ||
</p> | ||
</EuiScreenReaderOnly> | ||
)} |
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.
Unfortunately this doesn't work because of the way that EUI renders forms at the moment (I opened a bug for it elastic/eui#2888).
I tried a few different things and the thing that I thought worked best was moving this from the renderTitle
function to the renderField
function.
For each field, add an aria-describedby="{uniqueID}"
. Then, in the render function, right after the {this.renderField(setting)}
line, you can put all this stuff with the same uniqueId
on the <p>
.
Can talk through it more tomorrow!
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.
@myasonik I corrected the code according to your comments. That, however adds aria-describedby
to every element, even the ones that don't have relative <p>
element. Is this ok?
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.
aria-describedby
should always point to a real id
that exists on the page.
The contents can be empty though.
Does that make sense?
…_improve-advanced-settings-save * commit '02efb01c481f9f24d8d707f06dfc68b2fb805001': (43 commits) [Endpoint] Add a flyout to alert list. (elastic#57926) Make sure index pattern has fields before parsing (elastic#58242) Sanitize workpad before sending to API (elastic#57704) [ML] Transform: Support multi-line JSON notation in advanced editor (elastic#58015) [Endpoint] Refactor Management List Tests (elastic#58148) [kbn/optimizer] include bootstrap cache key in optimizer cache key (elastic#58176) Do not refresh color scale on each lookup (elastic#57792) Updating to @elastic/lodash@3.10.1-kibana4 (elastic#54662) Trigger context (elastic#57870) [ML] Transforms: Adds clone feature to transforms list. (elastic#57837) [ML] New Platform server shim: update fields service routes (elastic#58060) [Endpoint] EMT-184: change endpoints to metadata up and down the code base. (elastic#58038) document difference between log record formats (elastic#57798) Expose elasticsearch config schema (elastic#57655) [ui/agg_response/tabify] update types for search/expressions/build_tabular_inspector_data.ts (elastic#58130) [SIEM] Cleans Cypress tests code (elastic#58134) fix: 🐛 make dev server Storybook builds work again (elastic#58188) Prevent core savedObjects plugin from being overridden (elastic#58193) Expose serverBasePath on client-side (elastic#58070) Fix legend sizing on area charts (elastic#58083) ...
…_improve-advanced-settings-save * commit '98aa1d2d4f974f72a9a5397b1b91f11509f6fb7a': [SIEM] [Case] Enable case by default. Snake to camel on UI (elastic#57936) [File upload] Update remaining File Upload dependencies for NP migration (elastic#58128) Use EuiTokens for ES field types (elastic#57911) Added UI support for the default action group for Alert Type Model (elastic#57603) force savedObject API consumers to define SO type explicitly (elastic#58022) Update dependency @elastic/charts to ^17.1.1 (elastic#57634)
@elasticmachine merge upstream |
@elasticmachine merge upstream |
@elasticmachine merge upstream |
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
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.
Tested on Chrome linux, code LGTM so far. The remaining issues can imho be addressed in follow up PRs.
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.
Looks good for now 👍
In a future a11y PR I'd like to fix two things:
- The visual indicator that we've talked about before
EuiSwitch
currently has two labels (anaria-label
and anaria-labelledby
) which generally doesn't work (this may require work in EUI though in which case we can open up a ticket instead, I didn't dig deep enough to figure out where the issue is coming from)
Summary
Fixes #27405
Converts the contextual advanced settings menu to the shared one:
Before:
After:
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.For maintainers