-
Notifications
You must be signed in to change notification settings - Fork 481
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
Fixed docstring collapse/expand icon not changing when clicking rapidly #2217
Conversation
- Updated the UI for the actual search results
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This shouldn't have a CHANGELOG because it's not a change relative to a previous versions (though we could add the issue and PR reference to the original changelog entry).
So two things I notice here now:
|
This is because it is wrapped in the debounce function with a 300ms delay. And debounce runs everytime, so best we can do is decrease the delay to 100ms.
Again, due to debounce. |
I am not sure the lag is an improvement over the current status quo. The bug with rapid clicking is an unlikely edge case, but the lag is something the users will run into every time they collapse/open something. And reducing the debounce time doesn't seem like the right approach either. As I said, I think the UI should react right away to the first click, and then debounce the following clicks. |
Ok, maybe a mix of throttling and debounce could be the way to go. Let me see what I can do. (As far as I know, lodash debounce has some options relating to this.) |
@mortenpi I have made some changes, would you be able take a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @Hetarth02!
Now click all you want!
Edit by @mortenpi: close #2103