Skip to content

Add support to JupyterLab 2 #60

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

Merged
merged 5 commits into from
Jun 3, 2020
Merged

Conversation

martinRenou
Copy link
Member

No description provided.

Signed-off-by: martinRenou <[email protected]>
@jasongrout
Copy link
Member

This PR looks right. Did you test it by generating a plugin and seeing if it works in jlab 1 and 2?

@martinRenou
Copy link
Member Author

I did not but I should have, the build seems to fail with

src/plugin.ts(29,3): error TS2322: Type 'Token<IJupyterWidgetRegistry>[]' is not assignable to type 'Token<any>[]'.
      Type 'Token<IJupyterWidgetRegistry>' is not assignable to type 'Token<any>'.
        Types have separate declarations of a private property '_tokenStructuralPropertyT'.

Not sure I get the error I am not familiar with this Token system in JLab

@jasongrout
Copy link
Member

Is this the jlab build when installing the plugin? For jlab 1 or jlab 2?

@martinRenou
Copy link
Member Author

martinRenou commented Mar 5, 2020

I seem to reproduce this error locally with JupyterLab 1.2.6 and JupyterLab 2.0.0

@vidartf
Copy link
Member

vidartf commented Mar 10, 2020

This is because the plugin is strongly typed:

const examplePlugin: IPlugin<Application<Widget>, void> = {

Ref jupyter-widgets/ipywidgets#2798 (comment)

@jasongrout
Copy link
Member

@martinRenou - can you check out the last few commits I added to this PR? I think it works now in jlab 2.

Signed-off-by: martinRenou <[email protected]>
@martinRenou
Copy link
Member Author

I pushed a commit but it is still failing.

I feel like it has to do with Karma not understanding ES6.

@vidartf
Copy link
Member

vidartf commented Mar 20, 2020

@martinRenou martinRenou merged commit 759c3fe into jupyter-widgets:master Jun 3, 2020
@martinRenou martinRenou deleted the jlab2 branch June 3, 2020 07:05
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.

3 participants