-
Notifications
You must be signed in to change notification settings - Fork 84
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
fix: use jsdelivr CDN for ipywidgets #491
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ad2ecb2
fix: use jsdelivr CDN
agoose77 3cd045a
Merge branch 'master' into agoose77/fix-add-ipywidgets-cdn
agoose77 85ac786
chore: bump ipywidgets version to 8.0
agoose77 0a95589
Merge branch 'agoose77/fix-add-ipywidgets-cdn' of github.com:executab…
agoose77 2deaa40
docs: add note about ipywidgets
agoose77 e6a1fee
Merge branch 'master' into agoose77/fix-add-ipywidgets-cdn
agoose77 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -90,6 +90,22 @@ show(p) | |
|
||
## ipywidgets | ||
|
||
:::{note} | ||
IPyWidgets uses a special JS package `@jupyter-widgets/html-manager` for rendering Jupyter widgets outside notebooks. `myst-nb` loads a specific version of this package, which may be incompatible with your installation of IPyWidgets. If this is the case, you might need to specify the appropriate `nb_ipywidgets_js` config value, e.g. for `0.20.0` | ||
```yaml | ||
|
||
sphinx: | ||
recursive_update: true | ||
config: | ||
nb_ipywidgets_js: | ||
# Load IPywidgets bundle for embedding. | ||
"https://cdn.jsdelivr.net/npm/@jupyter-widgets/[email protected]/dist/embed-amd.js": | ||
"data-jupyter-widgets-cdn": "https://cdn.jsdelivr.net/npm/" | ||
"crossorigin": "anonymous" | ||
``` | ||
To determine which version of `@jupyter-widgets/html-manager` is required, find the `html-manager` JS package in the [`ipywidgets` repo](https://github.com/jupyter-widgets/ipywidgets), and identify its version. | ||
::: | ||
|
||
You may also run code for Jupyter Widgets in your document, and the interactive HTML | ||
outputs will embed themselves in your side. See [the ipywidgets documentation](https://ipywidgets.readthedocs.io/en/latest/user_install.html) | ||
for how to get set up in your own environment. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
can we add a comment here that provides a loose guidelines for when/how to update this import link? Or maybe just a block comment at the top of the
#Load IPywidgets..
section? doesn't need to block if you don't have the time, but I feel like you brought some valuable domain-knowledge to this fix that could be useful for othersThere 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.
Hehe, we're on the same wavelength: 2deaa40