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
The type of a non-editable cell can be changed #11165
Comments
I will bump this issue and add one more additional concern: the cell toolbar (that comes up when you hover over a cell) also ignores metadata. If I have a cell that is false for both editable and deletable, the "trash can" button in the cell toolbar will still delete the cell. |
Which version are you running? I just tested the built-in cell toolbars in both 3.4.8 and the latest master, and neither toolbars will delete the cell when |
@firai so, this was something I saw a student do in a class I'm teaching that uses JupyterLab for student work. Our teaching team did actually try to reproduce it afterward, but to no avail. So it's possible the student copied one of our read-only cells, which I suppose didn't copy the "read-only" metadata, and then trashed that one. Anyway I think you're safe to ignore my comment. I will re-file as a new issue if it comes up again! |
Let me bump this ticket. Our beginning students frequently change cell types by accident, e.g. by inadvertently typing keyboard shortcuts. And then they don't understand why the examples that we provide them with in locked cells are broken. When this happens outside of the classroom, it is a pain to debug remotely their "your example does not work" calls for help. As an alternative, one could imagine having a separate flag called, say, cc @brichet |
Of note a guard of similar nature (but for pending input) was added in #16032. To solve this issue, one would need to add a check for read-only status, similar to the check for pending input in: jupyterlab/packages/notebook/src/actions.tsx Lines 2731 to 2746 in c0050f2
One could also add a test, building upon the test case in: jupyterlab/packages/notebook/test/actions.spec.ts Lines 669 to 700 in c0050f2
|
Description
The type of cells with "editable": false can be changed (e.g. from Code to Markdown or Raw).
Reproduce
In a new notebook, edit metadata adding
the cell cannot be edited, but it is possible to change its type from the toolbar.
Expected behavior
It should not be possible to change the type, as in jupyter notebook.
Context
Reproduced in a clean env (conda create -n jlab-test --override-channels --strict-channel-priority -c conda-forge -c nodefaults jupyterlab)
JupyterLab Version 3.1.13
Google Chrome | 93.0.4577.82
Windows 10 OS Version 2009
JavaScript | V8 9.3.345.19
I was NOT able to reproduce the problem in Jupyter notebook.
The text was updated successfully, but these errors were encountered: