Skip to content
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

widgets are not rendered in all clients in RTC #11435

Open
trungleduc opened this issue Nov 10, 2021 · 3 comments
Open

widgets are not rendered in all clients in RTC #11435

trungleduc opened this issue Nov 10, 2021 · 3 comments

Comments

@trungleduc
Copy link
Member

trungleduc commented Nov 10, 2021

Description

Let's say I have 2 clients A and B collaborating on the same notebook, the widget is executed in client A, so it is rendered correctly on A but on B it only shows the repr string of the widget.
The root cause is that the _trusted property of OutputAreaModel of the output cell in client A is set to true after the execution but in B this property is not synced through the shared model so Lab refuses to render the widget.

Reproduce

  1. Start a collaborative session and create a widget on one client, other clients will display the repr string of created widget.
  2. Go to Command Palette and trust the notebook on all clients, the widget will be displayed correctly.

Expected behavior

Widgets are displayed on all clients at execution.

Context

  • JupyterLab version: 3.2.0
  • ipywidget: 7.6.5
@trungleduc trungleduc added the bug label Nov 10, 2021
@welcome
Copy link

welcome bot commented Nov 10, 2021

Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗

If you haven't done so already, check out Jupyter's Code of Conduct. Also, please try to follow the issue template as it helps other other community members to contribute more effectively.
welcome
You can meet the other Jovyans by joining our Discourse forum. There is also an intro thread there where you can stop by and say Hi! 👋

Welcome to the Jupyter community! 🎉

@hbcarlos
Copy link
Member

Hi @trungleduc! Thanks for opening the issue.
The problem is that the trusted property in the CellModel is not shared between clients. By adding this property to the shared models, we will propagate the change to client B and update the property on the OutputAreaModel.
Do you want to open a PR? I can also look at it.

@trungleduc
Copy link
Member Author

Yes i will try to fix it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants