Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
Fix widget initialization issue in v6#5102
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
Fix widgets not initializing properly when integrating with third-party libraries (such as `ipywidgets`)
marthacryan left a comment
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.
Thank you for tracking this down! Tested with the reproducible example in the issue and it is now working for me with your changes. This looks like a great change and thank you for adding tests.
799eb10 intoplotly:mainUh oh!
There was an error while loading.Please reload this page.
MichalRIcar commentedMay 13, 2025
@jescalada , thank you for the prompt and great fix of the issue! |
Uh oh!
There was an error while loading.Please reload this page.
This PR fixes a problem with widgets not initializing properly when integrating with third-party libraries (such as
ipywidgets) in v6.0.0:#4998It seems that some of the changes in#4956 modified variable names used to load the widget's layout and data.
Let me know if adding test cases for this is required (I believe it'd be hard to test since it relies on other libraries).Edit: Added basic tests just in case!
Thank you!
Before fix
After fix
Please uncomment this block and take a look at this checklist if your PR is making substantial changes todocumentation/impacts files in the
docdirectory. Check all that apply to your PR, and leave the rest unchecked to discuss with your reviewer! Not all boxes must be checked for every PR :)If your PR modifies code of the
plotlypackage, we have a different checklistbelow :-).
Documentation PR
doc/README.mdfiledoc-prodbranch OR it targets themainbranchpxexample if at all possibleplotly.graph_objects as go/plotly.express as px/plotly.io as piodffig = <something>call is high up in each new/modified example (eitherpx.<something>ormake_subplotsorgo.Figure)fig.add_*andfig.update_*rather thango.Figure(data=..., layout=...)in every new/modified examplefig.add_shapeandfig.update_xaxesare used instead of bigfig.update_layoutcalls in every new/modified examplefig.show()is at the end of each new/modified exampleplotly.plot()andplotly.iplot()are not used in any new/modified exampleCode PR
plotly.graph_objects, my modifications concern thecodegenfiles and not generated files.modified existing tests.
new tutorial notebook (please see the doc checklist as well).