Skip to content
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

(Outdated) [Index Management] Improve UX of mappings editor #152486

Conversation

ElenaStoeva
Copy link
Contributor

@ElenaStoeva ElenaStoeva commented Mar 1, 2023

Renamed the branch which closed this PR. Here is the updated PR: #152730

Summary

This PR implements the short-term solution proposed in #52708 (comment) - disabling the Update button of the mappings editor form when no changes have been made by the user and, when there are saveable changes, displaying some text guiding the user to review all of the field's settings and a tooltip that provides more context.

This implementation uses the useFormIsModified hook from the form lib (https://docs.elastic.dev/form-lib/core/use-form-is-modified) which didn't work as expected for this use case so a fix to this hook is added as well. I verified that all other forms that use this hook (the field editor from Data Views and the Connector editor) are working fine with the added fix to the hook. Also, several mappings editor jest tests are modified to match the new scenario and a new one was added to test if the Update button is enabled/disabled as supposed.

How to test

  1. Go to Stack Management -> Index Management -> Index Templates
  2. Create a new index template with some mappings fields.
  3. Start editing the created index template and go to the Mappings step of the form wizard.
  4. Click on the Edit button of any of the fields.
  5. Verify that the Update button is disabled.
  6. Verify that any change on the form enables the Update button and displays the "Review all settings before updating" text with a tooltip.
Screen.Recording.2023-03-06.at.15.19.57.mov

Screenshot 2023-03-06 at 15 20 38

Checklist

  • Unit or functional tests were updated or added to match the most common scenarios
  • Any UI touched in this PR is usable by keyboard only (learn more about keyboard accessibility)
  • Any UI touched in this PR does not create any new axe failures (run axe in browser: FF, Chrome)

@ElenaStoeva ElenaStoeva added Feature:Index Management Index and index templates UI Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more labels Mar 1, 2023
@ElenaStoeva ElenaStoeva self-assigned this Mar 1, 2023
@ElenaStoeva ElenaStoeva marked this pull request as ready for review March 2, 2023 10:40
@ElenaStoeva ElenaStoeva requested a review from a team as a code owner March 2, 2023 10:40
@elasticmachine
Copy link
Contributor

Pinging @elastic/platform-deployment-management (Team:Deployment Management)

@ElenaStoeva ElenaStoeva added the release_note:skip Skip the PR/issue when compiling release notes label Mar 2, 2023
@ElenaStoeva ElenaStoeva changed the title Disable Update button of mappings editor with no changes [Index Management] Improve UX of mappings editor Mar 6, 2023
@ElenaStoeva
Copy link
Contributor Author

@elasticmachine merge upstream

@ElenaStoeva ElenaStoeva added the ui-copy Review of UI copy with docs team is recommended label Mar 6, 2023
@ElenaStoeva ElenaStoeva closed this Mar 6, 2023
@ElenaStoeva ElenaStoeva deleted the mappings-editor-disable-update-button branch March 6, 2023 15:38
@ElenaStoeva ElenaStoeva changed the title [Index Management] Improve UX of mappings editor (Outdated) [Index Management] Improve UX of mappings editor Mar 6, 2023
@kibana-ci
Copy link
Collaborator

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #29 / machine learning - anomaly detection create jobs from dashboard map can create a geo job from map with single layer
  • [job] [logs] FTR Configs #29 / machine learning - anomaly detection create jobs from lens "after each" hook for "can create a single metric job from vis with single layer"
  • [job] [logs] FTR Configs #29 / machine learning - anomaly detection create jobs from lens with wizard can create multi metric job from vis with single layer

Metrics [docs]

Async chunks

Total size of all lazy-loaded chunks that will be downloaded as the user navigates the app

id before after diff
indexManagement 524.7KB 525.2KB +506.0B

Page load bundle

Size of the bundles that are downloaded on every page load. Target size is below 100kb

id before after diff
esUiShared 152.4KB 152.4KB +76.0B
Unknown metric groups

ESLint disabled line counts

id before after diff
esUiShared 11 12 +1
securitySolution 428 430 +2
total +3

Total ESLint disabled count

id before after diff
esUiShared 11 12 +1
securitySolution 506 508 +2
total +3

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

cc @ElenaStoeva

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Index Management Index and index templates UI release_note:skip Skip the PR/issue when compiling release notes Team:Kibana Management Dev Tools, Index Management, Upgrade Assistant, ILM, Ingest Node Pipelines, and more ui-copy Review of UI copy with docs team is recommended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants