-
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
[Lens] drag field to annotations to the config panel #141626
Conversation
e1d6c3e
to
eb63938
Compare
4194dae
to
61d7234
Compare
Pinging @elastic/kibana-vis-editors @elastic/kibana-vis-editors-external (Team:VisEditors) |
76c5a28
to
1c5758c
Compare
1c5758c
to
c126f9d
Compare
💚 Build Succeeded
Metrics [docs]Public APIs missing comments
Async chunks
Public APIs missing exports
History
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 and works as expected, LGTM
* getCurrentIndexPattern -> getUsedDataView * implement dnd for field
## Summary Adds the 8.6 for the following: - #140878, #143946 and #142187 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/tsvb.html#edit-visualizations-in-lens) - #142936, #142561, #143820, and #142838 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/add-aggregation-based-visualization-panels.html#edit-agg-based-visualizations-in-lens) - #138732 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#change-the-fields) - #141626 and #141615 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>
## Summary Adds the 8.6 for the following: - elastic#140878, elastic#143946 and elastic#142187 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/tsvb.html#edit-visualizations-in-lens) - elastic#142936, elastic#142561, elastic#143820, and elastic#142838 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/add-aggregation-based-visualization-panels.html#edit-agg-based-visualizations-in-lens) - elastic#138732 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#change-the-fields) - elastic#141626 and elastic#141615 [Doc preview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Stratoula Kalafateli <stratoula1@gmail.com> (cherry picked from commit f918a37)
# Backport This will backport the following commits from `main` to `8.6`: - [Adds the VisEditor docs for 8.6 (#146471)](#146471) <!--- Backport version: 8.9.7 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sqren/backport) <!--BACKPORT [{"author":{"name":"Kaarina Tungseth","email":"kaarina.tungseth@elastic.co"},"sourceCommit":{"committedDate":"2022-12-08T20:18:03Z","message":"Adds the VisEditor docs for 8.6 (#146471)\n\n## Summary\r\n\r\nAdds the 8.6 for the following:\r\n\r\n- #140878, #143946 and #142187\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/tsvb.html#edit-visualizations-in-lens)\r\n\r\n- #142936, #142561, #143820, and #142838\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/add-aggregation-based-visualization-panels.html#edit-agg-based-visualizations-in-lens)\r\n\r\n- #138732\r\n \r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#change-the-fields)\r\n\r\n- #141626 and #141615\r\n \r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations)\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>","sha":"f918a3745be3badff9cf05950db61d7f47877961","branchLabelMapping":{"^v8.7.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["Team:Docs","release_note:skip","v8.6.0","v8.7.0"],"number":146471,"url":"https://github.com/elastic/kibana/pull/146471","mergeCommit":{"message":"Adds the VisEditor docs for 8.6 (#146471)\n\n## Summary\r\n\r\nAdds the 8.6 for the following:\r\n\r\n- #140878, #143946 and #142187\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/tsvb.html#edit-visualizations-in-lens)\r\n\r\n- #142936, #142561, #143820, and #142838\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/add-aggregation-based-visualization-panels.html#edit-agg-based-visualizations-in-lens)\r\n\r\n- #138732\r\n \r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#change-the-fields)\r\n\r\n- #141626 and #141615\r\n \r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations)\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>","sha":"f918a3745be3badff9cf05950db61d7f47877961"}},"sourceBranch":"main","suggestedTargetBranches":["8.6"],"targetPullRequestStates":[{"branch":"8.6","label":"v8.6.0","labelRegex":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v8.7.0","labelRegex":"^v8.7.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/146471","number":146471,"mergeCommit":{"message":"Adds the VisEditor docs for 8.6 (#146471)\n\n## Summary\r\n\r\nAdds the 8.6 for the following:\r\n\r\n- #140878, #143946 and #142187\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/tsvb.html#edit-visualizations-in-lens)\r\n\r\n- #142936, #142561, #143820, and #142838\r\n\r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/add-aggregation-based-visualization-panels.html#edit-agg-based-visualizations-in-lens)\r\n\r\n- #138732\r\n \r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#change-the-fields)\r\n\r\n- #141626 and #141615\r\n \r\n[Doc\r\npreview](https://kibana_146471.docs-preview.app.elstc.co/guide/en/kibana/master/lens.html#add-annotations)\r\n\r\nCo-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com>\r\nCo-authored-by: Stratoula Kalafateli <stratoula1@gmail.com>","sha":"f918a3745be3badff9cf05950db61d7f47877961"}}]}] BACKPORT--> Co-authored-by: Kaarina Tungseth <kaarina.tungseth@elastic.co>
Summary
Fixes #141033
Allows the field to be dropped to annotations layer.
! Does not allow to drop a field to annotation layer with different data view.
Sep-28-2022.07-51-14.mp4
Some technical changes:
DragDropOperation
andDraggedField
and some helpers are now available both for datasource and visualization,DraggableDimensionButton
got merged out into objects that describe better what they serve for (for example, instead of passinglayerId
,columnId
andgroupId
I passtarget
with these three inside.getCurrentIndexPattern
andgetUsedDataView
into one method,getDropProps
method for the layers without datasource (that was anyway used only for annotation case), I moved the method to be possibly implemented by visualization.