headlamp-k8s / headlamp

A Kubernetes web UI that is fully-featured, user-friendly and extensible
https://headlamp.dev
Apache License 2.0
2.22k stars 156 forks source link

[SectionFilterHeader] Debounce search/namespace inputs #1347

Open callmevladik opened 1 year ago

callmevladik commented 1 year ago

When there is a decent amount of rows with data, search/namespace filters immediately change filter state which just blocks page and causes bad user experience.

I think onChange logic of such components should be debounced. Also thoughts: If headlamp used newer version of react this thing could be also fixed with useDeferredValue.

illume commented 3 months ago

We have new search filters with the new Table component, and I recall a debounce was added in there. But need to confirm this is still a problem...

@sniok do you recall if the search/namespace filters are ok with lots of data now? If not I will try and reproduce.

Also thoughts: If headlamp used newer version of react this thing could be also fixed with useDeferredValue.

We did some work a while ago preparing for react 18 (changing from withStyles to sx attributes mostly, but also switching away from Create React App), and I'm currently going through updating other dependencies. The issue is here: https://github.com/headlamp-k8s/headlamp/issues/1554