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] Fixes bug with removing layer with trendline #143723

Merged
merged 3 commits into from
Oct 20, 2022

Conversation

stratoula
Copy link
Contributor

@stratoula stratoula commented Oct 20, 2022

Summary

Part of #143687

If you create a layer with trendline and try to clear the layer, there was an error. This PR fixes it.

@stratoula stratoula added v8.6.0 Feature:Lens release_note:skip Skip the PR/issue when compiling release notes backport:skip This commit does not require backporting Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Oct 20, 2022
@stratoula stratoula marked this pull request as ready for review October 20, 2022 10:04
@stratoula stratoula requested a review from a team as a code owner October 20, 2022 10:04
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors)

Copy link
Contributor

@dej611 dej611 left a comment

Choose a reason for hiding this comment

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

Tested locally with Safari 👍

Co-authored-by: Marco Liberati <dej611@users.noreply.github.com>
@drewdaemon
Copy link
Contributor

drewdaemon commented Oct 20, 2022

This fix makes sense to me! I think @MichaelMarcialis also wanted the "clear layer" icon not to change to the "delete layer" trash can. We could do this by excluding hidden layers when we calculate isOnlyLayer.

https://github.com/elastic/kibana/blob/main/x-pack/plugins/lens/public/editor_frame_service/editor_frame/config_panel/config_panel.tsx#L275

@MichaelMarcialis
Copy link
Contributor

I think @MichaelMarcialis also wanted the "clear layer" icon not to change to the "delete layer" trash can.

Yes, exactly. Since the metric type visualizations only support a single layer, the button should retain its "Clear layer" action (with accompanying eraser icon).

@kibana-ci
Copy link
Collaborator

💚 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 1.3MB 1.3MB +171.0B

History

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

@drewdaemon
Copy link
Contributor

I spoke with @stratoula and we'll get that icon change ironed out in another PR @MichaelMarcialis .

Thank you for taking on this fix @stratoula !

@stratoula stratoula merged commit e147858 into elastic:main Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.6.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants