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

Ensure Notebook Model Dirty State Can Be Triggered Before Session Start #10420

Merged
merged 1 commit into from
May 15, 2020

Conversation

chlafreniere
Copy link
Contributor

This PR fixes #10416.

Issue: we were waiting until a session was started before calling the resolving the modelReady promise. This promise was awaited in a few places to get a reference to the notebook model, one of which was to hook up model contentChange (and kernelChange) events in notebookInput.

This was originally done because there is always a kernelChange event fired when a notebook is opened, so we didn't want to set the document to dirty incorrectly.

Tracking the first kernel change is straightforward, however, which is part of my change here.

Now, users should be able to open a notebook, immediately edit the notebook, and save it, before the session is loaded for the kernel.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.002%) to 33.956% when pulling 42e8fd5 on fix/nbDirtyStateFix into 9680b1e on master.

@chlafreniere chlafreniere merged commit 452bd6a into master May 15, 2020
@chlafreniere chlafreniere deleted the fix/nbDirtyStateFix branch May 15, 2020 18:48
chlafreniere added a commit that referenced this pull request May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Notebooks: Dirty State Trigger Should Not Wait for Session to be Started
3 participants