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] setFocusTrap after animation is ended and not with timeout #101148

Merged

Conversation

mbondyra
Copy link
Contributor

@mbondyra mbondyra commented Jun 2, 2021

Summary

Fixes #100653

@flash1293 you were suspecting that the line with setTimeout causes the problem, but that was actually solution to it, just not fixing all the cases. For some reason EuiFocusTrap messes up the animation when the element has a position: absolute. I am not sure what styles it modifies, didn't look enough to find a low-level root cause (I did spend some time on it, but I failed to figure it out).

But I think we can ensure to avoid the animation problem with running the callback function not in timeout function, but on the callback onAnimationEnd.

EDIT: I just realized we have an advanced setting about not using animations at all, I'll see if we should solve it differently in this case. EDIT 2: Still works correctly even with animations off.

@mbondyra mbondyra 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 v7.14.0 auto-backport Deprecated - use backport:version if exact versions are needed labels Jun 2, 2021
@mbondyra mbondyra requested a review from a team June 2, 2021 11:26
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@mbondyra mbondyra marked this pull request as draft June 2, 2021 11:27
@mbondyra mbondyra marked this pull request as ready for review June 2, 2021 11:30
@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.3MB 1.3MB -71.0B

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

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.

Tested in Chrome and Firefox and it works fine, LGTM. Way better than the old solution 👍

@kibanamachine
Copy link
Contributor

💚 Backport successful

Status Branch Result
7.x

This backport PR will be merged automatically after passing CI.

@mbondyra mbondyra deleted the lens/dimension_container_animation branch June 4, 2021 08:26
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.14.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Lens] Vertical axis configuration panel jumps in chrome
4 participants