-
-
Notifications
You must be signed in to change notification settings - Fork 32
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
Use content providers to remove RTC prefix #418
Conversation
Co-authored-by: davidbrochart <[email protected]>
CI is expected to fail until jupyterlab/jupyterlab#17092 is merged and released. |
I installed jupyterlab/jupyterlab#17092 and then this PR, but I have an error:
Am I missing something? |
Did you link the packages from jupyterlab/jupyterlab#17092? I used:
I had to add diff --git a/package.json b/package.json
index 8520d4e..6860e66 100644
--- a/package.json
+++ b/package.json
@@ -66,5 +66,116 @@
"stylelint-prettier": "^3.0.0",
"typedoc": "~0.23.28",
"typescript": "~5.0.4"
+ },
+ "resolutions": {
+ "@jupyterlab/services": "portal:/home/krassowski/jupyterlab/packages/services",
+ "@jupyterlab/docmanager": "portal:/home/krassowski/jupyterlab/packages/docmanager",
+ "@jupyterlab/builder": "portal:/home/krassowski/jupyterlab/builder",
+ "@jupyterlab/buildutils": "portal:/home/krassowski/jupyterlab/buildutils",
+ "@jupyterlab/template": "portal:/home/krassowski/jupyterlab/buildutils/template",
+ "@jupyterlab/galata": "portal:/home/krassowski/jupyterlab/galata",
+ "@jupyterlab/application": "portal:/home/krassowski/jupyterlab/packages/application",
+ "@jupyterlab/application-extension": "portal:/home/krassowski/jupyterlab/packages/application-extension",
+ "@jupyterlab/apputils": "portal:/home/krassowski/jupyterlab/packages/apputils",
+ "@jupyterlab/apputils-extension": "portal:/home/krassowski/jupyterlab/packages/apputils-extension",
+ "@jupyterlab/attachments": "portal:/home/krassowski/jupyterlab/packages/attachments",
+ "@jupyterlab/cell-toolbar": "portal:/home/krassowski/jupyterlab/packages/cell-toolbar",
+ "@jupyterlab/cell-toolbar-extension": "portal:/home/krassowski/jupyterlab/packages/cell-toolbar-extension",
+ "@jupyterlab/cells": "portal:/home/krassowski/jupyterlab/packages/cells",
+ "@jupyterlab/celltags-extension": "portal:/home/krassowski/jupyterlab/packages/celltags-extension",
+ "@jupyterlab/codeeditor": "portal:/home/krassowski/jupyterlab/packages/codeeditor",
+ "@jupyterlab/codemirror": "portal:/home/krassowski/jupyterlab/packages/codemirror",
+ "@jupyterlab/codemirror-extension": "portal:/home/krassowski/jupyterlab/packages/codemirror-extension",
+ "@jupyterlab/completer": "portal:/home/krassowski/jupyterlab/packages/completer",
+ "@jupyterlab/completer-extension": "portal:/home/krassowski/jupyterlab/packages/completer-extension",
+ "@jupyterlab/console": "portal:/home/krassowski/jupyterlab/packages/console",
+ "@jupyterlab/console-extension": "portal:/home/krassowski/jupyterlab/packages/console-extension",
+ "@jupyterlab/coreutils": "portal:/home/krassowski/jupyterlab/packages/coreutils",
+ "@jupyterlab/csvviewer": "portal:/home/krassowski/jupyterlab/packages/csvviewer",
+ "@jupyterlab/csvviewer-extension": "portal:/home/krassowski/jupyterlab/packages/csvviewer-extension",
+ "@jupyterlab/debugger": "portal:/home/krassowski/jupyterlab/packages/debugger",
+ "@jupyterlab/debugger-extension": "portal:/home/krassowski/jupyterlab/packages/debugger-extension",
+ "@jupyterlab/docmanager-extension": "portal:/home/krassowski/jupyterlab/packages/docmanager-extension",
+ "@jupyterlab/docregistry": "portal:/home/krassowski/jupyterlab/packages/docregistry",
+ "@jupyterlab/documentsearch": "portal:/home/krassowski/jupyterlab/packages/documentsearch",
+ "@jupyterlab/documentsearch-extension": "portal:/home/krassowski/jupyterlab/packages/documentsearch-extension",
+ "@jupyterlab/extensionmanager": "portal:/home/krassowski/jupyterlab/packages/extensionmanager",
+ "@jupyterlab/extensionmanager-extension": "portal:/home/krassowski/jupyterlab/packages/extensionmanager-extension",
+ "@jupyterlab/filebrowser": "portal:/home/krassowski/jupyterlab/packages/filebrowser",
+ "@jupyterlab/filebrowser-extension": "portal:/home/krassowski/jupyterlab/packages/filebrowser-extension",
+ "@jupyterlab/fileeditor": "portal:/home/krassowski/jupyterlab/packages/fileeditor",
+ "@jupyterlab/fileeditor-extension": "portal:/home/krassowski/jupyterlab/packages/fileeditor-extension",
+ "@jupyterlab/help-extension": "portal:/home/krassowski/jupyterlab/packages/help-extension",
+ "@jupyterlab/htmlviewer": "portal:/home/krassowski/jupyterlab/packages/htmlviewer",
+ "@jupyterlab/htmlviewer-extension": "portal:/home/krassowski/jupyterlab/packages/htmlviewer-extension",
+ "@jupyterlab/hub-extension": "portal:/home/krassowski/jupyterlab/packages/hub-extension",
+ "@jupyterlab/imageviewer": "portal:/home/krassowski/jupyterlab/packages/imageviewer",
+ "@jupyterlab/imageviewer-extension": "portal:/home/krassowski/jupyterlab/packages/imageviewer-extension",
+ "@jupyterlab/inspector": "portal:/home/krassowski/jupyterlab/packages/inspector",
+ "@jupyterlab/inspector-extension": "portal:/home/krassowski/jupyterlab/packages/inspector-extension",
+ "@jupyterlab/javascript-extension": "portal:/home/krassowski/jupyterlab/packages/javascript-extension",
+ "@jupyterlab/json-extension": "portal:/home/krassowski/jupyterlab/packages/json-extension",
+ "@jupyterlab/launcher": "portal:/home/krassowski/jupyterlab/packages/launcher",
+ "@jupyterlab/launcher-extension": "portal:/home/krassowski/jupyterlab/packages/launcher-extension",
+ "@jupyterlab/logconsole": "portal:/home/krassowski/jupyterlab/packages/logconsole",
+ "@jupyterlab/logconsole-extension": "portal:/home/krassowski/jupyterlab/packages/logconsole-extension",
+ "@jupyterlab/lsp": "portal:/home/krassowski/jupyterlab/packages/lsp",
+ "@jupyterlab/lsp-extension": "portal:/home/krassowski/jupyterlab/packages/lsp-extension",
+ "@jupyterlab/mainmenu": "portal:/home/krassowski/jupyterlab/packages/mainmenu",
+ "@jupyterlab/mainmenu-extension": "portal:/home/krassowski/jupyterlab/packages/mainmenu-extension",
+ "@jupyterlab/markdownviewer": "portal:/home/krassowski/jupyterlab/packages/markdownviewer",
+ "@jupyterlab/markdownviewer-extension": "portal:/home/krassowski/jupyterlab/packages/markdownviewer-extension",
+ "@jupyterlab/markedparser-extension": "portal:/home/krassowski/jupyterlab/packages/markedparser-extension",
+ "@jupyterlab/mathjax-extension": "portal:/home/krassowski/jupyterlab/packages/mathjax-extension",
+ "@jupyterlab/mermaid": "portal:/home/krassowski/jupyterlab/packages/mermaid",
+ "@jupyterlab/mermaid-extension": "portal:/home/krassowski/jupyterlab/packages/mermaid-extension",
+ "@jupyterlab/metadataform": "portal:/home/krassowski/jupyterlab/packages/metadataform",
+ "@jupyterlab/metadataform-extension": "portal:/home/krassowski/jupyterlab/packages/metadataform-extension",
+ "@jupyterlab/metapackage": "portal:/home/krassowski/jupyterlab/packages/metapackage",
+ "@jupyterlab/nbconvert-css": "portal:/home/krassowski/jupyterlab/packages/nbconvert-css",
+ "@jupyterlab/nbformat": "portal:/home/krassowski/jupyterlab/packages/nbformat",
+ "@jupyterlab/notebook": "portal:/home/krassowski/jupyterlab/packages/notebook",
+ "@jupyterlab/notebook-extension": "portal:/home/krassowski/jupyterlab/packages/notebook-extension",
+ "@jupyterlab/observables": "portal:/home/krassowski/jupyterlab/packages/observables",
+ "@jupyterlab/outputarea": "portal:/home/krassowski/jupyterlab/packages/outputarea",
+ "@jupyterlab/pdf-extension": "portal:/home/krassowski/jupyterlab/packages/pdf-extension",
+ "@jupyterlab/pluginmanager": "portal:/home/krassowski/jupyterlab/packages/pluginmanager",
+ "@jupyterlab/pluginmanager-extension": "portal:/home/krassowski/jupyterlab/packages/pluginmanager-extension",
+ "@jupyterlab/property-inspector": "portal:/home/krassowski/jupyterlab/packages/property-inspector",
+ "@jupyterlab/rendermime": "portal:/home/krassowski/jupyterlab/packages/rendermime",
+ "@jupyterlab/rendermime-extension": "portal:/home/krassowski/jupyterlab/packages/rendermime-extension",
+ "@jupyterlab/rendermime-interfaces": "portal:/home/krassowski/jupyterlab/packages/rendermime-interfaces",
+ "@jupyterlab/running": "portal:/home/krassowski/jupyterlab/packages/running",
+ "@jupyterlab/running-extension": "portal:/home/krassowski/jupyterlab/packages/running-extension",
+ "@jupyterlab/settingeditor": "portal:/home/krassowski/jupyterlab/packages/settingeditor",
+ "@jupyterlab/settingeditor-extension": "portal:/home/krassowski/jupyterlab/packages/settingeditor-extension",
+ "@jupyterlab/settingregistry": "portal:/home/krassowski/jupyterlab/packages/settingregistry",
+ "@jupyterlab/shortcuts-extension": "portal:/home/krassowski/jupyterlab/packages/shortcuts-extension",
+ "@jupyterlab/statedb": "portal:/home/krassowski/jupyterlab/packages/statedb",
+ "@jupyterlab/statusbar": "portal:/home/krassowski/jupyterlab/packages/statusbar",
+ "@jupyterlab/statusbar-extension": "portal:/home/krassowski/jupyterlab/packages/statusbar-extension",
+ "@jupyterlab/terminal": "portal:/home/krassowski/jupyterlab/packages/terminal",
+ "@jupyterlab/terminal-extension": "portal:/home/krassowski/jupyterlab/packages/terminal-extension",
+ "@jupyterlab/testing": "portal:/home/krassowski/jupyterlab/packages/testing",
+ "@jupyterlab/theme-dark-extension": "portal:/home/krassowski/jupyterlab/packages/theme-dark-extension",
+ "@jupyterlab/theme-dark-high-contrast-extension": "portal:/home/krassowski/jupyterlab/packages/theme-dark-high-contrast-extension",
+ "@jupyterlab/theme-light-extension": "portal:/home/krassowski/jupyterlab/packages/theme-light-extension",
+ "@jupyterlab/toc": "portal:/home/krassowski/jupyterlab/packages/toc",
+ "@jupyterlab/toc-extension": "portal:/home/krassowski/jupyterlab/packages/toc-extension",
+ "@jupyterlab/tooltip": "portal:/home/krassowski/jupyterlab/packages/tooltip",
+ "@jupyterlab/tooltip-extension": "portal:/home/krassowski/jupyterlab/packages/tooltip-extension",
+ "@jupyterlab/translation": "portal:/home/krassowski/jupyterlab/packages/translation",
+ "@jupyterlab/translation-extension": "portal:/home/krassowski/jupyterlab/packages/translation-extension",
+ "@jupyterlab/ui-components": "portal:/home/krassowski/jupyterlab/packages/ui-components",
+ "@jupyterlab/ui-components-extension": "portal:/home/krassowski/jupyterlab/packages/ui-components-extension",
+ "@jupyterlab/vega5-extension": "portal:/home/krassowski/jupyterlab/packages/vega5-extension",
+ "@jupyterlab/workspaces": "portal:/home/krassowski/jupyterlab/packages/workspaces",
+ "@jupyterlab/workspaces-extension": "portal:/home/krassowski/jupyterlab/packages/workspaces-extension",
+ "@jupyterlab/testutils": "portal:/home/krassowski/jupyterlab/testutils",
+ "@jupyter/ydoc": "3.0.0",
+ "@types/react": "18.0.26",
+ "react": "18.2.0",
+ "yjs": "13.5.49",
+ "y-protocols": "1.0.5"
}
}
diff --git a/tsconfig.json b/tsconfig.json
index 40989c6..b2695bc 100644
--- a/tsconfig.json
+++ b/tsconfig.json
@@ -1,6 +1,7 @@
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
+ "skipLibCheck": true,
"composite": true,
"declaration": true,
"esModuleInterop": true, |
Maybe you did not re-complie on the jupyterlab lab side? |
Yes I did, but your instructions here solved the issue for me. This is definitely not my zone of comfort 🤔 |
Works fine on my side, and the |
One thing I'm wondering: I was expecting to be able to right click e.g. on a notebook and be able to open it with the RTC content provider or with the REST content provider, but it seems I have no choice but using RTC. |
Yes, this is a choice we have, either:
I chose the latter for simplicity and to avoid user confusion. We can change it. |
I think we can start with that, as it was previously like that. |
* A Collaborative implementation for an `IDrive`, talking to the | ||
* server using the Jupyter REST API and a WebSocket connection. | ||
*/ | ||
export interface ICollaborativeDrive extends Contents.IDrive { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like we'll want to log that somewhere in the changelog as API breaking change, since other extensions may currently depend on ICollaborativeDrive
?
For instance it's the case of JupyterCAD and JupyterGIS:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like the transition will be smooth because:
- both extensions used
ICollaborativeDrive
as an optional dependency (after all it was just added) - neither of the extensions actually relied on the
Drive
part ofICollaborativeDrive
- the same properties that they needed will be available onICollaborativeContentProvider
So when cutting the release we will just need to add a note that migration from ICollaborativeDrive
to ICollaborativeContentProvider
token for access to shared factory and forks will be required. I do not see a good way to do that right now as the changelog for next version is not there yet - is it ok if we add it during/just after cutting the release?
); | ||
} | ||
const registry = defaultDrive.contentProviderRegistry; | ||
if (!registry) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will that make jupyter-collaboration
only compatible with JupyterLab 4.4 or higher?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, I would propose that, the next version of jupyter-collaboration
will require JupyterLab 4.4.
Just tried the latest changes of this PR and jupyterlab/jupyterlab#17092 locally with a dev install and it seems to be working fine. Also when opening files with other packages like (posting a screenshot below just for self-reference) |
It looks like there is no version pins on JupyterLab in the distribution tarballs. I opened #425 to discuss this. |
All green 💚! Good to merge and release an alpha version for testing? |
CC @jtpio @davidbrochart - if you do not have any objections I would like to proceed with a merge and new alpha release. I think this would be a major version to signify that it is not backwards compatible. |
I just tried locally in a new environment with the latest JupyterLab 4.4.0a2 and the wheels from https://github.com/jupyterlab/jupyter-collaboration/actions/runs/12651599033?pr=418, and it seems to be working well 👍 |
So this is likely due to incorrect the non-null assertion in: jupyter-collaboration/packages/collaboration/src/collaboratorspanel.tsx Lines 166 to 169 in 0a75715
Since this is not introduced by this PR and should be easy to fix - I will open a new issue. |
The issue to track the bug discovered above: #426 |
Right, a new major release sounds like a safer approach 👍 |
We still need to decide what to do where
RTC:
prefix was used in the actual logic.One of my goals here is to keep the diff minimal to make the review easier.