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

[Instantsearch] Add range slider & use it for the price slider #713

Merged
merged 5 commits into from
Jan 29, 2025

Conversation

Jade-GG
Copy link
Collaborator

@Jade-GG Jade-GG commented Jan 23, 2025

This PR adds a simple custom range slider for the price slider using plain html and css for the inputs, and a Vue component for handling the values. I've made sure that it works properly across the main browsers (Firefox, Chrome, Safari).

The Vue component has been made specifically to support the InstantSearch range input data, however it should be possible to use elsewhere, thus I turned it into its own input component. However, I don't think we want to make this into a rapidez/blade-components because the use of Vue is pretty abundant here.

image

@royduin
Copy link
Member

royduin commented Jan 24, 2025

Does it also play nice on a touch device?

@indykoning
Copy link
Member

Considering we're using regular range sliders for this i'm assuming it's not a big problem, how is the accessibility for the range slider?

@Jade-GG
Copy link
Collaborator Author

Jade-GG commented Jan 24, 2025

Does it also play nice on a touch device?

As far as I'm able to test, yes. I have no problems using this input on mobile.

Because it's built on top of the default HTML range input I would also expect this to be the case. It would be pretty weird if a browser doesn't support default HTML inputs 🙂

FYI, the only reason I had to make sure it worked on every browser is the -moz-range-thumb and -webkit-slider-thumb thing. Every major browser aside from firefox implements the latter, and firefox implements the former.

@royduin
Copy link
Member

royduin commented Jan 28, 2025

Let's keep the inputs so a visitor can use both. If a shop doesn't want one; they can override the template and remove one of the options.

@royduin royduin merged commit 68526a0 into instantsearch Jan 29, 2025
7 of 12 checks passed
@royduin royduin deleted the feature/instantsearch-range-slider branch January 29, 2025 14:43
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.

4 participants