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

Fix timelion data-render-complete attribute on resize #29320

Merged
merged 5 commits into from
Jan 25, 2019

Conversation

markov00
Copy link
Member

@markov00 markov00 commented Jan 25, 2019

Fix #28818
Fix #22561
Fix #24292

There is a special case, when trying to resize a bit the visualization in a dashboard, as shown in the screenshot, that trigger a new render cycle from the visualize-chart loader, but doesn't complete a full rendering on the chart because the data doesn't change, thus the data-render-complete is never switched to true.

jan-25-2019 11-18-29

On #28818, I'm imagine that minor resize triggers when adding a visualization to the dashboard encounter the described bug, thus wrongly missing the render cycle avoiding set the data-render-complete attribute to false.

Extra: we have an extra resize-observer that trigger a check on the size every 500ms. We cannot get rid of the extra resize-observer because it's used directly from the timelion app itself.

Adding a watch to the renderComplete promise to fix missing rendering of chart
when the resize observer detect a change in size.
Removed the existing resize observer.
It's need on the timelion app to resize since that app doesn't use
visualize loader
@markov00 markov00 requested a review from timroes January 25, 2019 10:06
@markov00 markov00 added bug Fixes for quality problems that affect the customer experience Feature:Timelion Timelion app and visualization v7.0.0 Team:Visualizations Visualization editors, elastic-charts and infrastructure v6.7.0 labels Jan 25, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app

Copy link
Contributor

@timroes timroes left a comment

Choose a reason for hiding this comment

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

Marco demonstrated the failure and we looked at the code together. LGTM. Let's hope it's really finally solving all those Timelion testing flakyness.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@markov00
Copy link
Member Author

jenkins, test this (checking for flakyness)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@markov00
Copy link
Member Author

jenkins, test this (checking for flakyness)

@markov00 markov00 requested a review from LeeDr January 25, 2019 13:07
@stacey-gammon
Copy link
Contributor

Thanks for tackling this @markov00! Any idea why it started failing so consistently all of a sudden?

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@markov00
Copy link
Member Author

@stacey-gammon I think this bug was here since for a lot of time. I'm not sure but I think that we have introduced some slight changes on the styles of components, dashboard etc that introduced the problem of rerendering or resizing. Unfortunately I don't know more than that

@markov00 markov00 merged commit b3eacc0 into elastic:master Jan 25, 2019
markov00 added a commit to markov00/kibana that referenced this pull request Jan 25, 2019
* Fix timelion missing renderer on resize

Adding a watch to the renderComplete promise to fix missing rendering of chart
when the resize observer detect a change in size.
Removed the existing resize observer.

* Revert removing observe resize

It's need on the timelion app to resize since that app doesn't use
visualize loader

* Change double watch to watchgroup

* Reenable skipped dashboard test
markov00 added a commit that referenced this pull request Jan 28, 2019
* Fix timelion missing renderer on resize

Adding a watch to the renderComplete promise to fix missing rendering of chart
when the resize observer detect a change in size.
Removed the existing resize observer.

* Revert removing observe resize

It's need on the timelion app to resize since that app doesn't use
visualize loader

* Change double watch to watchgroup

* Reenable skipped dashboard test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:Timelion Timelion app and visualization Team:Visualizations Visualization editors, elastic-charts and infrastructure v6.7.0 v7.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants