-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
Metadata linked to view state and Real-Time Collaboration #13234
Comments
For what it is worth, I had to address exactly this problem in CoCalc. The solution I implemented in all cases is that everything is synchronized in realtime, e.g., if a user hides the output then it is hidden for everybody. We have not received any complaint about this, so it's hopefully not a horrible mistake. Personally, when I implemented this, I never thought any other behavior would make sense. A good invariant is (*) "when I refresh my browser I get back what I was looking at". That's very much broken in current Jupyter RTC, since if one user collapses and expands the output of a cell, then the other user sees it as collapsed still. However, if they then refresh their browser, it becomes expanded. The invariant (*) implies that this view state stuff should all be synced, I think. |
@williamstein thanks for your perspective here, that is really valuable to hear that your users haven't complained about that behavior. Based on that, I think it is a good starting point to sync this state in the shared model among users. Over time, as we get more feedback from users we can consider other options as needed. |
Seems like collapsing/expanding by one user causing others' active views to be bumped out of view could only happen if the collapsed/expanded cell was within view before the operation (even if just slightly), which I suppose is either desirable (viewing the same cell) or rare (just happen to be looking at the cell below or couple of cells below). Otherwise, the view is unaffected (maybe because of the virtual notebook?).
It seems like both collapsing and expanding are synced in my instance? |
For now we are moving forward with synchronizing everything. |
Problem
In the official notebook format, they are metadata at the cells level that are related to view state.
The following metadata keys are defined at the cell level:
The following metadata keys are defined at the cell level within the jupyter namespace
Synchronizing those in Real Time Collaboration may be a weird user experience; for example if a user decides to hide an output, another one that was looking at it may get confused and re-expand it.
There is also the special case of
trusted
- it is for now transiently stored in the cell metadata; aka the server add it when loading a file and then the frontend removes it when the cell model is instantiated. This is hard to work with in RTC because you cannot remove it as user will not get the proper notebook state if they connect on an already opened notebook. On the other end, if we don't remove it, it feels wrong to get thetrusted
key in the cell metadata editor.Additional context
Some previous discussion at the notebook level: #12052
The text was updated successfully, but these errors were encountered: