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: carousel: update wheel handler #557

Conversation

dkilgore-eightfold
Copy link
Contributor

SUMMARY:

  • Improves touch pad support and prevent scroll api from being spammed when delta position changes multiplier of n float
  • Only prevent page Y scroll when Carousel next/prev buttons are visible and its scrollable
  • Enable horizontal and vertical touchpad scroll whilst preserving wheel scroll
  • Use visible elements rather than a pixel value to determine when to swap to single scroll mode as items may be variable in width

Video represents the following:

  1. Scroll using next/prev buttons
  2. Scroll using mouse wheel
  3. Scroll using touch pad
scroll.mp4

JIRA TASK (Eightfold Employees Only):

ENG-45017

CHANGE TYPE:

  • Bugfix Pull Request
  • Feature Pull Request

TEST COVERAGE:

  • Tests for this change already exist
  • I have added unittests for this change

TEST PLAN:

Pull the PR branch and run yarn and yarn storybook. Verify the Carousel scroll stories behave as expected.

@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 1, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 63779ab:

Sandbox Source
React Configuration
Vanilla Configuration

@dkilgore-eightfold dkilgore-eightfold merged commit f2655aa into EightfoldAI:main Mar 1, 2023
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.

2 participants