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

Plot histograms only when visible (ReactVisibilitySensor) #204

Closed
wants to merge 1 commit into from

Conversation

magland
Copy link
Collaborator

@magland magland commented Aug 5, 2024

A possible solution to #201 that doesn't involve a "show more" button: only renders the plot if the element is visible. Uses package react-visibility-sensor.

One note, I had to hard-code a height=200px div in the case of not visible in order for this to work. I'm sure there's a better workaround.

@WardBrian
Copy link
Collaborator

This leads to some jittering during scrolling for me, as the top row of histograms will un-render and cause you to scroll back up briefly.

We're using the "show more" pattern in the draws table, I think it makes sense to do the same here.

@magland
Copy link
Collaborator Author

magland commented Aug 6, 2024

This leads to some jittering during scrolling for me, as the top row of histograms will un-render and cause you to scroll back up briefly.

We're using the "show more" pattern in the draws table, I think it makes sense to do the same here.

Okay I'll work on that

@WardBrian
Copy link
Collaborator

#205

@WardBrian WardBrian closed this Aug 6, 2024
@WardBrian WardBrian deleted the plot-hists-only-on-visible branch August 6, 2024 16:09
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.

2 participants