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

How hard would it be to implement haptics on range change #109

Closed
akdsco opened this issue Mar 4, 2025 · 4 comments
Closed

How hard would it be to implement haptics on range change #109

akdsco opened this issue Mar 4, 2025 · 4 comments

Comments

@akdsco
Copy link

akdsco commented Mar 4, 2025

Great range slider for the RN community. Not sure why this isn't very popular?! Amazing work.

Anyway, to the point...

Ideally, an implementation with some sort of step option, so there's a "small" haptic vibration each time the slider crosses the chosen value on the range.

If you have an AirBnB app, set up some basic search, open filters and try to narrow down the price range.
That kind of effect.

How hard would that be? I'd be happy to apply myself if possible to help.

@Sharcoux
Copy link
Owner

Sharcoux commented Mar 5, 2025

Great range slider for the RN community. Not sure why this isn't very popular?! Amazing work.

Thanks a lot ❤ . The problem is just the legacy react-native-community/slider that drags people to it because of its name, while it's not maintained by the community. There are probably many better slider alternatives than that RNC one.

If you have an AirBnB app, set up some basic search, open filters and try to narrow down the price range.
That kind of effect.

I'm not sure to see what you mean. I couldn't reproduce on their website

Ideally, an implementation with some sort of step option, so there's a "small" haptic vibration each time the slider crosses the chosen value on the range.

You can provide your own component for the thumb, so you can probably achieve anything. Just create a component that vibrates when it reaches some value. If you only want the device to vibrate, you can also listen to value changes through onValueChange.

@akdsco
Copy link
Author

akdsco commented Mar 5, 2025

I'm not sure to see what you mean. I couldn't reproduce on their website

It's in their mobile app (I'm talking iOS specifically), think about it, if it was implemented on web, would have to make the laptop vibrate?! 😂

You can provide your own component for the thumb, so you can probably achieve anything. Just create a component that vibrates when it reaches some value. If you only want the device to vibrate, you can also listen to value changes through onValueChange.

I'll surely think about it once I get to the point where improving the filter experience is a must for me, or I find some odd moment of tranquillity. Currently, full time developing + working my own iOS app, so have to be real about my commitments

The problem is just the legacy react-native-community/slider that drags people to it because of its name

Agreed, it does have most of the stars & cred and it's made by Callstack.. so there you have it, house name. However, I wanted to find something that worked with range (two thumbs), and it wasn't an easy find, to be fair to you. I was close to start building the solution on my own or implementing a sad, two sliders (separate slider for min & max values), solution. Maybe worth marketing that feature better.

"The best range slider for RN on the market" or any similar SEO slogan would do.

This callstack/react-native-slider#269 has been their issue since 2021 !!! And they can't fix it easily due to legacy / tech debt, sad

@akdsco
Copy link
Author

akdsco commented Mar 5, 2025

Actually, you were right, it was as simple as calling the expo API on range change.
Feel free to close the ticket and keep up the good work! 💪🏻

@Sharcoux
Copy link
Owner

Sharcoux commented Mar 5, 2025

It's in their mobile app (I'm talking iOS specifically), think about it, if it was implemented on web, would have to make the laptop vibrate?! 😂

Cause you can't access a website on a mobile device? Why do you think that API has been created for 😉

Actually, you were right, it was as simple as calling the expo API on range change.

Closing then

@Sharcoux Sharcoux closed this as completed Mar 5, 2025
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

No branches or pull requests

2 participants