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
Add explicit message to non-trusted cell output, with instructions on how to make it trusted #15467
Comments
Thank you for opening your first issue in this project! Engagement like this is essential for open source projects! 🤗 |
To clarify, in JupyterLab 4.0.x this only happens when opening a notebook created or recently edited on another machine. This means that users who spawn a new docker image every day, or pull notebooks from a repository (like GitHub) will face this issue.
Adding a shield icon in the output corner with explanation on hover (and click opening a dialog to trust output) on output may be a better trade-off between preserving current user expectations and improving the problematic behaviour.
True, we should improve it. Of note we already cover it in user documentation: https://jupyterlab.readthedocs.io/en/latest/user/notebook.html#trust |
THanks @krassowski ! Just to clarify, the example case is: I created a demo docker with JupyterLab and many demo GoMLX (my project) notebooks with code and results, including plots. When someone pulls the demo docker and opens the notebooks, the plots show garbled text. I update the demo Docker at each release, so once a month or something. Coincidentally, I also happen to co-develop on 2 machines (laptop and desktop) so it's possible I bump more often into this issue as you mentioned. But I assume this is not such an uncommon case ? +1 to the idea of a shield icon: the more visible the better, since it's likely a condition that deserves attention -- things are being hidden / garbled for a good reason. About it being documented: most folks don't read it (surely not to the end, it's the last item in the doc), and without someone telling users what to search for ("trust") very few people would find it ... Actually, many users may just not realize that things are not being displayed at all (due to lack of trust) or assume the garbled text is an issue with the notebook and not with Jupyter+Trust status. |
Context:
[1] Jupyter Forum: Jupyterlab not remembering trust for notebooks
[2] Jupyter Forum: SVG either not loading right, or not exporting to HTML?
Problem
Notebooks created with rich content (SVGs, videos, etc), when re-opened in fresh JupyterLab installs (like a docker), don't display their rich content, or in case of SVG, display it as garbled text.
This is because the notebook is marked as non-trusted, but users won't know it.
Example:
(1) How SVG should be displayed (original rendering from Github)
(2) How it is displayed when notebook is opened by the user in a pre-built docker with a fresh JupyterLab:
Most users won't know the concept of "trusted notebook", nor will they know how to make the notebook trusted -- it requires knowing there is a "Command Palette" in JupyterLab, and then knowing what to search for.
So effectively is appears broken to the users.
Proposed Solution
Whenever an output cell is not displayed (or garbled text is replaced) because it is not trusted, instead display a simple warning box with "Output not displayed, notebook not trusted. To mark notebook as trusted do X (or click here)".
Additional context
Issue observed in vanilla Jupyter 4.0.9
The text was updated successfully, but these errors were encountered: