Closed mi-na-bot closed 2 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
nuka-carousel-website | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | May 20, 2023 1:42am |
@gksander any update on this?
@leventdeniz I ended up using embla-carousel-react which works alright with pinch zoom. This PR does work as well!
Closing as the code is no longer valid in the new codebase, however, we are using the great tests written here as a baseline to ensure we test this and if needed fix this in v8 as soon as possible.
@carbonrobot I believe the tests were never finished so I would suggest writing new ones. Nobody seemed particularly interested in the PR for me to waste the time.
Description
Widgets that disrupt ordinary touch gestures on a mobile device are frustrating. For example, users may want to zoom in on a slide slightly or correct an already zoomed-in state using gestures on top of the carousel component. Unfortunately, the carousel acts as a dead zone, neutralizing the pinch-to-zoom gesture if even one finger of the gesture is inside the component.
This patch causes the carousel to only react to single touch gestures, which is essential so pinch to zoom will not simultaneously drag the slide. It also adds
pinch-zoom
to thetouch-action
style, enabling global pinch zooming.Fixes #1020
Type of Change
How Has This Been Tested?
Connect an iPhone 13 Pro Max to the development web server. Used manual testing for the following:
Ideally, this would include a Cypress test, but I need help figuring out how to simulate compelling touch actions there.
Checklist
pnpm run lint
)pnpm run test:ci-with-server
/pnpm run test
)pnpm changeset
.