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

Update widgets CDN for ipywidgets 7 w/fallback #792

Merged
merged 1 commit into from Aug 7, 2018
Merged

Update widgets CDN for ipywidgets 7 w/fallback #792

merged 1 commit into from Aug 7, 2018

Conversation

vidartf
Copy link
Contributor

@vidartf vidartf commented Apr 4, 2018

Fixes #636.

@vidartf
Copy link
Contributor Author

vidartf commented Jun 14, 2018

@mpacer This is the PR I mentioned in the meeting. It should be fully backwards compatible (feel free to try to break it though) 😄

@vidartf
Copy link
Contributor Author

vidartf commented Jul 16, 2018

I'm feeling rather ignored here. 😢

<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.10/require.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>

{% block ipywidgets %}
Copy link
Member

Choose a reason for hiding this comment

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

(nitpick mode on) maybe the ipy is a bit python-specific.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I just followed the convention of nbviewer (https://github.com/jupyter/nbviewer/pull/738/files#diff-613fc8ba3406aefaf7062016d832bbfbR84). I'm not sure how transferrable templates are between the two, but I figured I would try to make things as similar as possible.

Copy link
Member

Choose a reason for hiding this comment

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

ok

document.body.appendChild(scriptElement);
}

document.addEventListener('DOMContentLoaded', addWidgetsRenderer);
Copy link
Member

Choose a reason for hiding this comment

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

What could be interesting would be to add an argument to addWidgetsRenderer for the version of the html manager to load and try to infer it from the content of nb.metadata.widget (this could be done in a separate PR though.)

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.

None yet

3 participants