Skip to content

localizing the scope of the resize handler #3265

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

Merged
merged 11 commits into from
Apr 9, 2025
Merged

Conversation

BSd3v
Copy link
Contributor

@BSd3v BSd3v commented Apr 8, 2025

localizing the scope of the resize handler

@gvwilson gvwilson added P1 needed for current cycle fix fixes something broken community community contribution labels Apr 9, 2025
@@ -14,7 +14,7 @@ const ResizeDetector = props => {
if (resizeTimeout) {
clearTimeout(resizeTimeout);
}
resizeTimeout = setTimeout(() => {
var resizeTimeout = setTimeout(() => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Should be replaced with let and remove the global one on line 7.

@@ -205,5 +206,6 @@ def update_figures(n_clicks):
dash_dcc.wait_for_text_to_equal("#generate-btn", "Generate Figures")
dash_dcc.find_element("#generate-btn").click()
dash_dcc.wait_for_text_to_equal("#bounding-output", "loaded")
time.sleep(.1) ## must wait for the full render
Copy link
Member

Choose a reason for hiding this comment

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

Always a bit skeptical of adding artificial sleeps to load times. Is there any way we can actually await the full render?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The components are there immediately, the debounce has a 50ms delay. I'm not sure there is a way to handle this.

I'm open to figuring out how to delay and wait for something on the screen to demonstrate the proper sizing. XD

Copy link
Contributor

@T4rk1n T4rk1n left a comment

Choose a reason for hiding this comment

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

💃

@T4rk1n T4rk1n merged commit 76a8e16 into plotly:dev Apr 9, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community community contribution fix fixes something broken P1 needed for current cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants