-
Notifications
You must be signed in to change notification settings - Fork 1
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
Widget #29
base: main
Are you sure you want to change the base?
Conversation
ColabWidgets stay in a loading state indefinitely until you re-execute them. At that point, they display correctly. This suggests the thread responsible for fetching data and updating the widget is fetching the data (caching it for the second call), but not updating the widget. This StackOverflow answer confirms that this is an issue with how Colab handles threads:
Their solution of using |
Jupyter ClassicRunning notebook server Possibly related console error: This is similar to an error that I see when first installing in Jupyter Lab, but refreshing the browser isn't fixing this case. |
Hi, maintainer of anywidget here 👋
Custom widgets (which the Happy to help trouble shoot. |
This is a rough draft implementation of async widget reprs (#21). Still need to do some cleanup and take a closer look at compatibility.
To test the Colab demo notebook with async widgets, just pip install this branch:
Compatibility
Other Considerations
Widget state
With pure HTML widgets, any static site that supported embedded CSS and JS (e.g. the docs and nbviewer) would render reprs correctly with collapsing functionality. As widgets, I think I will need to explicitly save widget state in order for them to render. Not a dealbreaker, but something to keep in mind. The upside is that notebook files won't get huge due to large reprs unless users intentionally save widget state.
Browser refresh
After installing
anywidget
, the browser typically (always?) needs to be refreshed to avoid JS errors.