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

Change date range immediately and only debounce chart updates #1025

Closed
wants to merge 2 commits into from
Closed

Change date range immediately and only debounce chart updates #1025

wants to merge 2 commits into from

Conversation

avin-kavish
Copy link
Contributor

This improves the responsiveness of the data range slider to not be laggy.

Fixes #1021
Related to #955

Testing

Probably deploy and test

Thank you for contributing to Nextstrain!

@jameshadfield jameshadfield temporarily deployed to auspice-fix-change-date-uzbb9d March 30, 2020 02:49 Inactive
@jameshadfield
Copy link
Member

Apologies for not testing this yet. I've just reviewed a bunch of PRs, and hope to get to this on the next round!

Copy link
Contributor

@eharkins eharkins left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like the slider performance is much smoother, thanks @avin-kavish!

Before we merge this can you run npm lint to make sure there are no linting errors? Even better, if you rebase this onto master, it will run the linting automatically along with some tests in a github action. Thanks for your work on this!

updateFrequencyDataDebounced(dispatch, getState);
clearTimeout(timeout)
// Quickdraw also means debounce in this context, but better change it.
// TODO: Refactor to two seperate variables for quickdraw and debounce
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@avin-kavish Definitely agree with the TODO here, I think it would make this more readable. Could you add that refactor here please? Thanks!

@avin-kavish
Copy link
Contributor Author

avin-kavish commented Apr 18, 2020

Yeah sounds like reasonable changes. btw @eharkins I don't see a badge next to your name... are you also maintaining this library? I'm only asking because If I make changes but if @jameshadfield (who seems to be the maintainer) wants different changes that would be a waste of time.

@eharkins
Copy link
Contributor

@avin-kavish

are you also maintaining this library?

Yep :)

@jameshadfield jameshadfield temporarily deployed to auspice-fix-change-date-inaily April 24, 2020 00:31 Inactive
@jameshadfield jameshadfield temporarily deployed to auspice-fix-change-date-r53k7u May 25, 2020 03:49 Inactive
This pull request was closed.
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.

[BUG] Date range Slider lags by 100ms due to incorrect debounce
3 participants