jupyterlab / jupyter-collaboration

A Jupyter Server Extension Providing Support for Y Documents
https://jupyterlab-realtime-collaboration.readthedocs.io/en/latest/
Other
170 stars 31 forks source link

Populating the path property of the ydoc #341

Closed brichet closed 2 months ago

brichet commented 3 months ago

Description

The path property of the ydoc is not populated.

This is probably a regression included in https://github.com/jupyterlab/jupyter-collaboration/pull/174. The path used to be set here: https://github.com/jupyterlab/jupyter-collaboration/blob/547667399adeefcf2729a2c76b4526e752efdbf6/jupyter_server_ydoc/ydoc.py#L127

Reproduce

Open a document in collaborative mode and try to get the path from the ydoc.

Expected behavior

The path to be populated.

Suggestion

Set the path should be trivial at initialization, i.e. at https://github.com/jupyterlab/jupyter-collaboration/blob/b8fafc0646e03ce2dcbd27b71267b1b99c976547/projects/jupyter-server-ydoc/jupyter_server_ydoc/rooms.py#L44

Then we should probably update the path if it has changed, probably from https://github.com/jupyterlab/jupyter-collaboration/blob/b8fafc0646e03ce2dcbd27b71267b1b99c976547/projects/jupyter-server-ydoc/jupyter_server_ydoc/loaders.py#L183