Skip to content

[Lens] drag and drop functionality for annotations#128432

Merged
mbondyra merged 6 commits intoelastic:mainfrom
mbondyra:lens/annotation_dnd
Mar 24, 2022
Merged

[Lens] drag and drop functionality for annotations#128432
mbondyra merged 6 commits intoelastic:mainfrom
mbondyra:lens/annotation_dnd

Conversation

@mbondyra
Copy link
Copy Markdown
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 Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// release_note:skip Skip the PR/issue when compiling release notes Feature:Lens backport:skip This PR 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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

Thank you Andrew! Issue added: #128506

Copy link
Copy Markdown
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
Copy Markdown

💚 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 PR does not require backporting Feature:Lens release_note:skip Skip the PR/issue when compiling release notes Team:Visualizations Team label for Lens, elastic-charts, Graph, legacy editors (TSVB, Visualize, Timelion) t// v8.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants