FormidableLabs / nuka-carousel

Small, fast, and accessibility-first React carousel library with an easily customizable UI and behavior to fit your brand and site.
https://commerce.nearform.com/open-source/nuka-carousel
Other
3.06k stars 593 forks source link

fix: Remove use of CSS transforms to prevent flickering #925

Closed hsource closed 2 years ago

hsource commented 2 years ago

Description

In our Storybook screenshot test suites, the carousels occasionally showed up as empty, causing many of our screenshot tests to be flaky.

image

After debugging, I realized that this was because Chrome renders elements that have CSS transforms in a way that can cause them to flicker.

Type of Change

How Has This Been Tested?

Tested the changes by running Storybook stories with custom controls, since most of the changes relate to that:

Remove transforms

Checklist: (Feel free to delete this section upon completion)

vercel[bot] commented 2 years ago

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

Name Status Preview Updated
nuka-carousel ✅ Ready (Inspect) Visit Preview Jul 26, 2022 at 1:01AM (UTC)
hsource commented 2 years ago

@carlos-kelly @gksander - would it be possible to take a look at this PR? This is a very minor fix, but definitely does improve first-render performance for us when used in Storybook.