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] drag and drop functionality for annotations #128432

Merged
merged 6 commits into from
Mar 24, 2022

Conversation

mbondyra
Copy link
Contributor

@mbondyra mbondyra commented Mar 23, 2022

Summary

Implements reorder & duplicating dimension in the group for annotations.
This is a code that will be immediately refactored in the next iteration but I want to squeeze it in for 8.2.

As always, dropping to empty button duplicates the dimension.
Reordering doesn't influence visualization in almost no way, except for the order in the tooltips if the annotations share the same exact timestamp. (see picture)

Mar-24-2022.14-23-53.mp4

Screenshot 2022-03-24 at 14 25 22

Screenshot 2022-03-24 at 14 25 28

I've also fixed a little issue- tooltip's times are now sorted:
before the position in the tooltip depended on position in annotations[] array.
Screenshot 2022-03-24 at 14 30 58

Now it depends on timestamp (first go first) and then on the position in the array.
Screenshot 2022-03-24 at 14 30 18

@mbondyra mbondyra added Team:Visualizations Visualization editors, elastic-charts and infrastructure release_note:skip Skip the PR/issue when compiling release notes Feature:Lens backport:skip This commit does not require backporting v8.2.0 labels Mar 23, 2022
@mbondyra mbondyra force-pushed the lens/annotation_dnd branch from c10b0b2 to 3792966 Compare March 24, 2022 08:42
@mbondyra mbondyra marked this pull request as ready for review March 24, 2022 13:32
@mbondyra mbondyra requested a review from a team as a code owner March 24, 2022 13:32
@elasticmachine
Copy link
Contributor

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

@mbondyra mbondyra force-pushed the lens/annotation_dnd branch from 043ebd5 to 2202f5e Compare March 24, 2022 14:30
Copy link
Contributor

@drewdaemon drewdaemon left a comment

Choose a reason for hiding this comment

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

Code LGTM. Might be helpful to track the refactor in a follow-up tech-debt issue.

@mbondyra
Copy link
Contributor Author

Thank you Andrew! Issue added: #128506

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.

LGTM, tested and works like a charm!

@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.1MB 1.1MB +521.0B

History

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

@mbondyra mbondyra merged commit 0079b36 into elastic:main Mar 24, 2022
@mbondyra mbondyra deleted the lens/annotation_dnd branch March 24, 2022 17:48
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.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants