-
Notifications
You must be signed in to change notification settings - Fork 41
JupyterLab 2 support #38
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
Conversation
Co-authored-by: Jason Grout <[email protected]>
@jasongrout, this extension have a dependency on jupyterlab-manager, is that a mistake? I found the following references in the code base. jupyterlab-sidecar/src/widget.ts Lines 4 to 8 in 720747a
jupyterlab-sidecar/src/plugin.ts Lines 16 to 18 in 720747a
|
The sidecar explicitly uses jupyterlab-specific things, so yes, it is appropriate to have a dependency. That widget only works in jlab. Most widgets are not only for jlab, and probably should not depend on the jlab widget manager. |
The failing test was probably coming from a cookiecutter, and we needed to adjust it to the actual code we implemented.
What else is needed to move this PR forward? |
It looks like we just need someone to test it, merge it, and release it. Can you test it? |
I might be able to find some time this weekend. Are you also looking for new test cases in the PR, or just to, e.g. test |
I'm not looking for new test cases. I think testing ipyleaflet on this branch should be fine. |
I also tried to fix it based on this PR. |
btw. this is where both tests fail:
|
Looks like the DummyManager needs to be extended to have a mock Context (the access to |
Thanks for tracking that down. @vidartf - have you happened to address this in your opinionated ts cookiecutter? |
On the other hand, I agree with @consideRatio:
The tests failing was already an issue, and I think can be solved on another issue. You tested this PR and it was working in jlab 2. Thanks! |
Thanks everyone. I just released sidecar version version 0.4.0 and it works in jlab 2. |
@jasongrout @consideRatio For the records, I could solve the regenerator error by adding Maybe this helps in the future to get the tests running again |
Would you mind submitting a PR with your changes? I had a difficult time getting the tests even to the point of running and getting any sort of error. Once I can get things to having that sessionContext error, it will be much easier to fix things. |
I don't think so, as most widgets don't interact directly with the session/kernel. |
@jasongrout created #47. |
When installing this extension on JupyterLab 2 I noted the following warning.
This PR attempts to fix support for JupyterLab 2, but my knowledge of JupyterLab and TypeScript is lacking to complete this PR. I hope that someone else can complete it!
What I've done
"esModuleInterop": true,
in tsconfig.json to workaround an typescript compile error that probably can be resolved in a better manner.plugin.ts
.npm run test:chrome
test, but it crash later with another issue. But...What I have not done
I've not fixed the tests entirely, I still crash with
ReferenceError: regeneratorRuntime is not defined
after my browser starts. I assume it is because these tests never have been configured to run successfully before (#19). As the tests are unrelated to this PR, and I failed to fix them in 1 hour, I'll settle now and suggest this is ready for merge.