mipmip / home-manager-option-search

Home Manager Option Search
https://home-manager-options.extranix.com/
Apache License 2.0
259 stars 15 forks source link

Add a 100ms debounce to the search input #14

Closed fnune closed 1 year ago

fnune commented 1 year ago

Adding a minor debounce greatly improves the typing experience of the search bar.

Here's a recording with the debounce:

https://github.com/mipmip/home-manager-option-search/assets/16181067/646c6b58-3162-4ad7-8460-1e8b38fdc95d

Here's a recording without the debounce:

https://github.com/mipmip/home-manager-option-search/assets/16181067/4c986faf-eeff-44d1-91f6-6147f06c7554

It's a bit hard to see in a video, but the input element lags behind what I'm typing because the browser is running your JavaScript for each keypress. I would recommend spinning up the app and testing it to see for yourself.

Thanks for this project, I use it almost daily!

mipmip commented 1 year ago

Thanks, this makes it just a litte nicer.