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: Disable transitions on initial load #1594

Merged
merged 1 commit into from
Jun 11, 2024
Merged

Conversation

bprusinowski
Copy link
Collaborator

@bprusinowski bprusinowski commented Jun 11, 2024

Currently, we animate some of the charts on initial render (e.g. column charts). With recent changes to resize observer logic, we initialize the chart with width & height equal to 1, and only afterwards set the correct chart sizes. This leads to a weird animation of columns "falling down" from the top.

This PR disables the initial render animation, but keeps all other transitions, once the chart size has been already set.

How to test

PR

  1. Go to this link.
  2. Add a new, e.g. line, chart.
  3. Switch between the tabs a few times.
  4. ✅ See that the charts are displayed immediately.
  5. Try out some other transition-related things (e.g. use X axis filter, to see that the animations are still there for removing and adding the elements).

TEST

  1. Go to this link.
  2. Add a new, e.g. line, chart.
  3. Switch between the tabs a few times.
  4. ❌ See that the column chart always falls down from the top.
  5. Try out some other transition-related things (e.g. use X axis filter, to see that the animations are still there for removing and adding the elements).

@bprusinowski bprusinowski requested a review from ptbrowne as a code owner June 11, 2024 10:52
Copy link

vercel bot commented Jun 11, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
visualization-tool ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 11, 2024 11:01am

Copy link
Collaborator

@ptbrowne ptbrowne left a comment

Choose a reason for hiding this comment

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

💯

@bprusinowski bprusinowski merged commit f5fb913 into main Jun 11, 2024
6 checks passed
@bprusinowski bprusinowski deleted the feat/improvements branch June 11, 2024 11:30
@sosiology
Copy link
Contributor

LGTM - nice 💯

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants