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

Make a script you can load which implements the amd embedding. #1629

Merged
merged 2 commits into from Aug 14, 2017

Conversation

@jasongrout
Copy link
Member

@jasongrout jasongrout commented Aug 14, 2017

CC @maartenbreddels.

The goal is to enable this for the amd embedding:

<script src='https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js'></script>
<script src='https://unpkg.com/@jupyter-widgets/html-manager@*/dist/embed-amd.js'></script>
@jasongrout
Copy link
Member Author

@jasongrout jasongrout commented Aug 14, 2017

Perhaps it should be libembed rather than embedlib?

Loading

@jasongrout jasongrout added this to the 7.0 milestone Aug 14, 2017
@jasongrout
Copy link
Member Author

@jasongrout jasongrout commented Aug 14, 2017

Yeah, I like libembed better - implemented in the last commit.

Loading

@jasongrout
Copy link
Member Author

@jasongrout jasongrout commented Aug 14, 2017

Let's let tests finish, merge, release, and iterate.

Loading

@maartenbreddels
Copy link
Member

@maartenbreddels maartenbreddels commented Aug 14, 2017

Great, that means that jupyter-sphinx needs this right:

        app.add_javascript('https://cdnjs.cloudflare.com/ajax/libs/require.js/2.3.4/require.min.js')
        app.add_javascript('https://unpkg.com/@jupyter-widgets/html-manager@%s/dist/libembed-amd.js' % __html_manager_version__)
        app.add_javascript('https://unpkg.com/@jupyter-widgets/html-manager@%s/dist/embed-amd.js' % __html_manager_version__)

Loading

maartenbreddels added a commit to maartenbreddels/jupyter-sphinx that referenced this issue Aug 14, 2017
@jasongrout
Copy link
Member Author

@jasongrout jasongrout commented Aug 14, 2017

Yes, I think so.

Loading

@jasongrout jasongrout merged commit 306480d into jupyter-widgets:master Aug 14, 2017
1 check passed
Loading
@jasongrout
Copy link
Member Author

@jasongrout jasongrout commented Aug 14, 2017

Iterating on this - this may not work. Requirejs is getting the wrong location for picking up the local amd modules. We may need to have a few more script tags.

Loading

@jasongrout
Copy link
Member Author

@jasongrout jasongrout commented Aug 14, 2017

Even better idea - bundle all of the defined requirejs modules into one file, which we'll load at once rather than in separate require statements. In the next PR.

Loading

@maartenbreddels
Copy link
Member

@maartenbreddels maartenbreddels commented Aug 14, 2017

If you manage to come up with just a single file, that loads require when not present, and supports 3rd party that would be a big win btw.

Loading

@jasongrout
Copy link
Member Author

@jasongrout jasongrout commented Aug 15, 2017

Even better idea - bundle all of the defined requirejs modules into one file, which we'll load at once rather than in separate require statements. In the next PR.

This is now #1630

Loading

SylvainCorlay added a commit to jupyter/jupyter-sphinx that referenced this issue Nov 30, 2017
* bumped version to force install on rtd

* bumped version to force install on rtd, take 2

* added require

* fix: for ipywidgets7

* following jupyter-widgets/ipywidgets#1629

* fix in import and ipywidgets6 support

* following up jupyter-widgets/ipywidgets#1630

* missing newline

* now using conf.py config values for more flexibility

* mention that the extra configuration options are optional

* removed print statements
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants