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] Thresholds: moving a threshold to another group should carry also its styling #112853

Merged
merged 11 commits into from
Sep 29, 2021

Conversation

dej611
Copy link
Contributor

@dej611 dej611 commented Sep 22, 2021

Summary

Fixes #112799

This PR addresses the specific behaviour of moving a dimension from one group to another, where only datasource data was copied, ignoring visualization styling.
The new code is now adding one more case to the previousColumn assignment, passing the columnId also in the case of move.

threshold_move
threshold_duplicate1
threshold_duplicate2

I thought about limiting this specific behaviour only to threshold data layers, but I see no particular harm for data layer as well: from my testing datatable (the only vis using the previousColumn parameter) had no issue with this change had some issues with this change, so now groups can express with a flag whether duplication action requires the previous column or not.

Also: wanted to add some unit tests but probably with all the required mocking it is not worth. Added a functional test ✅ .

Checklist

Delete any items that are not applicable to this PR.

@dej611 dej611 added Team:Visualizations Visualization editors, elastic-charts and infrastructure v8.0.0 release_note:skip Skip the PR/issue when compiling release notes Feature:Lens auto-backport Deprecated - use backport:version if exact versions are needed v7.16.0 labels Sep 22, 2021
@dej611 dej611 marked this pull request as ready for review September 23, 2021 08:56
@dej611 dej611 requested a review from a team as a code owner September 23, 2021 08:56
@elasticmachine
Copy link
Contributor

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

@dej611
Copy link
Contributor Author

dej611 commented Sep 23, 2021

@elasticmachine merge upstream

@dej611
Copy link
Contributor Author

dej611 commented Sep 23, 2021

Updated PR to copy styles also in the duplicate scenario.

@dej611
Copy link
Contributor Author

dej611 commented Sep 27, 2021

@elasticmachine merge upstream

@dej611
Copy link
Contributor Author

dej611 commented Sep 28, 2021

@elasticmachine merge upstream

@mbondyra
Copy link
Contributor

@elasticmachine merge upstream

Copy link
Contributor

@mbondyra mbondyra left a comment

Choose a reason for hiding this comment

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

Tested and it works as expected, now let's do the same for data layers 💪🏼 😄

@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 1.0MB 1.0MB +290.0B

History

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

@dej611 dej611 merged commit b567351 into elastic:master Sep 29, 2021
kibanamachine added a commit to kibanamachine/kibana that referenced this pull request Sep 29, 2021
…lso its styling (elastic#112853)

* 🐛 When dragging a threshold to another group carry also its styling

* ✅ Add functional test

* ✨ Make duplicate carry style too

* ✅ Add functional test for duplicate use case

* 🐛 Fix table duplication issue

Co-authored-by: Kibana Machine <[email protected]>
@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 Sep 29, 2021
…lso its styling (#112853) (#113451)

* 🐛 When dragging a threshold to another group carry also its styling

* ✅ Add functional test

* ✨ Make duplicate carry style too

* ✅ Add functional test for duplicate use case

* 🐛 Fix table duplication issue

Co-authored-by: Kibana Machine <[email protected]>

Co-authored-by: Marco Liberati <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Visualization editors, elastic-charts and infrastructure v7.16.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Thresholds: moving a threshold dimension from one group to another loses styling
4 participants