Closed mcrutch closed 1 year ago
Thanks for the heads up!
Just out of curiosity, would these changes be backward compatible?
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)
Thank you so much, this is perfect :raised_hands:
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