jupyterlab / jupyter-collaboration

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

Scrolling in RTC session difficult when cell updates #314

Open asteppke opened 1 month ago

asteppke commented 1 month ago

With the current jupyter-collaboration 2.1.0 (and earlier) and jupyter lab 4.18 scrolling through the notebook becomes very difficult if there is a cell running with a lot of output in the "primary" jupyter lab.

To reproduce in a new notebook create the following example cell:

import time
for i in range(100_000_000):
    print(f"{i}, ", end="")
    time.sleep(0.05)

and open the notebook in a collaborative session in a second window / computer.

If the cursor is at the end of the notebook scrolling is nearly impossible. If the cell is collapsed the scroll bar jumps as in the following screencast:

GIF 17-05-2024 15-38-47

The user interface in the "primary" jupyter lab that executed the cell shows no issues.

This looks very similar to https://github.com/jupyterlab/jupyter-collaboration/issues/310, only that the collapsing of the cell gets temporarily reversed.

davidbrochart commented 1 month ago

cc @afshin

krassowski commented 1 week ago

@asteppke is this still happening in 4.2.x?

asteppke commented 1 week ago

@krassowski: I tried with jupyterlab-collaboration 3.0.0a2 and jupyterlab 4.2.2 and it is definitely better. It seems to me that in this combination https://github.com/jupyterlab/jupyter-collaboration/issues/310 is fixed and this helps here as well but does not fix the issue of the collapsing.

The scrollbar of the notebook can now be used again, the rapid collapsing and uncollapsing of the output as in the screencast above still occurs.