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

Wait for animation to render #424

Closed
wants to merge 2 commits into from
Closed

Conversation

jacekkolasa
Copy link
Contributor

@jacekkolasa jacekkolasa commented Dec 21, 2022

a little hacky way to solve netdata/netdata-cloud#662

Problem is that when opening anomalyBit (as shown in netdata/netdata-cloud#662 (comment)), there's 150 ms animation. Normally the chart fetches data slower than animation finishes, but when user opens the animalyBit for the second time - chart is ready instantly, and the animation for Collapsible just starts. Dygraph doesn't work properly in this case (tries to render when the height is 0) and creates chart with default width/height, that's why it doesn't look synchronized, because it takes only about half of the parent width)

I see 3 ways of fixing this issue:

  1. remove animation from collapsible for anomalyBit
  2. add waitForAnimationToRender option to Collapsible (this is this fix, the downside is that the component will be harder to maintain). It appends empty div with preset height during animation, instead of the child. When animation finishes, renders the content. Doesn't support width yet
  3. fix this in dygraph. Probably ideal way, but I just didn't wanted to spend more time fighting with this issue.

@jacekkolasa jacekkolasa force-pushed the waitForAnimationToRender branch from b9545d7 to 15fe421 Compare December 21, 2022 21:57
@jacekkolasa
Copy link
Contributor Author

closing in favour of https://github.com/netdata/cloud-frontend/pull/3961

@jacekkolasa jacekkolasa deleted the waitForAnimationToRender branch December 22, 2022 10:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant