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

Improve range slider callbacks #459

Merged

Conversation

xavierdonnellon
Copy link
Contributor

@xavierdonnellon xavierdonnellon commented Jul 18, 2023

In response to issue #441

This PR adds to RangeSlider:

  • onChange callback, called immediately on every value change to slider
  • onDebounceChange callback, called after debounceInterval
  • Deprecates onDrag, but maintains its functionality
  • Adds dragHandleBehavior, allowing two types of feedback (followMouse, or snapToValue)

Other changes to RangeSlider:

  • Change DragHandle's beingDragged to $beingDragged (transient StyledComponent prop to suppress DOM warning that beingDragged is an unknown attribute)
  • Improves typing of processedMarkers and processedValues to remove type errors and redundant code
  • Use springRef.start(...) over now-deprecated springRef(...)

Other other changes:

  • Update vite

@codesandbox-ci
Copy link

codesandbox-ci bot commented Jul 18, 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 c0bddfa:

Sandbox Source
React Configuration

Copy link
Contributor

@aVileBroker aVileBroker left a comment

Choose a reason for hiding this comment

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

Tons of changes to review, but wanted to give you something to start on

src/components/RangeSlider/RangeSlider.tsx Show resolved Hide resolved
stats/statistics.html Outdated Show resolved Hide resolved
src/components/RangeSlider/types.ts Outdated Show resolved Hide resolved
src/components/RangeSlider/RangeSlider.tsx Show resolved Hide resolved
@aVileBroker aVileBroker merged commit 71ff05b into Headstorm:master Aug 1, 2023
1 check passed
@HeadstormOps
Copy link

🎉 This PR is included in version 1.27.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

3 participants