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

[Lens] Avoid to have fieldless operations by restored last valid state #98588

Merged
merged 5 commits into from
May 4, 2021

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Apr 28, 2021

Summary

Fixes #89032 and #83466

This PR is another take on the field input clearing scenario within the dimension panel.
Previous iteration was #98295 which was attempting to validate the invalid state, but had various implications on other aspects of the app to handle.

This PR has a simpler approach, where previous valid state is restored on field clear, similar to other interactions within the same panel (i.e. invalid field type for the current operation).

delete_field_2

@dej611 dej611 added release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 Feature:Lens v7.14.0 auto-backport Deprecated: Automatically backport this PR after it's merged labels Apr 28, 2021
@dej611 dej611 requested a review from a team April 28, 2021 10:12
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

Copy link
Contributor

@flash1293 flash1293 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested, LGTM

The PR might fail because of unused deleteColumn in x-pack/plugins/lens/public/indexpattern_datasource/dimension_panel/dimension_editor.tsx, but should be easy to fix.

@mbondyra
Copy link
Contributor

Checked on Chrome, the code looks good to me!

@dej611
Copy link
Contributor Author

dej611 commented May 3, 2021

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

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
lens 970.5KB 970.4KB -110.0B

History

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

@dej611 dej611 merged commit d03176e into elastic:master May 4, 2021
@dej611 dej611 deleted the fix/89032-2 branch May 4, 2021 09:25
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request May 4, 2021
elastic#98588)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

kibanamachine added a commit that referenced this pull request May 4, 2021
#98588) (#99173)

Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated: Automatically backport this PR after it's merged Feature:Lens release_note:fix Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Fix buggy handling of user pressing delete on the field selector
5 participants