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

JupyterLab 4(beta) support #299

Closed
mcrutch opened this issue Mar 29, 2023 · 3 comments · Fixed by #300
Closed

JupyterLab 4(beta) support #299

mcrutch opened this issue Mar 29, 2023 · 3 comments · Fixed by #300

Comments

@mcrutch
Copy link
Contributor

mcrutch commented Mar 29, 2023

Since I have been down this road with some of my stuff already, figured I would give you a leg-up. Probably don't have the cycles to do a pull request/testing, but can at least give you some quick things to look at:

https://github.com/ryantam626/jupyterlab_code_formatter/blob/master/src/formatter.ts#L157
https://github.com/ryantam626/jupyterlab_code_formatter/blob/master/src/formatter.ts#L169
https://github.com/ryantam626/jupyterlab_code_formatter/blob/master/src/formatter.ts#L178
cell.model.value.text => cell.model.sharedModel.source

Probably similar on 221/238 of that file

https://github.com/ryantam626/jupyterlab_code_formatter/blob/master/src/formatter.ts#L89
const metadata = this.notebookTracker.currentWidget.content.model.metadata.toJSON(); => const metadata = this.notebookTracker.currentWidget.content.model.sharedModel.metadata

@ryantam626
Copy link
Collaborator

Thanks for the heads up!

Just out of curiosity, would these changes be backward compatible?

@mcrutch
Copy link
Contributor Author

mcrutch commented Mar 29, 2023

From my testing they worked with 3.6.1 but not 3.5. So 3.6.x+ should be good unless my test environment was screwy.
(My discovery process - https://discourse.jupyter.org/t/understanding-jupyterlabv4-notebook-v7-changes-with-inotebooktrackers-and-activecells/18563)

@ryantam626
Copy link
Collaborator

Thank you so much, this is perfect 🙌

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 a pull request may close this issue.

2 participants