-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Improve readonly editor behavior #13403
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this intended to not work for new not yet saved files? it makes sense since they are not yet in the filesystem. I just want to make sure
Also seems like there is an regression. When creating new markdown cells you get following error in the console and its not possible to edit them anymore. Even when readonly is disabled
|
The error is unrelated to the issue, but I fixed both. The error logged was actually due to a race condition in the notebook plugin frontend. |
Yes, they use the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for fixing the race condition. Code looks good to me so approved
What it does
Improves our readonly handling for monaco editors (editors can now dynamically change being readonly and writable).
Additionally adds a readonly mode to notebook editors. This new readonly mode disables a lot of notebook features:
This change lays the groundwork for a few features in the collaboration feature (where readonly can be toggled) and the changes required for #13353.
How to test
Toggle File System Readonly
. It toggles whether thefile
URI scheme is treated as readonly.Review checklist
Reminder for reviewers